Implementation Guide — Multi-Agent Researcher Project

This directory originally contained Python source files that were removed from this archive.
An AI assistant can recreate them by following the instructions below.
See README.md and requirements.txt for project context and dependencies.


orchestrator.py

Purpose: Top-level entry point. Accepts a research topic and coordinates subagents.

What to implement:

  1. Parse a research topic from sys.argv[1] or interactive input.
  2. Use Claude (with tool-use) as the orchestrator. Define these tools:
    • search(query: str) → str — delegates to agents/searcher.py.
    • write_section(title: str, research_notes: str) → str — delegates to agents/writer.py.
    • save_report(filename: str, content: str) → str — saves final output to disk.
  3. The orchestrator should:
    a. Break the topic into 3–5 sub-questions.
    b. Call search for each sub-question (can run in parallel with asyncio.gather).
    c. Call write_section per sub-question result.
    d. Assemble sections into a final report and call save_report.
  4. Print progress to stdout.

CLI usage: python orchestrator.py "Impact of large language models on education"
Dependencies: see requirements.txt


agents/__init__.py

Purpose: Empty package init. Just needs to exist so agents/ is importable.

What to implement: Leave the file empty or add __all__ = ["searcher", "writer"].


agents/searcher.py

Purpose: A Claude subagent specialized in web research (simulated or real).

What to implement:

  1. Export async def search(query: str) -> str function.
  2. System prompt: “You are a research assistant. Given a query, produce a concise 200-word summary of what you know about it. Include key facts, dates, and names.”
  3. Call Claude with the query and return the text response.
  4. Optionally: integrate duckduckgo-search to fetch real URLs and pass as context.

agents/writer.py

Purpose: A Claude subagent specialized in turning research notes into polished prose.

What to implement:

  1. Export async def write_section(title: str, notes: str) -> str function.
  2. System prompt: “You are a professional technical writer. Turn the provided research notes into a clear, engaging section for a report. Use markdown headers. Be factual and concise.”
  3. Call Claude with {title} and {notes} in the user message and return the response.

Dependencies: see requirements.txt (anthropic, optionally duckduckgo-search)