# tinyhumansai/openhuman architecture

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

- Interactive diagram: https://gitdiagram.com/tinyhumansai/openhuman
- Repository: https://github.com/tinyhumansai/openhuman

## Overview

OpenHuman is an agent harness with a desktop interface and a Rust library/runtime. The main user journey is to submit a request through the app or another host, have the runtime execute agent work, and receive a result; the repository also exposes workflows, memory, integrations, and fleet-oriented developer interfaces. The source excerpts show selected memory and storage bindings, while the README documents broader capabilities such as tool search, token compression, and loadable modules. Unshown runtime wiring is omitted or marked unverified.

Main entry points: [`crates/openhuman-core/src/core/runtime/mod.rs`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/core/runtime/mod.rs) (Core runtime), [`app/src/App.tsx`](https://github.com/tinyhumansai/openhuman/blob/main/app/src/App.tsx) (Desktop app), [`app/src/components/chat/ChatComposer.tsx`](https://github.com/tinyhumansai/openhuman/blob/main/app/src/components/chat/ChatComposer.tsx) (Chat interface), [`crates/openhuman-tui/src/app.rs`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-tui/src/app.rs) (Terminal UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["User interfaces"]
  node_desktop["Desktop app<br/>[App.tsx]"]
  node_chat["Chat interface<br/>[ChatComposer.tsx]"]
  node_workflow_ui["Workflow UI"]
  node_memory_ui["Memory settings"]
  node_tui["Terminal UI<br/>[app.rs]"]
end

subgraph group_runtime["Agent runtime"]
  node_core_runtime["Core runtime<br/>[mod.rs]"]
  node_events["Core events<br/>[events.rs]"]
  node_embed["Rust embed API<br/>[complete.rs]"]
  node_cli["CLI host<br/>[main.rs]"]
end

subgraph group_capabilities["Agent capabilities"]
  node_tool_search["Jev tool search"]
  node_compression["RLM compression"]
  node_flows["Workflow catalog<br/>[catalog_storage.rs]"]
  node_task_sources["Task sources<br/>[pipeline.rs]"]
end

subgraph group_state["State and memory"]
  node_memory_engine["Memory engine binding<br/>[engine.rs]"]
  node_hosted_memory["Hosted memory<br/>[engine.rs]"]
  node_storage[("Storage backend<br/>[mod.rs]")]
  node_module_storage["Module storage host<br/>[storage_host.rs]"]
end

subgraph group_connectors["Hosts and integrations"]
  node_session["Session manager<br/>[manager.rs]"]
  node_session_client["Session client<br/>[client.rs]"]
  node_rpc["RPC server<br/>[rpc_handler.rs]"]
end

node_user(("User"))

node_user -.->|"uses"| node_desktop
node_desktop -.->|"opens chat"| node_chat
node_chat -.->|"submits request"| node_core_runtime
node_user -.->|"uses"| node_tui
node_tui -.->|"runs agent"| node_core_runtime
node_cli -.->|"runs agent"| node_core_runtime
node_embed -.->|"embeds runtime"| node_core_runtime
node_core_runtime -.->|"selects tools"| node_tool_search
node_core_runtime -.->|"compresses results"| node_compression
node_user -.->|"configures workflows"| node_workflow_ui
node_workflow_ui -.->|"manages workflows"| node_flows
node_task_sources -->|"uses runtime"| node_core_runtime
node_memory_ui -.->|"configures memory"| node_memory_engine
node_memory_engine -->|"checks runtime mode"| node_core_runtime
node_hosted_memory -->|"resolves credentials"| node_embed
node_session -->|"uses client"| node_session_client
node_module_storage -->|"binds backend"| node_storage
node_flows -->|"reads documents"| node_storage
node_rpc -.->|"dispatches requests"| node_core_runtime
node_core_runtime -.->|"publishes events"| node_events

click node_desktop "https://github.com/tinyhumansai/openhuman/blob/main/app/src/App.tsx"
click node_chat "https://github.com/tinyhumansai/openhuman/blob/main/app/src/components/chat/ChatComposer.tsx"
click node_memory_ui "https://github.com/tinyhumansai/openhuman/blob/main/app/src/components/memory/MemoryEngineTab.tsx"
click node_core_runtime "https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/core/runtime/mod.rs"
click node_events "https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/core/events.rs"
click node_embed "https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/complete.rs"
click node_cli "https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-cli/src/main.rs"
click node_tui "https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-tui/src/app.rs"
click node_flows "https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/flows/catalog_storage.rs"
click node_task_sources "https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/integrations/task_sources/pipeline.rs"
click node_memory_engine "https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/memory/engine.rs"
click node_hosted_memory "https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-tinyhumans/src/memory/engine.rs"
click node_storage "https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/storage/mod.rs"
click node_module_storage "https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/modules/storage_host.rs"
click node_session "https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-tinyhumans/src/session/manager.rs"
click node_session_client "https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-tinyhumans/src/session/client.rs"
click node_rpc "https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-rpc/src/server/http/rpc_handler.rs"

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_desktop,node_chat,node_workflow_ui,node_memory_ui,node_tui,node_user toneBlue
class node_core_runtime,node_events,node_embed,node_cli toneAmber
class node_tool_search,node_compression,node_flows,node_task_sources toneMint
class node_memory_engine,node_hosted_memory,node_storage,node_module_storage toneRose
class node_session,node_session_client,node_rpc toneIndigo
```

## Components

### User interfaces

- [Desktop app](https://github.com/tinyhumansai/openhuman/blob/main/app/src/App.tsx): `app/src/App.tsx`
- [Chat interface](https://github.com/tinyhumansai/openhuman/blob/main/app/src/components/chat/ChatComposer.tsx): `app/src/components/chat/ChatComposer.tsx`
- **Workflow UI**
- [Memory settings](https://github.com/tinyhumansai/openhuman/blob/main/app/src/components/memory/MemoryEngineTab.tsx): `app/src/components/memory/MemoryEngineTab.tsx`
- [Terminal UI](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-tui/src/app.rs): `crates/openhuman-tui/src/app.rs`

### Agent runtime

- [Core runtime](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/core/runtime/mod.rs): `crates/openhuman-core/src/core/runtime/mod.rs`
- [Core events](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/core/events.rs): `crates/openhuman-core/src/core/events.rs`
- [Rust embed API](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/complete.rs): `crates/openhuman-embed/src/complete.rs`
- [CLI host](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-cli/src/main.rs): `crates/openhuman-cli/src/main.rs`

### Agent capabilities

- **Jev tool search**
- **RLM compression**
- [Workflow catalog](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/flows/catalog_storage.rs): `crates/openhuman-core/src/flows/catalog_storage.rs`
- [Task sources](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/integrations/task_sources/pipeline.rs): `crates/openhuman-core/src/integrations/task_sources/pipeline.rs`

### State and memory

- [Memory engine binding](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/memory/engine.rs): `crates/openhuman-core/src/memory/engine.rs`
- [Hosted memory](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-tinyhumans/src/memory/engine.rs): `crates/openhuman-tinyhumans/src/memory/engine.rs`
- [Storage backend](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/storage/mod.rs): `crates/openhuman-core/src/storage/mod.rs`
- [Module storage host](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/modules/storage_host.rs): `crates/openhuman-core/src/modules/storage_host.rs`

### Hosts and integrations

- [Session manager](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-tinyhumans/src/session/manager.rs): `crates/openhuman-tinyhumans/src/session/manager.rs`
- [Session client](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-tinyhumans/src/session/client.rs): `crates/openhuman-tinyhumans/src/session/client.rs`
- [RPC server](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-rpc/src/server/http/rpc_handler.rs): `crates/openhuman-rpc/src/server/http/rpc_handler.rs`

### Other components

- **User**

## Connections

- User → Desktop app: uses (evidence: `README.md`)
- Desktop app → Chat interface: opens chat
- Chat interface → Core runtime: submits request
- User → Terminal UI: uses (evidence: `README.md`)
- Terminal UI → Core runtime: runs agent
- CLI host → Core runtime: runs agent
- Rust embed API → Core runtime: embeds runtime (evidence: `README.md`)
- Core runtime → Jev tool search: selects tools (evidence: `README.md`)
- Core runtime → RLM compression: compresses results (evidence: `README.md`)
- User → Workflow UI: configures workflows
- Workflow UI → Workflow catalog: manages workflows
- Task sources → Core runtime: uses runtime (evidence: `crates/openhuman-core/src/integrations/task_sources/pipeline.rs`)
- Memory settings → Memory engine binding: configures memory
- Memory engine binding → Core runtime: checks runtime mode (evidence: `crates/openhuman-core/src/memory/engine.rs`)
- Hosted memory → Rust embed API: resolves credentials (evidence: `crates/openhuman-tinyhumans/src/memory/engine.rs`)
- Session manager → Session client: uses client (evidence: `crates/openhuman-tinyhumans/src/session/manager.rs`)
- Module storage host → Storage backend: binds backend (evidence: `crates/openhuman-core/src/modules/storage_host.rs`)
- Workflow catalog → Storage backend: reads documents (evidence: `crates/openhuman-core/src/flows/catalog_storage.rs`)
- RPC server → Core runtime: dispatches requests
- Core runtime → Core events: publishes events
