Add AgentToll action provider - #1407
Open
tevfikefeaydin wants to merge 2 commits into
Open
Conversation
Pay-per-call Base data over x402: new-token scout with safety verdicts, token safety checks, wallet portfolios, onchain token prices, Basename resolution and a market brief - paid in USDC from the agent wallet, no API keys. Uses the same wallet-to-signer pattern as the existing x402 provider.
🟡 Heimdall Review Status
|
The tool description and README listed $0.002 for check_base_token_safety; the endpoint charges $0.003. Also notes the deployer-history check the endpoint now runs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds an AgentToll action provider: pay-per-call Base data over x402, paid in
USDC from the agent's wallet with no API keys or accounts.
AgentToll (https://agenttoll.app, open source MIT) is a Base-native data API
settled through the CDP facilitator. This provider exposes six typed actions:
scout_new_base_tokens— pools launched on Base in the last ~24h, each witha safety verdict already attached ($0.008)
check_base_token_safety— simulated buy & sell, taxes, owner powers,holder concentration ($0.002)
get_base_wallet_portfolio— everything an address holds, valued in USD ($0.003)get_base_token_price— any Base token by contract address, priced fromonchain DEX liquidity ($0.001)
resolve_basename— name to address + records, or address to primary name ($0.001)get_market_brief— prices + Base gas + Fear & Greed in one call ($0.005)Payment uses the same wallet-to-signer pattern as the existing
x402actionprovider (
walletProvider.toSigner()+registerExactEvmScheme), so no newpayment machinery is introduced. A request that fails is never charged —
settlement only happens when data is returned. Safety verdicts are
deliberately conservative: a check that could not run is never a "pass", and a
token too new to judge reports
insufficient-data, neverclear.Compared to routing these calls through the generic
x402provider, the typedactions give the model exact input schemas and descriptions of when to reach
for each tool, and require no service registration config.
Tests
Unit tests cover request building, query handling, error paths (non-ok
responses and network failures returned as structured errors, not throws),
network gating (
base-mainnetonly) and the base URL override:The underlying API paths and payment flow were verified against production
with real USDC settlements on Base mainnet via the same
@x402/fetch+registerExactEvmSchemeclient wiring this provider uses (e.g. settlement0xc2bde164520f7bcc17bdc0778c3274a6494994c94938ef81291b73d053df5e94). Every
endpoint also answers unauthenticated with an x402 v2 quote for manual
inspection:
curl -i https://agenttoll.app/api/base/scout.