Skip to content

dendrux/research-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Research Agent

A multi-agent research assistant built with Dendrux. Demonstrates the agent-as-tool pattern — an orchestrator agent delegates to specialist sub-agents, each with their own tools, prompts, and reasoning loops.

Built with Claude Code and Codex.

Architecture

Orchestrator (ResearchOrchestrator)
  |
  +-- research_topic(query)     --> SearchAgent --> Firecrawl search
  +-- deep_read(url)            --> ScrapeAgent --> Firecrawl scrape
  +-- save_report(filename)     --> writes .md to output/

Each sub-agent is a full Dendrux Agent with its own system prompt, LLM calls, and reasoning loop. The orchestrator sees them as regular tools.

Setup

pip install -r requirements.txt
cp .env.example .env
# Add your API keys to .env

Get a Firecrawl API key at firecrawl.dev (free tier available).

Run

python main.py "quantum computing breakthroughs 2025"

The orchestrator will:

  1. Break the topic into focused queries
  2. Delegate each to a SearchAgent (max 3 searches)
  3. Optionally deep-read promising URLs via ScrapeAgent (max 2 reads)
  4. Synthesize findings into a markdown report
  5. Save to output/<topic>.md

What It Shows

  • Agent-as-tool composition — sub-agents run inside @tool() functions
  • max_calls_per_run — runtime-enforced tool call limits (no manual counters)
  • timeout_seconds — explicit timeouts for long-running sub-agent tools
  • ConsoleObserver — rich terminal output showing iterations, tool calls, and summary
  • Multi-provider — swap OpenAIProviderAnthropicProvider in one line

Swap Provider

# OpenAI (default)
from dendrux.llm.openai import OpenAIProvider
provider = OpenAIProvider(model="gpt-4o", timeout=300)

# Anthropic
from dendrux.llm.anthropic import AnthropicProvider
provider = AnthropicProvider(model="claude-sonnet-4-6", timeout=300)

# Local model (vLLM / SGLang)
provider = OpenAIProvider(model="llama-3-70b", base_url="http://localhost:8000/v1")

Inspect Runs

dendrux dashboard

Files

research-agent/
├── main.py                  # Orchestrator agent + entry point
├── agents/
│   ├── search_agent.py      # SearchAgent: query → Firecrawl search → summary
│   └── scrape_agent.py      # ScrapeAgent: URL → Firecrawl scrape → summary
├── tools/
│   └── firecrawl_tools.py   # Raw Firecrawl SDK wrappers
├── output/                  # Generated reports (gitignored)
├── requirements.txt
└── .env.example

License

Apache 2.0

About

Multi-agent research assistant built with Dendrux

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages