# dimensionalos/dimos architecture

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

- Interactive diagram: https://gitdiagram.com/dimensionalos/dimos
- Repository: https://github.com/dimensionalos/dimos

## Overview

1. **Overall shape**
   - This repository is a robotics OS/framework built around a **module graph**. Most functionality is expressed as composable Python modules, wired together into **blueprints** and executed under a central coordination/runtime layer.
   - The key architectural idea is: **sensors, agents, planners, controllers, and recorders are all modules connected by typed streams and RPC**, rather than one monolithic application.

2. **Runtime and orchestration layer**
   - `dimos.core` is the foundation: it provides the **module abstraction**, **blueprint composition**, **coordination/coordinator**, **process lifecycle**, **RPC**, **streaming**, **daemon/CLI runtime**, and **run registry**.
   - This layer is what turns a set of modules into a running system, handles process boundaries, worker management, and supports reloading/monitoring.
   - The `dimos/robot/cli` and top-level `dimos` command are the user-facing control plane for starting runs, checking status, tailing logs, sending agent commands, and invoking MCP tools.

3. **Data exchange boundaries**
   - The system separates communication into:
     - **Streams/pub-sub** for continuous data such as images, lidar, odometry, joint state, paths, detections, etc.
     - **RPC** for discrete commands and lifecycle actions.
   - `dimos.protocol` contains transport implementations and protocol adapters: **LCM, ROS, DDS, Redis, SHM, JPEG-over-transport**, plus TF-related support.
   - This means the architecture is transport-agnostic at the module level: the same module graph can run over shared memory, ROS 2, LCM, or other backends depending on the blueprint.

4. **Robot abstraction layer**
   - `dimos.robot` defines **platform-specific blueprints, connections, configs, and catalog entries** for supported robots.
   - It is the boundary between the generic OS and actual hardware families: **Unitree Go2/B1/G1, XArm, Piper, drones, and some DIY/misc setups**.
   - These robot packages assemble sensors, effectors, teleop, navigation, perception, and agent modules into specific “runfiles” such as `unitree-go2`, `unitree-g1-sim`, or `drone-agentic`.

5. **Hardware adapters**
   - `dimos.hardware` contains the low-level interfaces for hardware classes:
     - **Drive trains**
     - **Manipulators**
     - **Sensors** (camera, lidar, whole-body interfaces)
   - Each hardware family typically has a **spec/registry** plus concrete adapters for real devices and mocks/sim variants.
   - This is where vendor-specific logic lives, while higher layers consume standardized robot-state and command messages.

6. **Sensor ingestion and streaming**
   - `dimos.hardware.sensors` and `dimos.stream` form the ingestion pipeline for raw robot data.
   - Cameras, lidar, RTSP/ROS video providers, audio pipelines, and frame processors feed standardized message streams into the rest of the system.
   - The stream layer also provides **operators, mergers, quality filters, and temporal alignment**, which is important because many downstream modules assume synchronized multimodal input.

7. **Perception stack**
   - `dimos.perception` handles object detection, tracking, re-identification, fiducials, spatial perception, and experimental temporal memory.
   - The perception boundary is: **raw sensor streams in, semantic detections / object state / markers / spatial memory out**.
   - It includes both 2D and 3D detection types, object databases, person tracking, and a temporal-memory subsystem that turns frame windows into durable entity/state graphs.

8. **Mapping and spatial reasoning**
   - `dimos.mapping` is responsible for occupancy grids, point-cloud occupancy, voxel maps, loop closure, relocalization, ray tracing, and Google Maps / OSM integration.
   - This layer consumes perception and localization signals to produce **maps, costs, paths, and geo context**.
   - It is a key bridge between raw robot sensing and navigation: occupancy and topology outputs feed planning modules, while external map providers add global spatial context.

9. **Navigation and autonomy**
   - `dimos.navigation` contains multiple navigation paradigms:
     - **nav stack** with planners, local planners, path followers, terrain analysis, PGO, and evaluation tooling
     - **replanning A\*** and other path-planning logic
     - **patrolling** routers and frontier-based exploration
     - **visual servoing** and detection-driven navigation
   - This subsystem sits between mapping/perception and motor control, producing actionable trajectories or velocity commands.
   - The `navigation/nav_stack` subtree also includes C++ extensions for performance-critical planning components.

10. **Control and actuation**
   - `dimos.control` and `dimos.manipulation.control` are the execution layer for robot motion.
   - They implement task abstractions such as **velocity, trajectory, servo, teleop, and Cartesian IK tasks**, plus coordinators and tick loops.
   - For robots with arms or whole-body actuation, these controllers convert higher-level goals into joint, twist, or motor commands, typically consuming state feedback from sensors and planning outputs from navigation/manipulation.

11. **Manipulation and grasping**
   - `dimos.manipulation` provides the higher-level arm/gripper side of the stack: kinematics, planning, world monitoring, trajectory generation, grasp generation, pick-and-place, and module wrappers.
   - It depends on both perception and hardware: world models and robot state inform planning; low-level arm drivers execute the motion.
   - This subsystem is distinct from navigation but shares the same module/runtime infrastructure, so manipulation can be orchestrated alongside mobility and perception.

12. **Agent and MCP layer**
   - `dimos.agents` is the agentic interface layer: Ollama/VLM-based agents, demo agents, skill wrappers, prompts, annotations, and MCP client/server pieces.
   - `dimos.agents.mcp` exposes robot capabilities as **tools** that an LLM-driven agent can call.
   - The data flow here is typically: **human input or model output → agent reasoning → skill/tool invocation → robot/navigation/control modules → feedback streams**.
   - This is one of the repository’s core differentiators: natural-language-driven robot behavior over the same module graph.

13. **Skills and cross-cutting behaviors**
   - `dimos.skills` and `dimos.agents.skills` define reusable behaviors like **speak, rest, manipulation actions, navigation helpers, person-follow, and demo skills**.
   - Skills are the bridge between agent intent and concrete robot actions; they package domain operations into a form suitable for direct invocation by agents or blueprints.
   - In diagrams, skills belong between the agent layer and the hardware/control layers.

14. **Simulation and replay**
   - `dimos.simulation` supports MuJoCo, Unity, Isaac, Genesis, and DimSim-style simulation backends.
   - There are also replay/data-driven workflows in `data/`, `dimos.memory2`, and various `replay`/testing utilities that let the system operate on recorded sessions without live hardware.
   - This means the architecture supports three execution modes: **real robot**, **simulation**, and **replay/offline analysis**.

15. **Memory, storage, and visualization**
   - `dimos.memory2` is a separate memory architecture for observation storage, vector search, blob storage, codecs, streaming, replay, and visualization.
   - It is used for durable spatio-temporal memory and makes heavy use of SQLite/memory/file-backed storage, embeddings, and visual tools.
   - `dimos.visualization`, `dimos.web`, and `dimos.utils.cli` provide observability surfaces such as rerun/websocket dashboards, web interfaces, and command-line inspection tools.

16. **Native extension and tooling boundaries**
   - Performance-critical or interoperable parts are implemented in **C++, Rust, and some Nix/Docker tooling**, especially around lidar processing, planning, and native module support.
   - The repository also includes extensive test suites, fixtures, and LFS-backed datasets/models, which indicate that many subsystems are validated using recorded sensor streams and integration runs.
   - For an architecture diagram, it is useful to draw a boundary around the **Python orchestration layer** and another around **native/simulation/vendor-specific runtime dependencies**.

Main entry points: [`dimos/core`](https://github.com/dimensionalos/dimos/tree/main/dimos/core) (Core runtime), [`dimos/stream`](https://github.com/dimensionalos/dimos/tree/main/dimos/stream) (Streams), [`dimos/perception`](https://github.com/dimensionalos/dimos/tree/main/dimos/perception) (Perception), [`dimos/agents`](https://github.com/dimensionalos/dimos/tree/main/dimos/agents) (Agents)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Runtime"]
  node_core["Core runtime<br/>orchestration/runtime"]
  node_protocol["Protocols<br/>transport layer"]
  node_msgs["Message types<br/>typed schemas"]
  node_stream["Streams<br/>data pipelines"]
end

subgraph group_robotics["Robotics Stack"]
  node_hardware["Hardware<br/>adapters"]
  node_sensors["Sensors<br/>ingestion"]
  node_perception["Perception<br/>semantic vision"]
  node_mapping["Mapping<br/>spatial reasoning"]
  node_navigation["Navigation<br/>planning"]
  node_control["Control<br/>actuation"]
  node_manipulation["Manipulation<br/>arm planning"]
  node_memory2[("Memory")]
end

subgraph group_ai["Agentic Layer"]
  node_agents["Agents<br/>agent layer"]
  node_skills["Skills<br/>tool behaviors"]
end

subgraph group_platforms["Robot Platforms"]
  node_robot["Robot blueprints<br/>platform assembly"]
end

subgraph group_execution["Execution Modes"]
  node_simulation["Simulation<br/>sim backends"]
  node_native{{"Native code<br/>C++/Rust"}}
end

subgraph group_ops["Operations"]
  node_robot_cli["Robot CLI<br/>control plane"]
  node_web["Web UI<br/>dashboard"]
  node_vis["Visualization<br/>observability"]
end

node_core -->|"uses"| node_protocol
node_core -->|"exchanges"| node_msgs
node_core -->|"hosts"| node_stream
node_core -->|"drives"| node_robot_cli
node_core -->|"loads"| node_robot
node_protocol -->|"encodes"| node_msgs
node_stream -->|"feeds"| node_perception
node_sensors -->|"publishes"| node_stream
node_hardware -->|"adapts"| node_control
node_perception -->|"provides"| node_mapping
node_mapping -->|"informs"| node_navigation
node_navigation -->|"commands"| node_control
node_control -->|"executes"| node_hardware
node_manipulation -->|"consumes"| node_perception
node_manipulation -->|"executes via"| node_control
node_agents -->|"invokes"| node_skills
node_skills -->|"uses"| node_navigation
node_skills -->|"uses"| node_manipulation
node_agents -->|"exposed by"| node_robot_cli
node_agents -->|"consumes"| node_perception
node_memory2 -->|"stores"| node_perception
node_memory2 -->|"replays"| node_stream
node_simulation -->|"mocks"| node_hardware
node_simulation -->|"publishes"| node_stream
node_native -->|"accelerates"| node_navigation
node_native -->|"supports"| node_hardware
node_vis -->|"renders"| node_web
node_web -->|"interfaces"| node_agents

click node_core "https://github.com/dimensionalos/dimos/tree/main/dimos/core"
click node_protocol "https://github.com/dimensionalos/dimos/tree/main/dimos/protocol"
click node_msgs "https://github.com/dimensionalos/dimos/tree/main/dimos/msgs"
click node_stream "https://github.com/dimensionalos/dimos/tree/main/dimos/stream"
click node_robot_cli "https://github.com/dimensionalos/dimos/tree/main/dimos/robot/cli"
click node_web "https://github.com/dimensionalos/dimos/tree/main/dimos/web"
click node_vis "https://github.com/dimensionalos/dimos/tree/main/dimos/visualization"
click node_hardware "https://github.com/dimensionalos/dimos/tree/main/dimos/hardware"
click node_sensors "https://github.com/dimensionalos/dimos/tree/main/dimos/hardware/sensors"
click node_perception "https://github.com/dimensionalos/dimos/tree/main/dimos/perception"
click node_mapping "https://github.com/dimensionalos/dimos/tree/main/dimos/mapping"
click node_navigation "https://github.com/dimensionalos/dimos/tree/main/dimos/navigation"
click node_control "https://github.com/dimensionalos/dimos/tree/main/dimos/control"
click node_manipulation "https://github.com/dimensionalos/dimos/tree/main/dimos/manipulation"
click node_agents "https://github.com/dimensionalos/dimos/tree/main/dimos/agents"
click node_skills "https://github.com/dimensionalos/dimos/tree/main/dimos/skills"
click node_memory2 "https://github.com/dimensionalos/dimos/tree/main/dimos/memory2"
click node_simulation "https://github.com/dimensionalos/dimos/tree/main/dimos/simulation"
click node_robot "https://github.com/dimensionalos/dimos/tree/main/dimos/robot"
click node_native "https://github.com/dimensionalos/dimos/tree/main/native"

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_core,node_protocol,node_msgs,node_stream toneBlue
class node_hardware,node_sensors,node_perception,node_mapping,node_navigation,node_control,node_manipulation,node_memory2 toneAmber
class node_agents,node_skills toneMint
class node_robot toneRose
class node_simulation,node_native toneIndigo
class node_robot_cli,node_web,node_vis toneTeal
```

## Components

### Runtime

Module graph, orchestration, RPC, streams, and run lifecycle.

- [Core runtime](https://github.com/dimensionalos/dimos/tree/main/dimos/core): orchestration/runtime · Module abstraction, blueprints, coordination, workers, lifecycle, daemon, and run registry. · `dimos/core`
- [Protocols](https://github.com/dimensionalos/dimos/tree/main/dimos/protocol): transport layer · Pub/sub, RPC, service, and TF transports across LCM, ROS, DDS, Redis, and SHM. · `dimos/protocol`
- [Message types](https://github.com/dimensionalos/dimos/tree/main/dimos/msgs): typed schemas · Shared robot, sensor, navigation, perception, and geometry message definitions. · `dimos/msgs`
- [Streams](https://github.com/dimensionalos/dimos/tree/main/dimos/stream): data pipelines · Video, audio, merging, operators, and frame processing for continuous sensor data. · `dimos/stream`

### Robotics Stack

Hardware-facing subsystems from sensors through actuation.

- [Hardware](https://github.com/dimensionalos/dimos/tree/main/dimos/hardware): adapters · Low-level adapters and registries for drives, manipulators, sensors, and whole-body interfaces. · `dimos/hardware`
- [Sensors](https://github.com/dimensionalos/dimos/tree/main/dimos/hardware/sensors): ingestion · Camera and lidar ingestion modules, device adapters, and sensor-specific blueprints. · `dimos/hardware/sensors`
- [Perception](https://github.com/dimensionalos/dimos/tree/main/dimos/perception): semantic vision · Detection, tracking, re-identification, fiducials, spatial perception, and temporal memory. · `dimos/perception`
- [Mapping](https://github.com/dimensionalos/dimos/tree/main/dimos/mapping): spatial reasoning · Occupancy, point-cloud maps, loop closure, relocalization, ray tracing, and map services. · `dimos/mapping`
- [Navigation](https://github.com/dimensionalos/dimos/tree/main/dimos/navigation): planning · Nav stack, replanning A*, patrol/exploration, visual servoing, and movement management. · `dimos/navigation`
- [Control](https://github.com/dimensionalos/dimos/tree/main/dimos/control): actuation · Task abstractions, tick loops, coordinators, and command execution for motion control. · `dimos/control`
- [Manipulation](https://github.com/dimensionalos/dimos/tree/main/dimos/manipulation): arm planning · Kinematics, world monitoring, grasp generation, pick-and-place, and arm control. · `dimos/manipulation`
- [Memory](https://github.com/dimensionalos/dimos/tree/main/dimos/memory2): durable memory · Observation storage, vector search, blob storage, replay, codecs, and visualization. · `dimos/memory2`

### Agentic Layer

LLM-driven agents, skills, and tool invocation.

- [Agents](https://github.com/dimensionalos/dimos/tree/main/dimos/agents): agent layer · Ollama/VLM agents, prompts, MCP server/client, and human-facing reasoning entrypoints. · `dimos/agents`
- [Skills](https://github.com/dimensionalos/dimos/tree/main/dimos/skills): tool behaviors · Reusable behaviors for speak, rest, navigation, follow, manipulation, and demos. · `dimos/skills`

### Robot Platforms

Platform-specific blueprints and robot family assemblies.

- [Robot blueprints](https://github.com/dimensionalos/dimos/tree/main/dimos/robot): platform assembly · Platform catalog, robot-specific blueprints, connection modules, and runfile assembly. · `dimos/robot`

### Execution Modes

Simulation, replay, and offline/session-backed workflows.

- [Simulation](https://github.com/dimensionalos/dimos/tree/main/dimos/simulation): sim backends · MuJoCo, Unity, Isaac, Genesis, and DimSim execution backends. · `dimos/simulation`
- [Native code](https://github.com/dimensionalos/dimos/tree/main/native): C++/Rust · Performance-critical extensions and interoperability layers for planning and hardware integration. · `native`

### Operations

CLI, web, visualization, and observability surfaces.

- [Robot CLI](https://github.com/dimensionalos/dimos/tree/main/dimos/robot/cli): control plane · User-facing command line entrypoints for starting runs, status, logs, and tool calls. · `dimos/robot/cli`
- [Web UI](https://github.com/dimensionalos/dimos/tree/main/dimos/web): dashboard · FastAPI/Flask/websocket interfaces and browser dashboards for robot interaction and monitoring. · `dimos/web`
- [Visualization](https://github.com/dimensionalos/dimos/tree/main/dimos/visualization): observability · Rerun/websocket visualization bridge and rendering modules. · `dimos/visualization`

## Connections

- Core runtime → Protocols: uses · Core runtime relies on transports for pub/sub and RPC.
- Core runtime → Message types: exchanges · Runtime modules communicate through shared typed messages.
- Core runtime → Streams: hosts · Stream modules are executed and coordinated by the runtime.
- Core runtime → Robot CLI: drives · CLI triggers run lifecycle, monitoring, and control actions.
- Core runtime → Robot blueprints: loads · Blueprints and runfiles are composed into runnable systems.
- Protocols → Message types: encodes · Transports serialize shared message schemas.
- Streams → Perception: feeds · Sensor streams are consumed by perception modules.
- Sensors → Streams: publishes · Camera and lidar adapters emit continuous streams.
- Hardware → Control: adapts · Hardware interfaces expose actuation and state feedback.
- Perception → Mapping: provides · Semantic outputs inform maps and spatial context.
- Mapping → Navigation: informs · Occupancy and path context drive planning and autonomy.
- Navigation → Control: commands · Planners and followers produce executable motion commands.
- Control → Hardware: executes · Control tasks send commands to robot interfaces.
- Manipulation → Perception: consumes · Grasping and world modeling use perception outputs.
- Manipulation → Control: executes via · Manipulation planners rely on low-level arm control.
- Agents → Skills: invokes · Agents call reusable behaviors and tools.
- Skills → Navigation: uses · Skills wrap navigation behaviors and helpers.
- Skills → Manipulation: uses · Skills wrap arm and pick-and-place behaviors.
- Agents → Robot CLI: exposed by · Agent and MCP workflows are surfaced through the CLI/control plane.
- Agents → Perception: consumes · Agentic behaviors can reason over detections and spatial state.
- Memory → Perception: stores · Observation storage persists semantic and visual history.
- Memory → Streams: replays · Recorded data can be streamed back through the pipeline.
- Simulation → Hardware: mocks · Simulators stand in for physical devices and sensors.
- Simulation → Streams: publishes · Simulation emits the same stream interfaces as hardware.
- Native code → Navigation: accelerates · Performance-critical planning components use native extensions.
- Native code → Hardware: supports · Native code underpins low-level device and transport integration.
- Visualization → Web UI: renders · Visualization is served through web and websocket surfaces.
- Web UI → Agents: interfaces · Web frontends interact with agent and command flows.
