-
Notifications
You must be signed in to change notification settings - Fork 0
Architecture
autogen operates as a Python multi-agent orchestration runtime. An operator submits a prompt via the DevUI workbench; the MAF runtime routes it through a provider fallback chain and a specialist agent team, producing structured output with checkpointed state.
flowchart LR
Op["Operator\n(DevUI / Workbench)"] -->|"prompt"| MAF["autogen\n(MAF Runtime)"]
MAF --> Gemini["Gemini API\n(primary)"]
MAF --> Anthropic["Anthropic API\n(fallback)"]
MAF --> CLI["Local CLIs\n(gemini-cli / claude)"]
MAF --> Entities["Entities\n(repo_team, copilots)"]
MAF --> Tools["Repo Tools\n(read / write / search)"]
MAF --> Checkpoints["Checkpoints\n(FileCheckpointStorage)"]
Entities --> Out["Run Output\n+ Artifacts"]
Tools --> Out
Checkpoints --> Out
maf_starter/config.py — Settings dataclass loaded via load_settings(). Reads .env for MAF_*, GEMINI_*, and ANTHROPIC_* variables. Supports context-var-based run scope for per-request repo root binding, enabling concurrent agent runs with isolated filesystem access.
maf_starter/agent_factory.py — build_agent(). Creates a MAF Agent with OpenAIChatClient pointed at Gemini's OpenAI-compatible endpoint. Repo tools are injected at agent build time, scoping the agent's filesystem access to the configured repo root.
maf_starter/provider_fallback.py — Fallback middleware wrapping the MAF agent. Intercepts quota errors and rate-limit responses, then retries the request with the next provider in the fallback chain: Gemini API → Anthropic API → gemini-cli → claude-cli → codex-cli.
maf_starter/routing_policy.py — build_routing_plan(). Classifies incoming prompt complexity (simple / standard / deep) and selects the appropriate primary model and fallback order. Operators can override the routing lane via MAF_ROUTE_LANE.
maf_starter/team_factory.py — build_repo_team(). Constructs a sequential specialist chain: planner → researcher → implementer → reviewer. Each specialist uses FileCheckpointStorage, enabling the full team run to be paused and resumed across process restarts.
maf_starter/tools.py — build_repo_tools(). Bounded filesystem access layer. Exposes get_repo_overview, list_repo_files, read_repo_file, search_repo, and request_human_approval as MAF tool functions. All paths are validated against the configured repo root — agents cannot read or write outside the scope.
maf_starter/orchestration.py — RunOrchestrationState. Tracks the current execution stage (planning / research / implementation / review / validation), manages specialist handoffs, and records pause and approval events.
DevUI-discoverable entry point for the multi-agent repo team workflow. The DevUI scans the entities/ directory for workflow definitions and exposes them as runnable agents in the operator workbench.
A preserved AutoGen compatibility layer (autogen_dashboard/). Contains a FastAPI session API, session lifecycle management, and a legacy static UI. The primary operator surface is now the DevUI via maf_starter/; the dashboard is retained for backward compatibility.