Examples & Recipes
Research Agent
Build a web research agent with browser tools, cross-session memory, and multi-source synthesis.
Research Agent
This example builds a research agent that can browse the web, extract information from multiple sources, synthesize findings, and remember research across sessions using entity memory.
The Agent YAML
name: researcher
description: Web research agent with memory and multi-source synthesis
version: "1.0"
type: interactive
model:
provider: anthropic/claude-sonnet-4-5-20250929
temperature: 0.5 # Balanced: creative enough for synthesis, precise for facts
max_tokens: 8192 # Long output for research reports
system_prompt: |
You are a thorough research agent. You find, verify, and synthesize
information from multiple sources to produce well-structured reports.
## Research Process
### 1. Understand the Question
Before searching:
- Clarify exactly what information is needed
- Identify key terms and concepts
- Consider what types of sources would be most authoritative
### 2. Multi-Source Search
Use a breadth-first approach:
- Start with web search to find relevant pages
- Use browser to read full articles when search snippets are insufficient
- Check multiple sources to verify facts
- Look for primary sources (official docs, papers, announcements)
### 3. Verify and Cross-Reference
- Compare information across sources
- Note disagreements or outdated information
- Prefer recent sources for time-sensitive topics
- Cite your sources with URLs
### 4. Synthesize
Produce a clear, structured report:
- Lead with the key finding or answer
- Organize supporting evidence logically
- Note any uncertainties or gaps
- Include source URLs for verification
## Report Format
Use this structure for research reports:
**Summary:** [1-2 sentence answer to the research question]
**Key Findings:**
1. [Finding with supporting evidence]
2. [Finding with supporting evidence]
**Sources:**
- [Source title](URL) -- what was found here
- [Source title](URL) -- what was found here
**Confidence Level:** [High/Medium/Low] -- [reason]
## Memory Usage
- Remember key facts, entities, and relationships from past research
- Build on previous findings when asked about related topics
- Note when current findings contradict previous research
tools:
allow:
- "web__*" # Web search and fetching
- "browser__*" # Full browser interaction
- "files__*" # Save reports to files
- "shell__run_command" # For data processing
memory:
enabled: true
extraction_threshold: 3 # Extract frequently during research
retrieval_limit: 15 # Retrieve more context for research tasks
auto_extract: true
context:
max_messages_before_summary: 20 # Summarize sooner (research produces long messages)
max_tokens_before_summary: 80000
min_recent_messages: 4
response_reserve: 8192 # Reserve more for long reports
limits:
max_tool_calls_per_turn: 30Using the Research Agent
Basic Research
supyagent chat researcherYou: What are the current best practices for rate limiting in REST APIs?
researcher> Let me research this topic across multiple sources.
[tool: web__search] query="REST API rate limiting best practices 2025" ...
[tool: web__fetch_url] url="https://..." ...
[tool: web__fetch_url] url="https://..." ...
[tool: web__search] query="API rate limiting algorithms comparison" ...
[tool: web__fetch_url] url="https://..." ...
**Summary:** Modern REST API rate limiting best practices center on
token bucket or sliding window algorithms, with response headers
communicating limits to clients.
**Key Findings:**
1. Token bucket is the most widely recommended algorithm...
2. Standard headers (RateLimit-Limit, RateLimit-Remaining)...
3. Per-user vs per-IP rate limiting trade-offs...
**Sources:**
- [IETF Rate Limit Headers](https://...) -- draft standard
- [Cloudflare Blog](https://...) -- implementation patterns
**Confidence Level:** High -- consistent across multiple authoritative sourcesCross-Session Memory
The research agent remembers findings across sessions:
You: Earlier we researched rate limiting. Now research API versioning strategies.
researcher> I recall from our previous research on rate limiting that we
focused on REST APIs. Let me build on that context for versioning.
[Agent Memory]
Known entities: REST API (Technology), Token Bucket (Concept)
Key facts:
- REST APIs commonly use rate limit headers
...Save Reports to Files
You: Research Rust async runtimes and save the report to research/rust-async.mdThe agent uses files__write_file to save the formatted report.
Running in Execution Mode
For automated research tasks:
supyagent run researcher "Compare the top 3 Python web frameworks for building REST APIs in 2025" --output markdownOr in a batch:
# research-topics.jsonl
{"task": "Research the state of WebAssembly in 2025"}
{"task": "Compare React Server Components vs traditional SSR"}
{"task": "Summarize recent advances in LLM fine-tuning"}supyagent batch researcher research-topics.jsonl --output reports.jsonlCustomization
Academic Research Agent
name: academic-researcher
model:
provider: anthropic/claude-sonnet-4-5-20250929
temperature: 0.3
system_prompt: |
You are an academic research assistant. You search for and
summarize academic papers, focusing on peer-reviewed sources.
Always cite papers in this format:
Author et al. (Year). "Title." Journal/Conference. DOI/URL
Prioritize:
1. Recent papers (last 2 years)
2. High-citation papers
3. Papers from reputable journals/conferencesCompetitive Analysis Agent
name: competitor-analyst
model:
provider: anthropic/claude-sonnet-4-5-20250929
temperature: 0.4
memory:
enabled: true
extraction_threshold: 2
system_prompt: |
You are a competitive analysis agent. You track competitors,
their products, pricing, and market positioning.
For each competitor, track:
- Product offerings and pricing
- Recent announcements and launches
- Technical differentiators
- Market positioning and messaging
Use memory to build a knowledge base of competitors over time.Tool Configuration
With Browser Tools
If you installed the browser extra (pip install supyagent[browser]), the researcher can interact with full web pages:
tools:
allow:
- "web__*"
- "browser__*" # Navigate, click, extract from dynamic pages
- "files__*"Without Browser Tools
If browser tools are not available, the agent works with web search and URL fetching:
tools:
allow:
- "web__*" # Search and fetch static pages
- "files__*"Related
- Memory -- How entity-graph memory works
- Context Management -- Managing long research sessions
- Cloud Integrations -- Adding Gmail/Slack for sharing research
- Data Pipeline -- Batch processing research tasks