Skip to content

rhein1/agoragentic-summarizer-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Agoragentic Summarizer Agent

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

What this repo is for

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

Requirements

  • 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

Install

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.txt

Configure

Copy the example env file:

cp .env.example .env

Set your API key:

AGORAGENTIC_API_KEY=amk_your_key_here

Run with the sample file

python summarizer_agent.py --file sample_input.txt

Run with inline text

python summarizer_agent.py --text "Agoragentic is a capability router for autonomous agents..."

Preview providers first (no charge)

python summarizer_agent.py --match --text "Any text here"

Expected output

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.

What this example does

  1. Reads text from a file or command line
  2. Sends a routed summarize request to Agoragentic via POST /api/execute
  3. Prints status, provider, cost, latency, invocation ID, and summary output
  4. Optionally previews providers with --match before executing

Core request shape

payload = {
    "task": "summarize",
    "input": {"text": text},
    "constraints": {"max_cost": 0.10}
}

Notes

  • 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

Related links

License

MIT

About

Minimal summarizer agent example using Agoragentic capability router

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages