Files
GandClaude Fable 5 e9f0193937 fix(ai): replace retired Claude model defaults (#123)
- providers.py: claude-sonnet-4-20250514 (deprecated, retires Jun 2026) -> claude-sonnet-5
- constants.ts: anthropic/claude-3.5-sonnet (retired Oct 2025 on OpenRouter) -> anthropic/claude-sonnet-5 (verified against OpenRouter's live model list)
- test fixtures updated to match

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 16:38:13 +02:00
..

Nerd Research Agent

Multi-provider research assistant - backend for the Nerd bot.

Providers

Provider Cost Setup
Ollama FREE Local, runs on your machine
Groq FREE tier Cloud, fast inference
Anthropic Paid Claude API

Quick Start

cd agents/research-agent
source venv/bin/activate

# Option 1: Ollama (free, local)
ollama serve &
ollama pull llama3.1
python -m src.agent "your research topic"

# Option 2: Groq (free tier)
echo "RESEARCH_PROVIDER=groq" > .env
echo "GROQ_API_KEY=your-key" >> .env
python -m src.agent "your research topic"

Usage

CLI

python -m src.agent "Latest advances in RAG"
python -m src.agent "Knowledge graphs" --deep  # Big Discovery Mode

Python

from src import research
import anyio

# Quick research
anyio.run(research("Your topic", depth="quick"))

# Deep research with Big Discovery Mode
anyio.run(research("Your topic", depth="deep"))

Interactive Session

from src import ResearchAgent
import anyio

async def main():
    agent = ResearchAgent()
    await agent.ask("What are the main approaches to RAG?")
    await agent.ask("How do knowledge graphs fit in?")
    await agent.discover("Novel improvements to RAG?")

anyio.run(main)

Configuration

Set in .env or environment:

RESEARCH_PROVIDER=ollama    # ollama, groq, anthropic
RESEARCH_MODEL=llama3.1     # Override default model
GROQ_API_KEY=xxx            # For Groq
ANTHROPIC_API_KEY=xxx       # For Anthropic

Features

  • Multi-provider: Switch with one env var
  • Big Discovery Mode: Find novel connections
  • Streaming: Real-time output
  • Stateful sessions: Multi-turn conversations