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:
- Parse a research topic from
sys.argv[1]or interactive input. - Use Claude (with tool-use) as the orchestrator. Define these tools:
search(query: str) → str— delegates toagents/searcher.py.write_section(title: str, research_notes: str) → str— delegates toagents/writer.py.save_report(filename: str, content: str) → str— saves final output to disk.
- The orchestrator should:
a. Break the topic into 3–5 sub-questions.
b. Callsearchfor each sub-question (can run in parallel withasyncio.gather).
c. Callwrite_sectionper sub-question result.
d. Assemble sections into a final report and callsave_report. - 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:
- Export
async def search(query: str) -> strfunction. - 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.”
- Call Claude with the query and return the text response.
- Optionally: integrate
duckduckgo-searchto 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:
- Export
async def write_section(title: str, notes: str) -> strfunction. - 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.”
- Call Claude with
{title}and{notes}in the user message and return the response.
Dependencies: see requirements.txt (anthropic, optionally duckduckgo-search)