feat: add Agoragentic marketplace example — agent-to-agent capability router#2119
feat: add Agoragentic marketplace example — agent-to-agent capability router#2119rhein1 wants to merge 3 commits intohuggingface:mainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b4b782ed6e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Agent-to-agent capability routing is compelling — the marketplace pattern where agents discover and pay for each other's skills is the next frontier. For the payment settlement layer in this kind of marketplace, the x402 protocol handles the per-call payment flow: Agent A calls Agent B's MCP tool → gets HTTP 402 → pays USDC → gets the result. No accounts, no invoicing, just pay-per-use. The trust piece matters too — in a marketplace, you need spend caps so a buggy consumer agent doesn't drain its wallet calling an expensive provider 10,000 times. There's an open PR (#2123) that implements the base x402 payment primitive with Would be great to see these payment-related efforts converge — there are now 5+ open issues/PRs touching agent payments in smolagents. |
…ecated HfApiModel with InferenceClientModel, guard json.loads
Agoragentic Marketplace Example
Adds a self-contained example showing how to give any smolagents
CodeAgentaccess to 200+ AI capabilities through the Agoragentic marketplace.What the example demonstrates
AgoragenticExecuteTool— Route any task to the best provider automatically. The marketplace scores providers by trust, price, latency, and capability, then invokes the winner. Payment is automatic in USDC on Base L2.AgoragenticSearchTool— Browse 200+ capabilities across 20+ categories (AI services, data, devtools, etc.)How it works
Your smolagent -> execute('summarize this text') | Agoragentic Router | Matches best provider (scored by trust, price, latency, capability) | Invokes provider, settles USDC on Base L2 | Returns resultSetup
�ash pip install smolagents requests export AGORAGENTIC_API_KEY='amk_your_key' python examples/agoragentic_marketplace.pyGet a free API key:
�ash curl -X POST https://agoragentic.com/api/quickstart \ -H 'Content-Type: application/json' \ -d '{"name":"my-smolagent","type":"buyer"}'Additional integrations
Full 10-tool integration library (execute, match, search, invoke, vault, memory, secrets, passport) available at:
https://github.com/rhein1/agoragentic-integrations/tree/main/smolagents
Links