Skip to content

feat(python): add x402search ActionProvider#1029

Open
x402-index wants to merge 3 commits intocoinbase:mainfrom
x402-index:feat/x402search-action-provider
Open

feat(python): add x402search ActionProvider#1029
x402-index wants to merge 3 commits intocoinbase:mainfrom
x402-index:feat/x402search-action-provider

Conversation

@x402-index
Copy link

Summary

Adds a native x402search ActionProvider that gives AgentKit agents natural language search across 14,000+ indexed API services.

Why

Coinbase Bazaar lists services. x402search searches them by capability. They are complementary — Bazaar is ls /apis, x402search is grep -r "token price" across all of them.

When an agent needs a data source, it calls search_apis("token price") and gets 88 matching APIs back — paid automatically, no human in the loop.

What

  • New x402search action provider under action_providers/x402search/
  • Single action: search_apis(query, limit)
  • Payment handled automatically via existing x402_requests client (same pattern as the existing x402 provider)
  • Cost: $0.01 USDC per query on Base mainnet (eip155:8453)
  • No new dependencies — reuses x402 SDK already in the repo

Usage

from coinbase_agentkit.action_providers.x402search import x402search_action_provider

agentkit = AgentKit(AgentKitConfig(
    wallet_provider=CdpWalletProvider(cdp_config),
    action_providers=[x402search_action_provider()],
))

Related

@x402-index x402-index requested a review from murrlincoln as a code owner March 20, 2026 07:39
@cb-heimdall
Copy link

cb-heimdall commented Mar 20, 2026

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 1
Sum 2

x402-index and others added 2 commits March 21, 2026 16:18
…it__.py conflict

Keep x402search exports alongside all new exports from main.
Drop duplicate X402Config entry (already present earlier in __all__).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fix response parsing: map resource_url→url, rank→rank, accepts array
Add client-side domain dedup: max 2 results per netloc before slice
Pass limit=50 to server so dedup has sufficient candidates
Fix test script: use blastapi RPC, add delays between queries

The public GET /v1/search endpoint on the server was also fixed (separately)
to match POST /v1/search-acp: identical query expansion, OR/AND hybrid
logic, dev URL filters, and domain dedup across all three search handlers.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action provider New action provider documentation Improvements or additions to documentation python

Development

Successfully merging this pull request may close these issues.

2 participants