A sophisticated multi-agent AI research assistant built with the OpenAI Agents SDK and Olostep Web API. This system orchestrates multiple specialized agents to produce grounded, source-based research reports.
- Manager Agent: Orchestrates the research workflow and coordinates specialist agents
- Judge Agent: Evaluates the quality of gathered evidence against user requirements
- Analyst Agent: Produces polished, professional Markdown research reports
- Web Research Tools: Integrates Olostep APIs for searching, scraping, and answering queries
- Progressive Research: Starts with quick answers and conducts deeper research only when needed
- Structured Output: Returns well-formatted Markdown reports with citations and references
- Full Tracing: OpenAI trace viewer integration for debugging and monitoring
circulator/
├── main.py # Entry point for running the assistant
├── research_assistant.py # Core implementation
├── pyproject.toml # Project dependencies
├── .env # API keys (create this file)
├── .gitignore # Git ignore rules
├── README.md # This file
└── Results/ # Output reports (auto-created, ignored by Git)
- Python 3.13+
uvpackage manager (https://astral.sh/uv/)- OpenAI API key (with gpt-5.4-mini model access)
- Olostep API key (free tier available at https://www.olostep.com/)
-
Clone or navigate to the project:
cd circulator -
Create
.envfile with your API keys:OPENAI_API_KEY=your_openai_api_key_here OLOSTEP_API_KEY=your_olostep_api_key_here
-
Virtual environment (already initialized with
uv init):# Dependencies are already installed, verify with: uv pip list
uv run main.pyThe assistant will prompt you to enter your research question. Type your query and press Enter twice to submit:
================================================================================
Multi-Agent AI Research Assistant
================================================================================
Enter your research question below.
(Press Enter twice to submit)
What are the latest developments in AI agents?
[Press Enter twice to submit...]
Reports are automatically saved to the Results/ directory with:
- Filename format:
YYYY-MM-DD <truncated-slug>.md - Smart slug truncation: The question slug is intelligently truncated to 100 characters max while preserving complete words, keeping the total filename well under Windows' 255-character limit
- Content format: Each report includes:
- The original research query at the top (in "Research Query" section)
- A divider line
- The full research report with all sections
Example filenames:
- Short question:
2026-07-14 python-data-science-benefits.md - Long question:
2026-07-14 latest-developments-ai-agents-business-research.md(truncated intelligently)
Key benefits of this approach:
- Date-based: Chronological organization in the file system
- Meaningful slug: Can identify the research topic from the filename
- Windows-safe: Always stays under 255-character filename limit
- Full context preserved: Original query is in the report content
Example report content:
# Research Query
What are the latest developments in AI agents for business research?
---
[Full research report with Executive Summary, Key Findings, etc.]The Results/ directory is ignored by Git for privacy and to keep the repository clean.
To use the assistant with your own research question, modify main.py:
query = "Your research question here"
report = await run_research_assistant(query)import asyncio
from research_assistant import run_research_assistant
async def my_research():
query = "What is the latest in quantum computing?"
report = await run_research_assistant(query)
print(report.markdown_report)
asyncio.run(my_research())The research assistant follows this intelligent workflow:
- Initial Answer: Calls Olostep Answer API for a quick initial response
- First Quality Check: Judge agent evaluates if evidence is sufficient
- If Needed - Deeper Search: Executes search with scraping for richer content
- Second Quality Check: Judge agent re-evaluates gathered evidence
- If Still Needed - Targeted Research: Runs multiple targeted searches and scrapes top results
- Report Generation: Analyst agent produces the final Markdown report
This progressive approach balances speed and cost while ensuring high-quality output.
- Visit https://platform.openai.com/
- Go to API keys section
- Create a new key and add it to
.env - Ensure your account has billing enabled and at least $5 in credits
- Visit https://www.olostep.com/
- Create a free account (no credit card required)
- Generate an API key from your dashboard
- Free plan includes 500 successful requests
- openai-agents: OpenAI's agent framework
- olostep: Web search and scraping API
- pydantic: Data validation and structured outputs
- python-dotenv: Environment variable management
- jupyter: Optional, for notebook-based experimentation
View the full execution trace:
- Run the assistant - it will print a trace URL
- Open the URL in your browser:
https://platform.openai.com/logs/trace?trace_id=... - Inspect manager decisions, agent calls, tool usage, and API interactions
The research assistant produces a Markdown report with:
- Executive Summary: High-level overview
- Key Findings: Main insights
- Context: Background information
- Evidence Review: Source analysis
- Detailed Analysis: In-depth examination
- Implications: Significance and impact
- Source Notes: Quality assessment of sources
- References: Complete bibliography with links
Ensure your .env file has both OPENAI_API_KEY and OLOSTEP_API_KEY.
Run uv pip list to verify dependencies. If missing, run uv add <package_name>.
The assistant may conduct multiple API calls. First run typically takes 30-60 seconds. Monitor progress via OpenAI trace.
This project is provided as-is for educational and research purposes.
Suggestions and improvements welcome! Feel free to extend the implementation with:
- Additional specialist agents
- Custom tools for specific domains
- Different output formats
- Performance optimizations