Dream Team is a dynamic multi-agent framework with evolving personas. Agents start with general expertise and progressively specialize based on:
- Performance bottlenecks and error patterns
- Research paper integration (Semantic Scholar)
- Knowledge gaps discovered during collaboration
- Domain-specific challenges encountered
Agents don't have fixed personasβthey evolve their expertise as research progresses:
- Start as generalists (e.g., "Data Scientist")
- Evolve into specialists (e.g., "Perishable Goods Physicist" with thermal abuse modeling expertise)
- Track complete evolution history and knowledge accumulation
Agents autonomously research topics using Semantic Scholar:
- LLM analyzes paper relevance and extracts actionable insights
- Key findings integrated into agent knowledge bases
- Techniques from papers applied to solve challenges
Automatic detection of when agents need to evolve:
- Performance Plateau: Metrics stop improving
- Error Patterns: Specific failure modes concentrated
- Knowledge Gaps: Agents express uncertainty in meetings
Fast iteration optimized for well-defined problems:
- Clear evaluation metrics (MAE, F1, RMSE)
- Leaderboard-driven hill climbing
- Observable progress tracking
Agents operate with full autonomy:
- Code Generation: Agents write their own Python code
- Execution: Safe code execution environment
- Self-Iteration: Analyze results and adjust approach
- Zero Handholding: Give agents problem + data, they do the rest
Run a complete autonomous experiment with LangGraph orchestration:
# Quick example with tracing
python scripts/run_with_tracing.py
# Or run your own experiment
cd experiments/agentds_food
python run_autonomous_experiment.pyThe graph autonomously:
- Bootstrap: PI explores problem and recruits specialized team
- Plan: Team collaborates on approach
- Code: Generate executable Python code
- Execute: Run code in safe environment
- Evaluate: Extract metrics and analyze results
- Evolve: Adapt team composition when stuck
- Iterate: Repeat until goal achieved
from dream_team.experiment import (
create_initial_state,
AgentConfig,
run_graph_experiment
)
# 1. Configure agents
team_lead = AgentConfig(
title="Principal Investigator",
expertise="machine learning, experimental design, research methodology",
goal="optimize the target metric through systematic experimentation",
role="explore problem, recruit team, coordinate research"
)
coding_agent = AgentConfig(
title="Research Engineer",
expertise="Python, pandas, scikit-learn, numpy, data analysis",
goal="implement research plans accurately",
role="translate strategies into executable code"
)
# 2. Create initial state
state = create_initial_state(
team_lead=team_lead,
coding_agent=coding_agent,
problem_statement="""
Predict the target variable using available features.
Evaluation Metric: MAE (Mean Absolute Error) - lower is better
Goal: Build a predictive model to minimize MAE.
""",
target_metric="mae",
minimize_metric=True,
max_iterations=10,
results_dir="results/experiment"
)
# 3. Prepare data
data_context = {
'train_df': train_df, # Your training data
'test_df': test_df # Your test data
}
# 4. Run graph with optional LangSmith tracing
final_state = run_graph_experiment(
state,
data_context,
enable_tracing=True, # Optional: Full observability in LangSmith
langsmith_project="my-experiments"
)
# 5. Access results
print(f"Best {final_state.config.target_metric}: {final_state.best_metric}")
print(f"Iterations: {final_state.iteration}")
print(f"Team size: {len(final_state.team.team_members) + 1}")For direct access to individual components:
from dream_team import Agent, TeamMeeting, EvolutionEngine, get_research_assistant
# Create agents
pi = Agent(
title="Principal Investigator",
expertise="data science, ML, research strategy",
goal="solve the prediction challenge",
role="lead team and make decisions"
)
# Run team meeting
meeting = TeamMeeting(save_dir="results/meetings")
summary = meeting.run(
team_lead=pi,
team_members=[data_scientist],
agenda="Predict shelf life using temperature data",
num_rounds=2
)
# Research papers
research = get_research_assistant()
papers = research.research_topic(
query="shelf life prediction food storage",
num_papers=5
)
# Evolve agent
evolution = EvolutionEngine()
evolution.evolve_agent(
agent=data_scientist,
context={"problem": "Shelf life prediction"},
papers=papers,
trigger_reason="Need domain expertise"
)src/dream_team/
βββ experiment/ # LangGraph-based orchestration (NEW)
β βββ state.py # ExperimentState, AgentConfig (Pydantic models)
β βββ graph_app.py # Graph construction and runner
β βββ nodes.py # All node implementations
β βββ tracing.py # LangSmith integration
β βββ __init__.py # Public API
βββ agent.py # Agent, KnowledgeBase, Paper classes
βββ llm.py # Gemini API wrapper
βββ research.py # Semantic Scholar integration
βββ evolution.py # Evolution engine and triggers
βββ meetings.py # Team and individual meetings
βββ executor.py # Code execution environment
βββ orchestrator.py # (Deprecated - use experiment/ instead)
βββ utils.py # Helper functions
scripts/
βββ run_with_tracing.py # Example with LangSmith tracing
βββ smoke_run.py # Baseline test
βββ test_graph_skeleton.py # Graph structure test
tests/
βββ test_nodes.py # Unit tests for nodes
βββ test_graph_integration.py # Integration tests
experiments/agentds_food/
βββ data/ # Benchmark data
βββ results/ # Evolution history, meetings, experiments
βββ run_autonomous_experiment.py
Graph Flow:
START β bootstrap β init_math β plan β code β execute β evaluate
β β
βββ [evolve?] β check βββ
Each node accepts and returns ExperimentState, enabling full observability and checkpointing.
Migrating from old API? See MIGRATION_GUIDE.md for step-by-step instructions.
Full observability into experiment execution:
export LANGSMITH_API_KEY=your_key
python scripts/run_with_tracing.pyView traces at https://smith.langchain.com/ to see:
- Each node execution (bootstrap, plan, code, execute, etc.)
- Iteration progress and metrics evolution
- Team composition changes
- Evolution decisions and triggers
- Timing for each step
All experiment state is now explicit and type-safe:
final_state.iteration # Current iteration number
final_state.best_metric # Best metric achieved
final_state.team # Current team composition
final_state.history # Complete iteration history
final_state.evolution # Evolution state and decisionsThe ExperimentState Pydantic model provides:
- Type safety with validation
- Serializable state for checkpointing
- Autocomplete support in IDEs
- Single source of truth
# Clone the repository
git clone https://github.com/sri299792458/dream-team.git
cd dream-team
# Install dependencies
pip install -e .
# Optional: Install extras for experiments
pip install -e ".[dream-team]"# Set Gemini API key (free tier available)
export GEMINI_API_KEY=your_key_hereDream Team is being applied to the AgentDS Food Production domain:
- Shelf Life Prediction - Predict remaining days (MAE metric)
- Quality Control - Pass/fail classification (Macro-F1)
- Weekly Demand Forecasting - Units sold prediction (RMSE)
See experiments/agentds_food/ for the evolving research prototype.
A multi-agent system that can evolve its agents learns to solve problems at a meta-levelβnot just solving Task X, but learning how to become the type of team that solves tasks like X.
The framework enables:
- Emergent expertise: Agents discover what specialization is needed
- Research-driven evolution: Paper insights drive persona synthesis
- Observable learning: Complete history of evolution, decisions, and knowledge growth
MIT License - see LICENSE file for details.
If you use Dream Team in your research, please cite:
@software{dream_team_2024,
title={Dream Team: A Dynamic Multi-Agent Framework with Evolving Personas},
author={Sri},
year={2024},
url={https://github.com/sri299792458/dream-team}
}