Observed since 20 Oct, 21:58 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
AgentForge: LLM-driven agent and multi-agent system generator
Create single agents or robust multi-agent systems from plain English. One command plans, generates, quality‑checks, and packages a runnable agent; another runs a supervisor + workers loop.
git clone <repository-url>
cd AgentForge
python -m venv .venv && source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e '.[dev]'
# Single agent (plan + code + tests + packaging)
agentforge generate --provider openai --use-case "Summarize daily sales CSVs and flag anomalies"
# Multi-agent (offline deterministic)
agentforge multi --task "Explain caching layers" --provider echo --verbose
# Planning only
agentforge plan --provider ollama --use-case "Design an FAQ chatbot"
Set environment variables for real providers:
export OPENAI_API_KEY="your-openai-api-key"
export XAI_API_KEY="your-xai-api-key"
Make sure Ollama is running locally:
ollama serve
The generate subcommand performs:
Artifacts land in generated_agents/<timestamp>/.
Legacy direct call (still works):
python src/main.py <provider> "<use case>"
Start the FastAPI server (after installing new dependencies):
uvicorn src.api.app:app --reload
Then call endpoints:
curl -X POST http://127.0.0.1:8000/plan -H 'Content-Type: application/json' \
-d '{"provider":"openai","use_case":"Build an agent that summarizes emails"}'
Full pipeline:
curl -X POST http://127.0.0.1:8000/pipeline -H 'Content-Type: application/json' \
-d '{"provider":"ollama","use_case":"Create an agent that tags support tickets"}'
agentforge generate --provider grok --use-case "Analyze CSV data and output anomaly report"
agentforge generate --provider ollama --use-case "Customer support chatbot that escalates complex issues"
agentforge generate --provider openai --use-case "News summarizer that emails an AM briefing"
Create or modify config.json to customize behavior:
{
"max_retries": 3,
"min_plan_length": 50,
"min_code_length": 100,
"output_base_dir": "generated_agents",
"create_timestamped_dirs": true,
"save_logs": true,
"log_level": "INFO",
"default_timeout": 120,
"default_temperature": 0.7,
"default_max_tokens": 4000,
"openai_model": "gpt-4o-mini",
"grok_model": "grok-beta",
"ollama_model": "llama3"
}
Override configuration with environment variables:
export AGENTFORGE_MAX_RETRIES=5
export AGENTFORGE_LOG_LEVEL=DEBUG
export AGENTFORGE_OUTPUT_DIR=my_agents
export OPENAI_MODEL=gpt-4
Each run creates a timestamped directory with:
generated_agents/
└── 20240822_143022/
├── README.md # Generation summary
├── agent_plan.txt # Detailed architecture plan
├── custom_agent.py # Generated agent code
└── test_agent.py # Test suite
main.py: Main orchestration logic with robust error handlingllm_providers.py: Multi-provider LLM interface with retry logic and proper response parsingconfig.py: Configuration management with file and environment variable supportConfigure different models per provider:
{
"openai_model": "gpt-4",
"grok_model": "grok-2",
"ollama_model": "llama3:8b"
}
Control output behavior:
{
"create_timestamped_dirs": false, # Use single output directory
"output_base_dir": "my_custom_dir",
"save_logs": false # Disable log file creation
}
Run a supervisor + worker loop:
agentforge multi --task "Draft phased migration plan" --provider openai
agentforge multi --task "Summarize caching strategy" --provider echo --verbose
Supervisor must output NEXT:<agent> or FINISH:<answer>.
Workers output RESPOND:<answer> or TOOL:<name>:<arg>.
Add an extra worker (snippet):
from agents.base import BaseAgent
from agents.adapters import EchoLLM
from agents.orchestrator import Orchestrator
llm = EchoLLM()
sup = BaseAgent("supervisor", llm, "Supervisor: decide.")
worker = BaseAgent("worker", llm, "Worker: solve tasks.")
researcher = BaseAgent("researcher", llm, "Research facts.")
orch = Orchestrator({"worker": worker, "researcher": researcher}, sup, max_turns=8)
Offline deterministic path (no keys): --provider echo.
requests for HTTP API callspytest, black, flake8, mypymkdocs, mkdocs-materialblack, flake8, and mypyMIT License - see LICENSE file for details.
API Key not found:
# Make sure environment variables are set
echo $OPENAI_API_KEY
echo $XAI_API_KEY
Ollama connection failed:
# Check if Ollama is running
curl http://localhost:11434/api/tags
Generation timeout:
# Increase timeout in config.json
export AGENTFORGE_TIMEOUT=300
Enable detailed logging:
export AGENTFORGE_LOG_LEVEL=DEBUG
python src/main.py <provider> "<use_case>"
Check the log file for detailed error information:
See docs/USAGE.md for advanced multi-agent usage, tool authoring, roadmap, and a troubleshooting matrix.
tail -f agent_forge.log
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.1.0 | 27 Aug 2025 | 14 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 21:58 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:05549ee8c0e30f7b6289e0dd9ddb10fdc37ba1f16b0a6f7c10e44a737564d0f0