# felinics/memoh architecture

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

- Interactive diagram: https://gitdiagram.com/felinics/memoh
- Repository: https://github.com/felinics/memoh

## Overview

Memoh is a multi-agent platform where users configure agents, connect through a web or desktop client or messaging channels, and interact with agents running in persistent cloud workspaces. The central path is client or channel interaction through server-side bot and session orchestration into an agent runtime, which can use workspace capabilities such as files, desktop, browser, network, memory, MCP tools, and schedules. The graph also captures configuration, providers, and workspace dependency management. Some subsystems are represented from README claims and indexed paths; their internal wiring is not inferred where source evidence was unavailable.

Main entry points: [`internal/command/handler.go`](https://github.com/felinics/memoh/blob/main/internal/command/handler.go) (Agent execution), [`internal/workspace/manager.go`](https://github.com/felinics/memoh/blob/main/internal/workspace/manager.go) (Workspace manager), [`internal/bots/service.go`](https://github.com/felinics/memoh/blob/main/internal/bots/service.go) (Bot management), [`internal/agent/runtime/session/manager.go`](https://github.com/felinics/memoh/blob/main/internal/agent/runtime/session/manager.go) (Agent sessions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clients["User clients"]
  node_web["Web app<br/>[App.vue]"]
  node_desktop["Desktop app<br/>[main.ts]"]
  node_channel["Messaging channels<br/>[main.go]"]
end

subgraph group_core["Agent platform"]
  node_http["HTTP server<br/>[server.go]"]
  node_bot["Bot management<br/>[service.go]"]
  node_session["Agent sessions<br/>[manager.go]"]
  node_turn["Agent execution<br/>[handler.go]"]
  node_provider["Model providers<br/>[service.go]"]
  node_settings["Bot settings<br/>[service.go]"]
end

subgraph group_workspace["Workspace runtime"]
  node_workspace_mgr["Workspace manager<br/>[manager.go]"]
  node_bridge["Workspace bridge<br/>[server.go]"]
  node_files["File operations<br/>[filemanager.go]"]
  node_container["Container runtime<br/>[service.go]"]
  node_network["Workspace networking<br/>[controller.go]"]
  node_deps["Workspace dependencies<br/>[service.go]"]
end

subgraph group_services["Capabilities and services"]
  node_memory["Long-term memory<br/>[ingest.go]"]
  node_schedule["Scheduled tasks<br/>[service.go]"]
  node_apps["Agent apps<br/>[service.go]"]
  node_connectors["Connectors and MCP<br/>[service.go]"]
  node_database[("Persistent data")]
  node_browser["Browser and desktop<br/>[service.go]"]
end

node_user(("User"))

node_user -->|"uses"| node_web
node_user -->|"uses"| node_desktop
node_user -->|"messages"| node_channel
node_web -.->|"requests"| node_http
node_desktop -->|"reuses UI"| node_web
node_channel -->|"reaches server"| node_http
node_http -.->|"routes requests"| node_bot
node_bot -->|"persists bots"| node_database
node_bot -->|"records workspace intent"| node_workspace_mgr
node_bot -.->|"configures agent"| node_settings
node_bot -.->|"starts sessions"| node_session
node_session -.->|"executes turns"| node_turn
node_turn -->|"uses models"| node_provider
node_turn -->|"uses memory"| node_memory
node_turn -->|"uses schedules"| node_schedule
node_turn -->|"calls tools"| node_connectors
node_turn -.->|"uses integrations"| node_apps
node_workspace_mgr -->|"creates containers"| node_container
node_workspace_mgr -->|"configures network"| node_network
node_workspace_mgr -->|"reads settings"| node_settings
node_workspace_mgr -->|"gets bridge client"| node_bridge
node_files -->|"performs file RPCs"| node_bridge
node_deps -->|"manages workspace tools"| node_bridge
node_session -.->|"uses workspace"| node_workspace_mgr
node_turn -->|"drives browser"| node_browser
node_schedule -->|"persists schedules"| node_database
node_provider -->|"persists providers"| node_database

click node_web "https://github.com/felinics/memoh/blob/main/apps/web/src/App.vue"
click node_desktop "https://github.com/felinics/memoh/blob/main/apps/desktop/src/renderer/src/main.ts"
click node_channel "https://github.com/felinics/memoh/blob/main/cmd/channel/main.go"
click node_http "https://github.com/felinics/memoh/blob/main/internal/server/server.go"
click node_bot "https://github.com/felinics/memoh/blob/main/internal/bots/service.go"
click node_session "https://github.com/felinics/memoh/blob/main/internal/agent/runtime/session/manager.go"
click node_turn "https://github.com/felinics/memoh/blob/main/internal/command/handler.go"
click node_provider "https://github.com/felinics/memoh/blob/main/internal/providers/service.go"
click node_settings "https://github.com/felinics/memoh/blob/main/internal/settings/service.go"
click node_workspace_mgr "https://github.com/felinics/memoh/blob/main/internal/workspace/manager.go"
click node_bridge "https://github.com/felinics/memoh/blob/main/internal/workspace/bridgesvc/server.go"
click node_files "https://github.com/felinics/memoh/blob/main/internal/handlers/filemanager.go"
click node_container "https://github.com/felinics/memoh/blob/main/internal/container/docker/service.go"
click node_network "https://github.com/felinics/memoh/blob/main/internal/network/controller.go"
click node_deps "https://github.com/felinics/memoh/blob/main/internal/workspacedeps/service.go"
click node_memory "https://github.com/felinics/memoh/blob/main/internal/memory/adapters/builtin/ingest.go"
click node_schedule "https://github.com/felinics/memoh/blob/main/internal/schedule/service.go"
click node_apps "https://github.com/felinics/memoh/blob/main/internal/apps/service.go"
click node_connectors "https://github.com/felinics/memoh/blob/main/internal/connectors/service.go"
click node_database "https://github.com/felinics/memoh/blob/main/internal/db/postgres/sqlc/channel_routes.sql.go"
click node_browser "https://github.com/felinics/memoh/blob/main/internal/display/service.go"

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_web,node_desktop,node_channel,node_user toneBlue
class node_http,node_bot,node_session,node_turn,node_provider,node_settings toneAmber
class node_workspace_mgr,node_bridge,node_files,node_container,node_network,node_deps toneMint
class node_memory,node_schedule,node_apps,node_connectors,node_database,node_browser toneRose
```

## Components

### User clients

- [Web app](https://github.com/felinics/memoh/blob/main/apps/web/src/App.vue): `apps/web/src/App.vue`
- [Desktop app](https://github.com/felinics/memoh/blob/main/apps/desktop/src/renderer/src/main.ts): `apps/desktop/src/renderer/src/main.ts`
- [Messaging channels](https://github.com/felinics/memoh/blob/main/cmd/channel/main.go): `cmd/channel/main.go`

### Agent platform

- [HTTP server](https://github.com/felinics/memoh/blob/main/internal/server/server.go): `internal/server/server.go`
- [Bot management](https://github.com/felinics/memoh/blob/main/internal/bots/service.go): `internal/bots/service.go`
- [Agent sessions](https://github.com/felinics/memoh/blob/main/internal/agent/runtime/session/manager.go): `internal/agent/runtime/session/manager.go`
- [Agent execution](https://github.com/felinics/memoh/blob/main/internal/command/handler.go): `internal/command/handler.go`
- [Model providers](https://github.com/felinics/memoh/blob/main/internal/providers/service.go): `internal/providers/service.go`
- [Bot settings](https://github.com/felinics/memoh/blob/main/internal/settings/service.go): `internal/settings/service.go`

### Workspace runtime

- [Workspace manager](https://github.com/felinics/memoh/blob/main/internal/workspace/manager.go): `internal/workspace/manager.go`
- [Workspace bridge](https://github.com/felinics/memoh/blob/main/internal/workspace/bridgesvc/server.go): `internal/workspace/bridgesvc/server.go`
- [File operations](https://github.com/felinics/memoh/blob/main/internal/handlers/filemanager.go): `internal/handlers/filemanager.go`
- [Container runtime](https://github.com/felinics/memoh/blob/main/internal/container/docker/service.go): `internal/container/docker/service.go`
- [Workspace networking](https://github.com/felinics/memoh/blob/main/internal/network/controller.go): `internal/network/controller.go`
- [Workspace dependencies](https://github.com/felinics/memoh/blob/main/internal/workspacedeps/service.go): `internal/workspacedeps/service.go`

### Capabilities and services

- [Long-term memory](https://github.com/felinics/memoh/blob/main/internal/memory/adapters/builtin/ingest.go): `internal/memory/adapters/builtin/ingest.go`
- [Scheduled tasks](https://github.com/felinics/memoh/blob/main/internal/schedule/service.go): `internal/schedule/service.go`
- [Agent apps](https://github.com/felinics/memoh/blob/main/internal/apps/service.go): `internal/apps/service.go`
- [Connectors and MCP](https://github.com/felinics/memoh/blob/main/internal/connectors/service.go): `internal/connectors/service.go`
- [Persistent data](https://github.com/felinics/memoh/blob/main/internal/db/postgres/sqlc/channel_routes.sql.go): `internal/db/postgres/sqlc/channel_routes.sql.go`
- [Browser and desktop](https://github.com/felinics/memoh/blob/main/internal/display/service.go): `internal/display/service.go`

### Other components

- **User**

## Connections

- User → Web app: uses (evidence: `README.md`)
- User → Desktop app: uses (evidence: `README.md`)
- User → Messaging channels: messages (evidence: `README.md`)
- Web app → HTTP server: requests
- Desktop app → Web app: reuses UI (evidence: `apps/desktop/src/renderer/src/main.ts`)
- Messaging channels → HTTP server: reaches server (evidence: `cmd/channel/main.go`)
- HTTP server → Bot management: routes requests
- Bot management → Persistent data: persists bots (evidence: `internal/bots/service.go`)
- Bot management → Workspace manager: records workspace intent (evidence: `internal/bots/service.go`)
- Bot management → Bot settings: configures agent
- Bot management → Agent sessions: starts sessions (evidence: `README.md`)
- Agent sessions → Agent execution: executes turns (evidence: `README.md`)
- Agent execution → Model providers: uses models (evidence: `internal/command/handler.go`)
- Agent execution → Long-term memory: uses memory (evidence: `README.md`)
- Agent execution → Scheduled tasks: uses schedules (evidence: `internal/command/handler.go`)
- Agent execution → Connectors and MCP: calls tools (evidence: `README.md`)
- Agent execution → Agent apps: uses integrations
- Workspace manager → Container runtime: creates containers (evidence: `internal/workspace/manager.go`)
- Workspace manager → Workspace networking: configures network (evidence: `internal/workspace/manager.go`)
- Workspace manager → Bot settings: reads settings (evidence: `internal/workspace/manager.go`)
- Workspace manager → Workspace bridge: gets bridge client (evidence: `internal/workspace/manager.go`)
- File operations → Workspace bridge: performs file RPCs (evidence: `internal/handlers/filemanager.go`)
- Workspace dependencies → Workspace bridge: manages workspace tools (evidence: `internal/workspacedeps/service.go`)
- Agent sessions → Workspace manager: uses workspace
- Agent execution → Browser and desktop: drives browser (evidence: `README.md`)
- Scheduled tasks → Persistent data: persists schedules (evidence: `internal/schedule/service.go`)
- Model providers → Persistent data: persists providers (evidence: `internal/providers/service.go`)
