# clawdi-ai/clawdi architecture

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

- Interactive diagram: https://gitdiagram.com/clawdi-ai/clawdi
- Repository: https://github.com/clawdi-ai/clawdi

## Overview

Clawdi brings cloud-hosted and locally connected AI agents into one dashboard. Users deploy or connect an agent, then manage its sessions and durable memories, projects and skills, vaults, connectors, and messaging channels; hosted usage also includes provider setup and billing. The graph covers the dashboard, API, connected-agent sync, and hosted-agent capabilities. Backend and hosted feature links are shown at directory level where implementation was not sampled; those links reflect documented product responsibilities, not inspected call paths.

Main entry points: [`apps/web/src/client.tsx`](https://github.com/clawdi-ai/clawdi/blob/main/apps/web/src/client.tsx) (Web dashboard), [`backend/app/main.py`](https://github.com/clawdi-ai/clawdi/blob/main/backend/app/main.py) (FastAPI service), [`packages/cli/src/serve/sync-engine.ts`](https://github.com/clawdi-ai/clawdi/blob/main/packages/cli/src/serve/sync-engine.ts) (CLI and adapters), [`apps/web/src/lib/api.ts`](https://github.com/clawdi-ai/clawdi/blob/main/apps/web/src/lib/api.ts) (Web API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User interfaces"]
  node_dashboard["Web dashboard<br/>[client.tsx]"]
  node_desktop["Desktop app<br/>[main.ts]"]
  node_web_api["Web API client<br/>[api.ts]"]
end

subgraph group_agent_runtime["Agent runtimes"]
  node_cli["CLI and adapters<br/>[sync-engine.ts]"]
  node_local_agent["Connected agent"]
  node_cloud_agent["Cloud agent<br/>[runtimes.ts]"]
end

subgraph group_api_data["API and data"]
  node_api["FastAPI service<br/>[main.py]"]
  node_postgres[("PostgreSQL")]
end

subgraph group_agent_context["Agent context"]
  node_sessions["Sessions and memories<br/>[session-feed.tsx]"]
  node_projects["Projects and resources"]
  node_skills["Skills<br/>[skill-card.tsx]"]
  node_vaults["Vaults<br/>[vaults-surface.tsx]"]
  node_connectors["MCP connectors"]
end

subgraph group_hosted_ops["Hosted operations"]
  node_channels["Messaging channels<br/>[channels-page.tsx]"]
  node_providers["AI providers"]
  node_billing["Hosted billing"]
end

node_user(("User"))
node_stripe["Stripe"]

node_user -->|"uses"| node_dashboard
node_user -.->|"uses"| node_desktop
node_user -->|"connects"| node_local_agent
node_user -->|"deploys"| node_cloud_agent
node_dashboard -->|"requests"| node_web_api
node_web_api -->|"calls"| node_api
node_cli -->|"scans sessions"| node_local_agent
node_cli -->|"syncs sessions and skills"| node_api
node_api -->|"reads and writes"| node_postgres
node_dashboard -->|"manages"| node_sessions
node_dashboard -->|"manages"| node_projects
node_dashboard -->|"manages"| node_skills
node_dashboard -->|"manages"| node_vaults
node_dashboard -->|"configures"| node_connectors
node_dashboard -->|"configures"| node_channels
node_dashboard -->|"configures"| node_providers
node_dashboard -->|"manages"| node_billing
node_billing -.->|"processes payments"| node_stripe

click node_dashboard "https://github.com/clawdi-ai/clawdi/blob/main/apps/web/src/client.tsx"
click node_desktop "https://github.com/clawdi-ai/clawdi/blob/main/apps/desktop/src/main.ts"
click node_web_api "https://github.com/clawdi-ai/clawdi/blob/main/apps/web/src/lib/api.ts"
click node_cli "https://github.com/clawdi-ai/clawdi/blob/main/packages/cli/src/serve/sync-engine.ts"
click node_cloud_agent "https://github.com/clawdi-ai/clawdi/blob/main/apps/web/src/hosted/runtimes.ts"
click node_api "https://github.com/clawdi-ai/clawdi/blob/main/backend/app/main.py"
click node_sessions "https://github.com/clawdi-ai/clawdi/blob/main/apps/web/src/components/sessions/session-feed.tsx"
click node_projects "https://github.com/clawdi-ai/clawdi/blob/main/apps/web/src/components/projects/projects-surface.tsx"
click node_skills "https://github.com/clawdi-ai/clawdi/blob/main/apps/web/src/components/skills/skill-card.tsx"
click node_vaults "https://github.com/clawdi-ai/clawdi/blob/main/apps/web/src/components/vault/vaults-surface.tsx"
click node_connectors "https://github.com/clawdi-ai/clawdi/blob/main/apps/web/src/components/connectors/connectors-surface.tsx"
click node_channels "https://github.com/clawdi-ai/clawdi/blob/main/apps/web/src/hosted/v2/channels/channels-page.tsx"
click node_providers "https://github.com/clawdi-ai/clawdi/blob/main/apps/web/src/hosted/v2/ai-providers/ai-providers-page.tsx"
click node_billing "https://github.com/clawdi-ai/clawdi/blob/main/apps/web/src/hosted/billing/subscription/subscription-page.tsx"

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_dashboard,node_desktop,node_web_api,node_user toneBlue
class node_cli,node_local_agent,node_cloud_agent toneAmber
class node_api,node_postgres toneMint
class node_sessions,node_projects,node_skills,node_vaults,node_connectors toneRose
class node_channels,node_providers,node_billing,node_stripe toneIndigo
```

## Components

### User interfaces

- [Web dashboard](https://github.com/clawdi-ai/clawdi/blob/main/apps/web/src/client.tsx): `apps/web/src/client.tsx`
- [Desktop app](https://github.com/clawdi-ai/clawdi/blob/main/apps/desktop/src/main.ts): `apps/desktop/src/main.ts`
- [Web API client](https://github.com/clawdi-ai/clawdi/blob/main/apps/web/src/lib/api.ts): `apps/web/src/lib/api.ts`

### Agent runtimes

- [CLI and adapters](https://github.com/clawdi-ai/clawdi/blob/main/packages/cli/src/serve/sync-engine.ts): `packages/cli/src/serve/sync-engine.ts`
- **Connected agent**
- [Cloud agent](https://github.com/clawdi-ai/clawdi/blob/main/apps/web/src/hosted/runtimes.ts): `apps/web/src/hosted/runtimes.ts`

### API and data

- [FastAPI service](https://github.com/clawdi-ai/clawdi/blob/main/backend/app/main.py): `backend/app/main.py`
- **PostgreSQL**

### Agent context

- [Sessions and memories](https://github.com/clawdi-ai/clawdi/blob/main/apps/web/src/components/sessions/session-feed.tsx): `apps/web/src/components/sessions/session-feed.tsx`
- [Projects and resources](https://github.com/clawdi-ai/clawdi/blob/main/apps/web/src/components/projects/projects-surface.tsx): `apps/web/src/components/projects/projects-surface.tsx`
- [Skills](https://github.com/clawdi-ai/clawdi/blob/main/apps/web/src/components/skills/skill-card.tsx): `apps/web/src/components/skills/skill-card.tsx`
- [Vaults](https://github.com/clawdi-ai/clawdi/blob/main/apps/web/src/components/vault/vaults-surface.tsx): `apps/web/src/components/vault/vaults-surface.tsx`
- [MCP connectors](https://github.com/clawdi-ai/clawdi/blob/main/apps/web/src/components/connectors/connectors-surface.tsx): `apps/web/src/components/connectors/connectors-surface.tsx`

### Hosted operations

- [Messaging channels](https://github.com/clawdi-ai/clawdi/blob/main/apps/web/src/hosted/v2/channels/channels-page.tsx): `apps/web/src/hosted/v2/channels/channels-page.tsx`
- [AI providers](https://github.com/clawdi-ai/clawdi/blob/main/apps/web/src/hosted/v2/ai-providers/ai-providers-page.tsx): `apps/web/src/hosted/v2/ai-providers/ai-providers-page.tsx`
- [Hosted billing](https://github.com/clawdi-ai/clawdi/blob/main/apps/web/src/hosted/billing/subscription/subscription-page.tsx): `apps/web/src/hosted/billing/subscription/subscription-page.tsx`

### Other components

- **User**
- **Stripe**

## Connections

- User → Web dashboard: uses
- User → Desktop app: uses
- User → Connected agent: connects
- User → Cloud agent: deploys
- Web dashboard → Web API client: requests
- Web API client → FastAPI service: calls
- CLI and adapters → Connected agent: scans sessions
- CLI and adapters → FastAPI service: syncs sessions and skills
- FastAPI service → PostgreSQL: reads and writes
- Web dashboard → Sessions and memories: manages
- Web dashboard → Projects and resources: manages
- Web dashboard → Skills: manages
- Web dashboard → Vaults: manages
- Web dashboard → MCP connectors: configures
- Web dashboard → Messaging channels: configures
- Web dashboard → AI providers: configures
- Web dashboard → Hosted billing: manages
- Hosted billing → Stripe: processes payments
