# foundationagents/openmanus architecture

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

- Interactive diagram: https://gitdiagram.com/foundationagents/openmanus
- Repository: https://github.com/foundationagents/openmanus

## Overview

OpenManus is a tool-using LLM agent platform. In the principal workflow, a user submits a task through the terminal entry point; Manus initializes MCP integrations, asks the LLM for tool-directed decisions, dispatches tools, and returns an outcome. The repository also includes multi-agent planning, data-analysis and browser agents, sandbox-backed tools, an MCP server, and an A2A adapter. The graph combines shown calls with documented capabilities and source-index references; some unsampled subsystem links are omitted or marked unverified.

Main entry points: [`app/agent/manus.py`](https://github.com/foundationagents/openmanus/blob/main/app/agent/manus.py) (Manus agent), [`app/agent/toolcall.py`](https://github.com/foundationagents/openmanus/blob/main/app/agent/toolcall.py) (Tool-call loop), [`app/llm.py`](https://github.com/foundationagents/openmanus/blob/main/app/llm.py) (LLM client), [`app/tool/base.py`](https://github.com/foundationagents/openmanus/blob/main/app/tool/base.py) (Tool interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_agent_runtime["Agent runtime"]
  node_terminal_entry["Terminal entry<br/>[main.py]"]
  node_manus["Manus agent<br/>[manus.py]"]
  node_toolcall["Tool-call loop<br/>[toolcall.py]"]
  node_llm["LLM client<br/>[llm.py]"]
  node_flow["Planning flow<br/>[planning.py]"]
  node_browser_agent["Browser agent<br/>[browser.py]"]
  node_analysis_agent["Data-analysis agent<br/>[data_analysis.py]"]
  node_config["App configuration<br/>[config.py]"]
end

subgraph group_tooling["Tools and capabilities"]
  node_tool_base["Tool interface<br/>[base.py]"]
  node_editor["File editor"]
  node_web_search["Web search<br/>[web_search.py]"]
  node_visualization["Data visualization"]
  node_mcp_tool["MCP tools<br/>[mcp.py]"]
end

subgraph group_sandbox["Sandbox execution"]
  node_sandbox_tools["Sandbox tools"]
  node_daytona_tools["Daytona tool base<br/>[tool_base.py]"]
  node_daytona["Daytona lifecycle<br/>[sandbox.py]"]
  node_sandbox_core["Sandbox runtime<br/>[sandbox.py]"]
end

subgraph group_integrations["Protocols and integrations"]
  node_mcp_server["MCP server<br/>[server.py]"]
  node_external_mcp{{"MCP services"}}
  node_a2a["A2A adapter<br/>[agent.py]"]
end

node_user(("Task submitter"))

node_user -->|"submits task"| node_terminal_entry
node_terminal_entry -->|"creates agent"| node_manus
node_manus -->|"extends"| node_toolcall
node_toolcall -->|"requests decisions"| node_llm
node_toolcall -.->|"dispatches tools"| node_tool_base
node_manus -->|"connects tools"| node_external_mcp
node_manus -->|"loads settings"| node_config
node_flow -->|"uses model"| node_llm
node_flow -->|"uses tools"| node_tool_base
node_browser_agent -.->|"uses loop"| node_toolcall
node_analysis_agent -.->|"supports analysis"| node_visualization
node_visualization -->|"uses model"| node_llm
node_web_search -.->|"queries engines"| node_external_mcp
node_mcp_server -->|"registers tools"| node_tool_base
node_mcp_server -.->|"serves requests"| node_external_mcp
node_sandbox_tools -->|"uses base"| node_daytona_tools
node_daytona_tools -->|"creates sandbox"| node_daytona
node_sandbox_core -->|"reads settings"| node_config
node_a2a -->|"adapts agent"| node_manus
node_manus -->|"offers tool"| node_editor

click node_terminal_entry "https://github.com/foundationagents/openmanus/blob/main/main.py"
click node_manus "https://github.com/foundationagents/openmanus/blob/main/app/agent/manus.py"
click node_toolcall "https://github.com/foundationagents/openmanus/blob/main/app/agent/toolcall.py"
click node_llm "https://github.com/foundationagents/openmanus/blob/main/app/llm.py"
click node_flow "https://github.com/foundationagents/openmanus/blob/main/app/flow/planning.py"
click node_browser_agent "https://github.com/foundationagents/openmanus/blob/main/app/agent/browser.py"
click node_analysis_agent "https://github.com/foundationagents/openmanus/blob/main/app/agent/data_analysis.py"
click node_tool_base "https://github.com/foundationagents/openmanus/blob/main/app/tool/base.py"
click node_editor "https://github.com/foundationagents/openmanus/blob/main/app/tool/str_replace_editor.py"
click node_web_search "https://github.com/foundationagents/openmanus/blob/main/app/tool/web_search.py"
click node_visualization "https://github.com/foundationagents/openmanus/blob/main/app/tool/chart_visualization/data_visualization.py"
click node_mcp_tool "https://github.com/foundationagents/openmanus/blob/main/app/tool/mcp.py"
click node_sandbox_tools "https://github.com/foundationagents/openmanus/tree/main/app/tool/sandbox"
click node_daytona_tools "https://github.com/foundationagents/openmanus/blob/main/app/daytona/tool_base.py"
click node_daytona "https://github.com/foundationagents/openmanus/blob/main/app/daytona/sandbox.py"
click node_sandbox_core "https://github.com/foundationagents/openmanus/blob/main/app/sandbox/core/sandbox.py"
click node_mcp_server "https://github.com/foundationagents/openmanus/blob/main/app/mcp/server.py"
click node_a2a "https://github.com/foundationagents/openmanus/blob/main/protocol/a2a/app/agent.py"
click node_config "https://github.com/foundationagents/openmanus/blob/main/app/config.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_terminal_entry,node_manus,node_toolcall,node_llm,node_flow,node_browser_agent,node_analysis_agent,node_config toneBlue
class node_tool_base,node_editor,node_web_search,node_visualization,node_mcp_tool toneAmber
class node_sandbox_tools,node_daytona_tools,node_daytona,node_sandbox_core toneMint
class node_mcp_server,node_external_mcp,node_a2a,node_user toneRose
```

## Components

### Agent runtime

- [Terminal entry](https://github.com/foundationagents/openmanus/blob/main/main.py): `main.py`
- [Manus agent](https://github.com/foundationagents/openmanus/blob/main/app/agent/manus.py): `app/agent/manus.py`
- [Tool-call loop](https://github.com/foundationagents/openmanus/blob/main/app/agent/toolcall.py): `app/agent/toolcall.py`
- [LLM client](https://github.com/foundationagents/openmanus/blob/main/app/llm.py): `app/llm.py`
- [Planning flow](https://github.com/foundationagents/openmanus/blob/main/app/flow/planning.py): `app/flow/planning.py`
- [Browser agent](https://github.com/foundationagents/openmanus/blob/main/app/agent/browser.py): `app/agent/browser.py`
- [Data-analysis agent](https://github.com/foundationagents/openmanus/blob/main/app/agent/data_analysis.py): `app/agent/data_analysis.py`
- [App configuration](https://github.com/foundationagents/openmanus/blob/main/app/config.py): `app/config.py`

### Tools and capabilities

- [Tool interface](https://github.com/foundationagents/openmanus/blob/main/app/tool/base.py): `app/tool/base.py`
- [File editor](https://github.com/foundationagents/openmanus/blob/main/app/tool/str_replace_editor.py): `app/tool/str_replace_editor.py`
- [Web search](https://github.com/foundationagents/openmanus/blob/main/app/tool/web_search.py): `app/tool/web_search.py`
- [Data visualization](https://github.com/foundationagents/openmanus/blob/main/app/tool/chart_visualization/data_visualization.py): `app/tool/chart_visualization/data_visualization.py`
- [MCP tools](https://github.com/foundationagents/openmanus/blob/main/app/tool/mcp.py): `app/tool/mcp.py`

### Sandbox execution

- [Sandbox tools](https://github.com/foundationagents/openmanus/tree/main/app/tool/sandbox): `app/tool/sandbox`
- [Daytona tool base](https://github.com/foundationagents/openmanus/blob/main/app/daytona/tool_base.py): `app/daytona/tool_base.py`
- [Daytona lifecycle](https://github.com/foundationagents/openmanus/blob/main/app/daytona/sandbox.py): `app/daytona/sandbox.py`
- [Sandbox runtime](https://github.com/foundationagents/openmanus/blob/main/app/sandbox/core/sandbox.py): `app/sandbox/core/sandbox.py`

### Protocols and integrations

- [MCP server](https://github.com/foundationagents/openmanus/blob/main/app/mcp/server.py): `app/mcp/server.py`
- **MCP services**
- [A2A adapter](https://github.com/foundationagents/openmanus/blob/main/protocol/a2a/app/agent.py): `protocol/a2a/app/agent.py`

### Other components

- **Task submitter**

## Connections

- Task submitter → Terminal entry: submits task (evidence: `README.md`)
- Terminal entry → Manus agent: creates agent (evidence: `main.py`)
- Manus agent → Tool-call loop: extends (evidence: `app/agent/manus.py`)
- Tool-call loop → LLM client: requests decisions (evidence: `app/agent/toolcall.py`)
- Tool-call loop → Tool interface: dispatches tools
- Manus agent → MCP services: connects tools (evidence: `app/agent/manus.py`)
- Manus agent → App configuration: loads settings (evidence: `app/agent/manus.py`)
- Planning flow → LLM client: uses model (evidence: `app/flow/planning.py`)
- Planning flow → Tool interface: uses tools (evidence: `app/flow/planning.py`)
- Browser agent → Tool-call loop: uses loop
- Data-analysis agent → Data visualization: supports analysis
- Data visualization → LLM client: uses model (evidence: `app/tool/chart_visualization/data_visualization.py`)
- Web search → MCP services: queries engines
- MCP server → Tool interface: registers tools (evidence: `app/mcp/server.py`)
- MCP server → MCP services: serves requests
- Sandbox tools → Daytona tool base: uses base (evidence: `app/agent/sandbox_agent.py`)
- Daytona tool base → Daytona lifecycle: creates sandbox (evidence: `app/daytona/tool_base.py`)
- Sandbox runtime → App configuration: reads settings (evidence: `app/sandbox/core/sandbox.py`)
- A2A adapter → Manus agent: adapts agent (evidence: `protocol/a2a/app/agent.py`)
- Manus agent → File editor: offers tool (evidence: `app/agent/manus.py`)
