# hugo-agi/robodawn architecture

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

- Interactive diagram: https://gitdiagram.com/hugo-agi/robodawn
- Repository: https://github.com/hugo-agi/robodawn

## Overview

RoboDawn is a closed-loop vision-language robot-control system evaluated through RoboTwin 2.0 and RoboDojo. A task instruction and observations (camera views plus robot state) go to a multimodal model, which returns discrete commands; the harness parses and executes them as planned motions, then feeds execution feedback into the next turn. In-context demonstrations and a command primer condition the policy. The repository has separate RoboTwin harness and RoboDojo policy implementations. Edges reflect README workflow statements or shown source references; unsampled subsystem internals are not inferred.

Main entry points: [`evaluation/policies/vlm_agent/agent.py`](https://github.com/hugo-agi/robodawn/blob/main/evaluation/policies/vlm_agent/agent.py) (VLM agent), [`harness/agent/mllm_agent.py`](https://github.com/hugo-agi/robodawn/blob/main/harness/agent/mllm_agent.py) (Closed-loop agent), [`harness/run_robotwin_eval.py`](https://github.com/hugo-agi/robodawn/blob/main/harness/run_robotwin_eval.py) (Evaluation runner), [`evaluation/policies/vlm_agent/main_route.py`](https://github.com/hugo-agi/robodawn/blob/main/evaluation/policies/vlm_agent/main_route.py) (Command routing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shared["Shared capabilities"]
end

subgraph group_rt["RoboTwin harness"]
  node_rt_runner["Evaluation runner"]
  node_rt_agent["Closed-loop agent<br/>[mllm_agent.py]"]
  node_rt_demo["Demo selection<br/>[demos.py]"]
  node_rt_prompts["Prompt and memory<br/>[prompts.py]"]
  node_rt_client["Chat client<br/>[llm_client.py]"]
  node_rt_commands["Command grammar<br/>[commands.py]"]
  node_env_contract["Environment contract<br/>[env.py]"]
  node_rt_env["RoboTwin environment<br/>[env.py]"]
  node_watchdog["Stall watchdog<br/>[watchdog.py]"]
end

subgraph group_rd["RoboDojo policy"]
  node_rd_agent["VLM agent<br/>[agent.py]"]
  node_rd_parser["Response parser<br/>[action_parser.py]"]
  node_rd_route["Command routing<br/>[main_route.py]"]
  node_rd_controller["Arm state geometry<br/>[controller.py]"]
  node_rd_motion["Motion planning<br/>[motion.py]"]
  node_rd_client["VLM client<br/>[vlm_client.py]"]
  node_rd_demos["In-context demos<br/>[icl_demos.py]"]
  node_rd_prompts["Prompt and routes<br/>[main_prompts.py]"]
end

subgraph group_eval["Evaluation artifacts"]
  node_demo_assets["Task demonstrations"]
  node_episode_data["Episode traces"]
end

node_operator(("Task instruction"))
node_model_service{{"Multimodal model"}}
node_rd_robot["RoboDojo simulator"]

node_operator -->|"starts evaluation"| node_rt_runner
node_rt_runner -->|"resets episodes"| node_rt_env
node_rt_runner -->|"runs policy"| node_rt_agent
node_rt_agent -->|"loads demonstrations"| node_rt_demo
node_rt_agent -->|"builds context"| node_rt_prompts
node_rt_agent -->|"requests completion"| node_rt_client
node_rt_client -->|"sends prompt"| node_model_service
node_model_service -->|"returns commands"| node_rt_agent
node_rt_agent -->|"parses commands"| node_rt_commands
node_rt_agent -->|"executes actions"| node_env_contract
node_env_contract -->|"implemented by"| node_rt_env
node_rt_env -->|"returns feedback"| node_rt_agent
node_rt_runner -->|"starts watchdog"| node_watchdog
node_operator -->|"provides task"| node_rd_agent
node_rd_agent -->|"loads demonstrations"| node_rd_demos
node_rd_agent -->|"builds prompt"| node_rd_prompts
node_rd_agent -->|"requests completion"| node_rd_client
node_rd_client -->|"sends prompt"| node_model_service
node_model_service -->|"returns commands"| node_rd_agent
node_rd_agent -->|"parses response"| node_rd_parser
node_rd_agent -->|"routes commands"| node_rd_route
node_rd_route -->|"resolves arm state"| node_rd_controller
node_rd_route -.->|"plans motion"| node_rd_motion
node_rd_agent -->|"exchanges observations"| node_rd_robot
node_rd_robot -->|"returns feedback"| node_rd_agent
node_demo_assets -.->|"supplies examples"| node_rd_demos
node_rt_runner -.->|"records episodes"| node_episode_data

click node_rt_runner "https://github.com/hugo-agi/robodawn/blob/main/harness/run_robotwin_eval.py"
click node_rt_agent "https://github.com/hugo-agi/robodawn/blob/main/harness/agent/mllm_agent.py"
click node_rt_demo "https://github.com/hugo-agi/robodawn/blob/main/harness/agent/demos.py"
click node_rt_prompts "https://github.com/hugo-agi/robodawn/blob/main/harness/agent/prompts.py"
click node_rt_client "https://github.com/hugo-agi/robodawn/blob/main/harness/agent/llm_client.py"
click node_rt_commands "https://github.com/hugo-agi/robodawn/blob/main/harness/core/commands.py"
click node_env_contract "https://github.com/hugo-agi/robodawn/blob/main/harness/core/env.py"
click node_rt_env "https://github.com/hugo-agi/robodawn/blob/main/harness/robotwin/env.py"
click node_watchdog "https://github.com/hugo-agi/robodawn/blob/main/harness/core/watchdog.py"
click node_rd_agent "https://github.com/hugo-agi/robodawn/blob/main/evaluation/policies/vlm_agent/agent.py"
click node_rd_parser "https://github.com/hugo-agi/robodawn/blob/main/evaluation/policies/vlm_agent/action_parser.py"
click node_rd_route "https://github.com/hugo-agi/robodawn/blob/main/evaluation/policies/vlm_agent/main_route.py"
click node_rd_controller "https://github.com/hugo-agi/robodawn/blob/main/evaluation/policies/vlm_agent/controller.py"
click node_rd_motion "https://github.com/hugo-agi/robodawn/blob/main/evaluation/policies/vlm_agent/motion.py"
click node_rd_client "https://github.com/hugo-agi/robodawn/blob/main/evaluation/policies/vlm_agent/vlm_client.py"
click node_rd_demos "https://github.com/hugo-agi/robodawn/blob/main/evaluation/policies/vlm_agent/icl_demos.py"
click node_rd_prompts "https://github.com/hugo-agi/robodawn/blob/main/evaluation/policies/vlm_agent/main_prompts.py"
click node_demo_assets "https://github.com/hugo-agi/robodawn/tree/main/demos/robodojo"
click node_episode_data "https://github.com/hugo-agi/robodawn/tree/main/demos/robotwin2"

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_rt_runner,node_rt_agent,node_rt_demo,node_rt_prompts,node_rt_client,node_rt_commands,node_env_contract,node_rt_env,node_watchdog toneAmber
class node_rd_agent,node_rd_parser,node_rd_route,node_rd_controller,node_rd_motion,node_rd_client,node_rd_demos,node_rd_prompts toneMint
class node_demo_assets,node_episode_data,node_operator toneRose
class node_model_service,node_rd_robot toneIndigo
```

## Components

### RoboTwin harness

- [Evaluation runner](https://github.com/hugo-agi/robodawn/blob/main/harness/run_robotwin_eval.py): `harness/run_robotwin_eval.py`
- [Closed-loop agent](https://github.com/hugo-agi/robodawn/blob/main/harness/agent/mllm_agent.py): `harness/agent/mllm_agent.py`
- [Demo selection](https://github.com/hugo-agi/robodawn/blob/main/harness/agent/demos.py): `harness/agent/demos.py`
- [Prompt and memory](https://github.com/hugo-agi/robodawn/blob/main/harness/agent/prompts.py): `harness/agent/prompts.py`
- [Chat client](https://github.com/hugo-agi/robodawn/blob/main/harness/agent/llm_client.py): `harness/agent/llm_client.py`
- [Command grammar](https://github.com/hugo-agi/robodawn/blob/main/harness/core/commands.py): `harness/core/commands.py`
- [Environment contract](https://github.com/hugo-agi/robodawn/blob/main/harness/core/env.py): `harness/core/env.py`
- [RoboTwin environment](https://github.com/hugo-agi/robodawn/blob/main/harness/robotwin/env.py): `harness/robotwin/env.py`
- [Stall watchdog](https://github.com/hugo-agi/robodawn/blob/main/harness/core/watchdog.py): `harness/core/watchdog.py`

### RoboDojo policy

- [VLM agent](https://github.com/hugo-agi/robodawn/blob/main/evaluation/policies/vlm_agent/agent.py): `evaluation/policies/vlm_agent/agent.py`
- [Response parser](https://github.com/hugo-agi/robodawn/blob/main/evaluation/policies/vlm_agent/action_parser.py): `evaluation/policies/vlm_agent/action_parser.py`
- [Command routing](https://github.com/hugo-agi/robodawn/blob/main/evaluation/policies/vlm_agent/main_route.py): `evaluation/policies/vlm_agent/main_route.py`
- [Arm state geometry](https://github.com/hugo-agi/robodawn/blob/main/evaluation/policies/vlm_agent/controller.py): `evaluation/policies/vlm_agent/controller.py`
- [Motion planning](https://github.com/hugo-agi/robodawn/blob/main/evaluation/policies/vlm_agent/motion.py): `evaluation/policies/vlm_agent/motion.py`
- [VLM client](https://github.com/hugo-agi/robodawn/blob/main/evaluation/policies/vlm_agent/vlm_client.py): `evaluation/policies/vlm_agent/vlm_client.py`
- [In-context demos](https://github.com/hugo-agi/robodawn/blob/main/evaluation/policies/vlm_agent/icl_demos.py): `evaluation/policies/vlm_agent/icl_demos.py`
- [Prompt and routes](https://github.com/hugo-agi/robodawn/blob/main/evaluation/policies/vlm_agent/main_prompts.py): `evaluation/policies/vlm_agent/main_prompts.py`

### Evaluation artifacts

- [Task demonstrations](https://github.com/hugo-agi/robodawn/tree/main/demos/robodojo): `demos/robodojo`
- [Episode traces](https://github.com/hugo-agi/robodawn/tree/main/demos/robotwin2): `demos/robotwin2`

### Other components

- **Task instruction**
- **Multimodal model**
- **RoboDojo simulator**

## Connections

- Task instruction → Evaluation runner: starts evaluation (evidence: `harness/run_robotwin_eval.py`)
- Evaluation runner → RoboTwin environment: resets episodes (evidence: `harness/run_robotwin_eval.py`)
- Evaluation runner → Closed-loop agent: runs policy (evidence: `harness/run_robotwin_eval.py`)
- Closed-loop agent → Demo selection: loads demonstrations (evidence: `harness/agent/mllm_agent.py`)
- Closed-loop agent → Prompt and memory: builds context (evidence: `harness/agent/mllm_agent.py`)
- Closed-loop agent → Chat client: requests completion (evidence: `harness/agent/mllm_agent.py`)
- Chat client → Multimodal model: sends prompt (evidence: `harness/agent/llm_client.py`)
- Multimodal model → Closed-loop agent: returns commands (evidence: `README.md`)
- Closed-loop agent → Command grammar: parses commands (evidence: `harness/agent/mllm_agent.py`)
- Closed-loop agent → Environment contract: executes actions (evidence: `harness/agent/mllm_agent.py`)
- Environment contract → RoboTwin environment: implemented by (evidence: `harness/robotwin/env.py`)
- RoboTwin environment → Closed-loop agent: returns feedback (evidence: `README.md`)
- Evaluation runner → Stall watchdog: starts watchdog (evidence: `harness/run_robotwin_eval.py`)
- Task instruction → VLM agent: provides task (evidence: `README.md`)
- VLM agent → In-context demos: loads demonstrations (evidence: `evaluation/policies/vlm_agent/agent.py`)
- VLM agent → Prompt and routes: builds prompt (evidence: `evaluation/policies/vlm_agent/agent.py`)
- VLM agent → VLM client: requests completion (evidence: `evaluation/policies/vlm_agent/agent.py`)
- VLM client → Multimodal model: sends prompt (evidence: `evaluation/policies/vlm_agent/vlm_client.py`)
- Multimodal model → VLM agent: returns commands (evidence: `README.md`)
- VLM agent → Response parser: parses response (evidence: `evaluation/policies/vlm_agent/agent.py`)
- VLM agent → Command routing: routes commands (evidence: `evaluation/policies/vlm_agent/agent.py`)
- Command routing → Arm state geometry: resolves arm state (evidence: `evaluation/policies/vlm_agent/controller.py`)
- Command routing → Motion planning: plans motion
- VLM agent → RoboDojo simulator: exchanges observations (evidence: `README.md`)
- RoboDojo simulator → VLM agent: returns feedback (evidence: `README.md`)
- Task demonstrations → In-context demos: supplies examples
- Evaluation runner → Episode traces: records episodes
