Get from install to your first multi-agent run in 5 minutes.
pip install miniautogenminiautogen init my-project --template quickstart
cd my-projectThree templates are available:
| Template | Description |
|---|---|
| quickstart | Ready-to-run project with a pre-configured agent and flow |
| minimal | Bare minimum structure for experienced users |
| advanced | Full-featured scaffold with multiple agents, flows, and policies |
This scaffolds the following structure:
my-project/
miniautogen.yaml # Project config (engines, flows, defaults)
agents/ # Agent definitions (YAML)
pipelines/ # Pipeline entry points
skills/ # Reusable skill packages
tools/ # Tool definitions
memory/ # Memory profiles
mcp/ # MCP server configs
.env # Environment variables (API keys)
By default, the project is configured with OpenAI (gpt-4o-mini). You can
change the provider and model at init time:
# Use a different model
miniautogen init my-project --provider openai --model gpt-4o
# Use Gemini CLI as the backend
miniautogen init my-project --provider gemini-cli --model gemini-2.5-proThe generated miniautogen.yaml includes a default engine:
engines:
default_api:
kind: api
provider: "openai"
model: "gpt-4o-mini"
temperature: 0.2For OpenAI, set your API key in .env:
OPENAI_API_KEY=sk-...
To use Gemini CLI instead, change the engine to:
engines:
gemini:
kind: cli
provider: "gemini-cli"
model: "gemini-2.5-pro"
command: "gemini"You can also add or manage engines with the CLI:
miniautogen engine create my-engine --provider openai --model gpt-4oAgents live as YAML files in the agents/ directory. The scaffold includes an
example agent. Here is what a typical agent looks like:
# agents/researcher.yaml
id: researcher
name: Research Specialist
role: Research Specialist
goal: >
Investigate topics, locate reliable sources, and produce structured summaries.
engine_profile: default_api
tool_access:
mode: allowlist
allow:
- web_search
runtime:
max_turns: 10
timeout_seconds: 300Create additional agents with the CLI:
miniautogen agent create writer --engine default_api --role "Technical Writer"Flows define how agents coordinate. The scaffold creates a main flow in
miniautogen.yaml that references a pipeline builder function:
flows:
main:
target: pipelines.main:build_pipelineThe target points to a Python function (build_pipeline in
pipelines/main.py) that constructs and returns a pipeline using the SDK.
This gives you full programmatic control over agent orchestration.
You can also define flows declaratively with a mode and participants list:
flows:
build:
mode: workflow
participants:
- architect
- developer
- tester
review:
mode: deliberation
participants:
- architect
- developer
- tester
leader: architectMiniAutoGen supports three declarative flow modes:
| Mode | Description |
|---|---|
| workflow | Sequential execution -- agents run in order |
| deliberation | Multi-round discussion -- agents contribute and review |
| loop | Router-driven agentic loop with dynamic routing |
Create flows with the CLI:
miniautogen flow create research --mode workflowBefore running, validate your project configuration:
miniautogen checkThis checks that all agents, engines, flows, and dependencies are properly configured.
Then run a flow:
miniautogen run mainYou can also send a single message to an agent directly:
miniautogen send "Hello, world!" --agent assistantOr start an interactive chat session:
miniautogen chat --agent assistantCheck the workspace status at any time:
miniautogen statusWhen you run a flow, MiniAutoGen orchestrates execution through a layered architecture:
-
PipelineRunner -- the core execution engine. It manages the run lifecycle (PENDING -> RUNNING -> COMPLETED/FAILED), enforces timeouts, handles checkpoints, and emits execution events.
-
AgentRuntime -- wraps each agent with tool access, memory, delegation capabilities, and supervision. The runtime resolves the engine driver for each agent and manages turn-by-turn execution.
-
Events -- the system emits 72 typed events across 13 categories (run lifecycle, agent turns, tool calls, errors, etc.) for full observability via structlog.
-
Policies -- transversal concerns like retry, budget tracking, approval gates, and circuit breaking run as reactive policies that observe events without coupling to core logic.
-
Results -- each run produces a
RunResultwith the final state, collected outputs from all agents, and any errors encountered.
Launch the web console for a full GUI experience with CRUD management of agents, flows, and engines, plus settings editor, log viewer, and run tracking:
miniautogen consoleOpen http://localhost:8080 in your browser.
Run MiniAutoGen in a container:
docker-compose upThis starts the API server and web console. See the included Dockerfile and
docker-compose.yml for configuration options.
miniautogen dash-- launch the TUI dashboard to monitor and manage agents, flows, and runs visually.miniautogen console-- launch the web console with full CRUD, settings, and log viewer.miniautogen sessions-- list and inspect past run sessions.miniautogen status-- check workspace and run status.miniautogen doctor-- diagnose your environment setup.miniautogen check-- validate your project at any time.- Browse the architecture docs for deeper technical details.
- See the examples/ directory for complete project examples.