# aspradhan/maof architecture

> Architecture diagram of the GitHub repository aspradhan/maof, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aspradhan/maof
- Repository: https://github.com/aspradhan/maof

## Overview

MAOF is chiefly a guidance and pattern library for designing multi-agent systems, especially on OrchaMesh—not an orchestration platform. The documented user journey is to learn the principles, apply integration guidance, start from templates or examples, and avoid known anti-patterns. The repository also contains a Python orchestration implementation; the excerpt shows task routing, agent execution, context updates, and result aggregation, but not how results are returned to users. Several README-described directories are absent from the supplied tree, so they are not mapped.

Main entry points: [`README.md`](https://github.com/aspradhan/maof/blob/main/README.md) (MAOF overview), [`maof_framework.py`](https://github.com/aspradhan/maof/blob/main/maof_framework.py) (Orchestrator), [`02-Best-Practices/Agent-Design-Principles.md`](https://github.com/aspradhan/maof/blob/main/02-Best-Practices/Agent-Design-Principles.md) (Agent principles), [`07-Anti-Patterns/Common-Mistakes.md`](https://github.com/aspradhan/maof/blob/main/07-Anti-Patterns/Common-Mistakes.md) (Common mistakes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_guidance["Design Guidance"]
  node_overview["MAOF overview<br/>[README.md]"]
  node_principles["Agent principles"]
  node_anti["Common mistakes<br/>[Common-Mistakes.md]"]
  node_architecture["Architecture patterns"]
  node_usecases["Use cases<br/>[MAOF_Use_Cases.md]"]
end

subgraph group_integration["Platform Integration"]
  node_integrationguide["OrchaMesh guide<br/>[Getting-Started.md]"]
end

subgraph group_assets["Reusable Assets"]
  node_agenttemplate["Agent template"]
  node_example["Simple agent example<br/>[README.md]"]
end

subgraph group_runtime["Python Runtime"]
  node_framework["Orchestrator<br/>[maof_framework.py]"]
  node_router["Task router<br/>[maof_framework.py]"]
  node_agent["Provider agents<br/>[maof_framework.py]"]
  node_context["Context manager<br/>[maof_framework.py]"]
  node_aggregator["Result aggregator<br/>[maof_framework.py]"]
end

node_user(("Framework user"))

node_user -->|"learns from"| node_overview
node_overview -->|"review principles"| node_principles
node_overview -->|"explores integration"| node_integrationguide
node_overview -->|"uses templates"| node_agenttemplate
node_overview -->|"adapts examples"| node_example
node_overview -->|"avoids pitfalls"| node_anti
node_framework -->|"selects agent"| node_router
node_framework -->|"executes task"| node_agent
node_framework -->|"updates context"| node_context

click node_overview "https://github.com/aspradhan/maof/blob/main/README.md"
click node_principles "https://github.com/aspradhan/maof/blob/main/02-Best-Practices/Agent-Design-Principles.md"
click node_anti "https://github.com/aspradhan/maof/blob/main/07-Anti-Patterns/Common-Mistakes.md"
click node_architecture "https://github.com/aspradhan/maof/blob/main/MAOF_Architecture.md"
click node_usecases "https://github.com/aspradhan/maof/blob/main/MAOF_Use_Cases.md"
click node_integrationguide "https://github.com/aspradhan/maof/blob/main/04-OrchaMesh-Integration/Getting-Started.md"
click node_agenttemplate "https://github.com/aspradhan/maof/blob/main/05-Templates/agent-templates/research-agent.yaml"
click node_example "https://github.com/aspradhan/maof/blob/main/06-Examples/simple-agent/README.md"
click node_framework "https://github.com/aspradhan/maof/blob/main/maof_framework.py"
click node_router "https://github.com/aspradhan/maof/blob/main/maof_framework.py"
click node_agent "https://github.com/aspradhan/maof/blob/main/maof_framework.py"
click node_context "https://github.com/aspradhan/maof/blob/main/maof_framework.py"
click node_aggregator "https://github.com/aspradhan/maof/blob/main/maof_framework.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_overview,node_principles,node_anti,node_architecture,node_usecases,node_user toneBlue
class node_integrationguide toneAmber
class node_agenttemplate,node_example toneMint
class node_framework,node_router,node_agent,node_context,node_aggregator toneRose
```

## Components

### Design Guidance

- [MAOF overview](https://github.com/aspradhan/maof/blob/main/README.md): `README.md`
- [Agent principles](https://github.com/aspradhan/maof/blob/main/02-Best-Practices/Agent-Design-Principles.md): `02-Best-Practices/Agent-Design-Principles.md`
- [Common mistakes](https://github.com/aspradhan/maof/blob/main/07-Anti-Patterns/Common-Mistakes.md): `07-Anti-Patterns/Common-Mistakes.md`
- [Architecture patterns](https://github.com/aspradhan/maof/blob/main/MAOF_Architecture.md): `MAOF_Architecture.md`
- [Use cases](https://github.com/aspradhan/maof/blob/main/MAOF_Use_Cases.md): `MAOF_Use_Cases.md`

### Platform Integration

- [OrchaMesh guide](https://github.com/aspradhan/maof/blob/main/04-OrchaMesh-Integration/Getting-Started.md): `04-OrchaMesh-Integration/Getting-Started.md`

### Reusable Assets

- [Agent template](https://github.com/aspradhan/maof/blob/main/05-Templates/agent-templates/research-agent.yaml): `05-Templates/agent-templates/research-agent.yaml`
- [Simple agent example](https://github.com/aspradhan/maof/blob/main/06-Examples/simple-agent/README.md): `06-Examples/simple-agent/README.md`

### Python Runtime

- [Orchestrator](https://github.com/aspradhan/maof/blob/main/maof_framework.py): `maof_framework.py`
- [Task router](https://github.com/aspradhan/maof/blob/main/maof_framework.py): `maof_framework.py`
- [Provider agents](https://github.com/aspradhan/maof/blob/main/maof_framework.py): `maof_framework.py`
- [Context manager](https://github.com/aspradhan/maof/blob/main/maof_framework.py): `maof_framework.py`
- [Result aggregator](https://github.com/aspradhan/maof/blob/main/maof_framework.py): `maof_framework.py`

### Other components

- **Framework user**

## Connections

- Framework user → MAOF overview: learns from (evidence: `README.md`)
- MAOF overview → Agent principles: review principles (evidence: `README.md`)
- MAOF overview → OrchaMesh guide: explores integration (evidence: `README.md`)
- MAOF overview → Agent template: uses templates (evidence: `README.md`)
- MAOF overview → Simple agent example: adapts examples (evidence: `README.md`)
- MAOF overview → Common mistakes: avoids pitfalls (evidence: `README.md`)
- Orchestrator → Task router: selects agent (evidence: `maof_framework.py`)
- Orchestrator → Provider agents: executes task (evidence: `maof_framework.py`)
- Orchestrator → Context manager: updates context (evidence: `maof_framework.py`)
