|
| 1 | +# Architecture |
| 2 | + |
| 3 | +`autogen` utilizes a manager-led orchestration strategy built on top of the Microsoft Agent Framework. Its design emphasizes operator control and execution safety over pure autonomy. |
| 4 | + |
| 5 | +## Workflow Orchestration Diagram |
| 6 | + |
| 7 | +```mermaid |
| 8 | +flowchart TD |
| 9 | + subgraph Operator[Operator / UI] |
| 10 | + Dashboard[Operator Dashboard] |
| 11 | + CLI[Command Line Interface] |
| 12 | + end |
| 13 | +
|
| 14 | + subgraph Manager[Manager Agent] |
| 15 | + Workflow[Manager-Led Workflow] |
| 16 | + Approval[Approval Gate] |
| 17 | + Validation[Validation Step] |
| 18 | + end |
| 19 | + |
| 20 | + subgraph Specialists[Specialist Team] |
| 21 | + Planner[Planner Agent\n(gemini-2.5-pro)] |
| 22 | + Researcher[Researcher Agent\n(gemini-2.5-flash)] |
| 23 | + Implementer[Implementer Agent\n(gemini-2.5-pro)] |
| 24 | + Reviewer[Reviewer Agent\n(gemini-2.5-pro)] |
| 25 | + end |
| 26 | +
|
| 27 | + subgraph State[Run Artifacts & State] |
| 28 | + Checkpoints[Run-Scoped Checkpoints] |
| 29 | + SessionStore[Durable Session Store] |
| 30 | + end |
| 31 | +
|
| 32 | + subgraph Boundaries[Repo Boundaries] |
| 33 | + RepoTools[Bounded Repo Tools] |
| 34 | + LocalFiles[File System] |
| 35 | + end |
| 36 | +
|
| 37 | + Dashboard <--> Workflow |
| 38 | + CLI <--> Workflow |
| 39 | +
|
| 40 | + Workflow --> Planner |
| 41 | + Planner --Handoff--> Researcher |
| 42 | + Researcher --Handoff--> Implementer |
| 43 | + Implementer --Handoff--> Reviewer |
| 44 | + Reviewer --Handoff--> Validation |
| 45 | +
|
| 46 | + Planner --> Checkpoints |
| 47 | + Researcher --> RepoTools |
| 48 | + Implementer --> RepoTools |
| 49 | + Reviewer --> RepoTools |
| 50 | +
|
| 51 | + RepoTools --> LocalFiles |
| 52 | + RepoTools --> Approval |
| 53 | + Approval -.-> Dashboard |
| 54 | +
|
| 55 | + Validation --> SessionStore |
| 56 | + Checkpoints --> SessionStore |
| 57 | +``` |
| 58 | + |
| 59 | +## Component Breakdown |
| 60 | + |
| 61 | +### Manager-Led Workflow |
| 62 | +The entry point (`entities/repo_team/workflow.py`) defines a canonical sequence: `planning` -> `research` -> `implementation` -> `review` -> `validation`. |
| 63 | + |
| 64 | +### The Specialists |
| 65 | +Agents are built in `maf_starter/team_factory.py` with distinct models and roles: |
| 66 | +- **Planner**: Scopes the work, generates constraints, sets risks and assumptions. |
| 67 | +- **Researcher**: Gathers facts from the repository using bounded tools. |
| 68 | +- **Implementer**: Translates plans and research into a concrete technical change. |
| 69 | +- **Reviewer**: Inspects the implementation for regressions, missing tests, or weak assumptions. |
| 70 | + |
| 71 | +### Bounded Repo Operations and Approvals |
| 72 | +Tools restrict file accesses and enforce boundaries. Actions like file writes or executing validation commands pass through an `Approval Gate` ensuring destructive changes pause for human operator review in the dashboard. |
| 73 | + |
| 74 | +### Provider Fallback & Routing |
| 75 | +Built for resilience, tasks are routed across APIs (e.g., Gemini, Anthropic) or CLI fallbacks based on policy definitions. |
0 commit comments