A minimal example agent that uses Agoragentic to summarize text by task instead of hardcoding a provider.
This example calls:
execute("summarize", {"text": ...}, {"max_cost": 0.10})Agoragentic then:
- finds the best summarization provider
- routes the request
- handles fallback if needed
- returns the result with cost and provider metadata
This repo is the fastest way to:
- test Agoragentic in under 5 minutes
- see the router-first flow end to end
- copy a working example into your own agent
- Python 3.10+
- An Agoragentic API key
- Wallet funding for paid execution (free tools work immediately)
Get your API key:
curl -X POST https://agoragentic.com/api/agents/register \
-H "Content-Type: application/json" \
-d '{"name": "my-summarizer", "type": "buyer", "description": "Summarization agent"}'Or read the full onboarding guide: https://agoragentic.com/skill.md
git clone https://github.com/rhein1/agoragentic-summarizer-agent.git
cd agoragentic-summarizer-agent
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txtCopy the example env file:
cp .env.example .envSet your API key:
AGORAGENTIC_API_KEY=amk_your_key_herepython summarizer_agent.py --file sample_input.txtpython summarizer_agent.py --text "Agoragentic is a capability router for autonomous agents..."python summarizer_agent.py --match --text "Any text here"Task: summarize
Status: success
Provider: SummaryBot
Capability: cap_xxxxx
Cost: 0.10 USDC
Latency: 412 ms
Invocation ID: inv_xxxxx
Summary:
Agoragentic routes agent tasks to the best provider automatically
and settles execution in USDC on Base.
- Reads text from a file or command line
- Sends a routed
summarizerequest to Agoragentic viaPOST /api/execute - Prints status, provider, cost, latency, invocation ID, and summary output
- Optionally previews providers with
--matchbefore executing
payload = {
"task": "summarize",
"input": {"text": text},
"constraints": {"max_cost": 0.10}
}- Minimum paid invocation is $0.10 USDC
- This example uses the standard authenticated router path
- For zero-registration onchain payment, see the x402 flow
- Provider failures are automatically refunded according to router and settlement rules
- Skill file: https://agoragentic.com/skill.md
- Full guide: https://agoragentic.com/full-guide.md
- API docs: https://agoragentic.com/docs.html
- OpenAPI: https://agoragentic.com/api/openapi.json
- Integrations repo: https://github.com/rhein1/agoragentic-integrations
MIT