Skip to content

kataenda/deepresearch-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DeepResearch Agent

A paid, callable AI research agent built on CROO CAP for the CROO Agent Hackathon.

Send a research query → receive a fully-sourced report, settled in USDC on Base.

Track: Research & Intelligence Agents


What it does

DeepResearch Agent accepts a research query from any human or agent via CAP, searches the web using Tavily, synthesizes findings with Claude, and returns a structured Markdown report with cited sources — all settled on-chain.

Caller (human or agent)
  └─[CAP]──► DeepResearch Agent
               ├── Web search (Tavily, 8 sources)
               ├── Synthesis (Claude claude-sonnet-4-6)
               └─[CAP]──► Structured report + sources
                           Settlement: USDC on Base

Output format

{
  "query": "what is the current state of AI agents in 2026?",
  "report": "## Executive Summary\n...",
  "sources": [
    { "url": "https://...", "title": "..." }
  ],
  "source_count": 8,
  "model": "claude-sonnet-4-6"
}

Setup

Prerequisites

1. Clone and install

git clone https://github.com/YOUR_USERNAME/deepresearch-agent
cd deepresearch-agent
pip install -r requirements.txt

2. Configure environment

cp .env.example .env
# Edit .env with your credentials
Variable Where to get it
CROO_SDK_KEY CROO Agent Store dashboard after registering your agent
ANTHROPIC_API_KEY console.anthropic.com
TAVILY_API_KEY app.tavily.com

3. Register on CROO Agent Store

  1. Go to agent.croo.network → Register Agent
  2. Set service details:
    • Name: DeepResearch Agent
    • Price: 1–5 USDC per query (your choice)
    • Description: AI research agent — sends back a fully-sourced report
    • Input format: { "query": "your research question" }
    • Output format: Text (structured JSON)
  3. Copy your CROO_SDK_KEY into .env

4. Run the agent

python run.py

The agent connects via WebSocket and listens for orders. It auto-accepts negotiations and delivers reports on payment.


CAP SDK Methods Used

Method Purpose
AgentClient(api_key, config) Authenticate with CROO network
connect_websocket() Subscribe to real-time order events
ws.on("negotiation_created", ...) Handle incoming order negotiations
ws.on("order_paid", ...) Trigger research on payment confirmation
accept_negotiation(negotiation_id) Accept negotiation → create on-chain order
get_order(order_id) Fetch order details and input data
deliver_order(order_id, deliverable_type, deliverable_text) Deliver report → trigger USDC settlement
reject_order(order_id, reason) Reject invalid orders gracefully
get_delivery(order_id) Fetch the delivery record (requester side)

Call this agent via MCP (Claude Desktop / Cursor)

Configure mcp.json with your CROO_SDK_KEY and ask Claude:

"Hire the DeepResearch agent to research quantum computing trends."

Claude will call negotiate_orderpay_order → poll get_delivery automatically.

{
  "mcpServers": {
    "croo": {
      "command": "npx",
      "args": ["-y", "@croo-network/mcp-server"],
      "env": {
        "CROO_SDK_KEY": "croo_sk_...",
        "CROO_API_URL": "https://api.croo.network",
        "CROO_WS_URL": "wss://api.croo.network/ws"
      }
    }
  }
}

See mcp.json for the ready-to-use config file.


A2A Composability

Other agents can hire DeepResearch as a dependency. Example use cases:

  • Content Writer Agent → hires DeepResearch for factual grounding before writing
  • DeFi Monitor Agent → hires DeepResearch to analyze protocols before alerting
  • Developer Tooling Agent → hires DeepResearch for library/API research

See examples/client_example.py for how another agent calls this one via Python SDK.


Project structure

deepresearch-agent/
├── agent/
│   ├── config.py           # Settings from environment variables
│   ├── researcher.py       # Web search (Tavily) + synthesis (Claude)
│   └── main.py             # CROO CAP provider — WebSocket listener
├── examples/
│   └── client_example.py   # Requester agent example (Python SDK)
├── run.py                  # Entrypoint
├── mcp.json                # MCP config for Claude Desktop / Cursor
├── requirements.txt
└── .env.example

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages