ai_lab is a framework for building LLM-powered research labs that simulate collaborative scientific workflows. It enables automated team formation, structured meetings, and tool-augmented reasoning for research projects.
- LLM-based Agents: Simulate Principal Investigator, Scientific Critic, and domain experts as agents powered by large language models.
- Automated Team Selection: Dynamically select team members and assign tools based on project requirements.
- Structured Meetings: Run individual and team meetings with agenda, rules, context, and critical review.
- Tool Integration: Agents can use external tools (Arxiv search, Python execution, Pandas, DuckDuckGo, etc.) for research tasks.
- Flexible Prompts: Easily customize agent roles, instructions, and meeting formats.
See example_usage.ipynb for a full workflow.
from agno.models.ollama import Ollama
from research_agent import ResLab
model = Ollama(id="gpt-oss:20b", options={"num_ctx": 131072, "num_predict": -1}, keep_alive=-1)
project = "Build a simple, reproducible ML pipeline that classifies Iris species from 4 numeric features using only CPU, finishes in minutes, and ships a short report + code."
lab = ResLab(project, model)
lab.generate_team(3)
answer = lab.run_team_meeting(
agenda="Project specification & tool choices for the Iris classifier.",
agenda_questions=[
"Which models will we compare first?",
"What preprocessing is required?",
"What CV protocol & metrics will we use, and why?",
"What constitutes success/failure (numerical threshold + time limit)",
"What are common failure modes to guard against?"
]
)
print(answer)research_agent.py: Implements ResLab and Scientist agent classes.
prompts.py: Defines agent roles and prompt templates.
tools.py: Registers available tools and provides selection logic.
See requirements.txt for dependencies. Requires Python 3.10+.
Run Jupyter notebooks for interactive experiments.
Extend agent roles and tools in prompts.py and tools.py.
Integrate with any LLM supported by agno.
For more details, see example_usage.ipynb.