Multi-agent ML pipeline — automated machine learning powered by LangGraph and LLMs.
AgenticML assembles a team of specialised AI agents (Planner, Profiler, Cleaner, Featurizer, Modeler, Evaluator, Critic, Reporter) that collaborate iteratively to build, evaluate, and refine ML models on your data.
pip install swayammlOptional providers (only install the one you use):
pip install swayamml[anthropic] # Claude models
pip install swayamml[google] # Gemini models
pip install swayamml[boost] # XGBoost + LightGBM
pip install swayamml[all] # Everythingfrom agenticml import ml
# Minimal — target and problem type are auto-detected
result = ml.run("data.csv")
# Explicit options
result = ml.run(
"data.csv",
target="price",
problem_type="regression",
metric="rmse",
model="gpt-4o", # or "claude-3-sonnet-20240229", "gemini-pro"
api_key="sk-...", # optional — falls back to env var
verbose=True, # print LLM prompts & responses
max_iterations=3,
)# Uses OPENAI_API_KEY from environment
agenticml --file data.csv --target price --verbose
# Specify model and key
agenticml --file data.csv --model claude-3-sonnet-20240229 --api-key sk-ant-...
# All options
agenticml --file data.csv \
--target label \
--problem_type classification \
--metric f1 \
--model gpt-4o \
--max_iterations 3 \
--verbose \
--streamYou can also run via module:
python -m agenticml --file data.csvThe provider is auto-detected from the model name:
| Model prefix | Provider | Env variable | Install extra |
|---|---|---|---|
gpt-*, o1*, o3* |
OpenAI | OPENAI_API_KEY |
(included) |
claude-* |
Anthropic | ANTHROPIC_API_KEY |
pip install swayamml[anthropic] |
gemini-* |
GOOGLE_API_KEY |
pip install swayamml[google] |
Pass the key directly or set the environment variable:
export OPENAI_API_KEY=sk-...Planner → Profiler → Cleaner → Featurizer → Modeler → Evaluator → Critic
↓
(blocking issues?)
↓ yes ↓ no
Orchestrator Reporter
↓
(next iteration)
Each run produces:
report.md— human-readable summaryrun_manifest.json— full reproducibility metadata- Trained models, evaluation plots, and intermediate data in the
runs/directory
Use --verbose (CLI) or verbose=True (Python) to see exactly what each agent sends to the LLM and what it gets back — useful for debugging and understanding pipeline decisions.
MIT