# letta-ai/letta architecture

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

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

## Overview

#### Purpose and Scope

This repository is the public project landing repository for Letta, a platform for building stateful AI agents with persistent memory and learning behavior. It does not contain the active runtime implementation; that lives in the external `letta-ai/letta-code` repository.

#### User-Facing Entry Points

The documented operational entry points are provided by the external npm package:

- `letta` launches the interactive terminal UI.
- `letta server` starts an App Server for local or self-hosted agents.
- Desktop, web, messaging-channel, SDK, and cloud access are documented integrations rather than source components in this repository.

Grounding: `README.md`

#### Active Source Boundary

The README explicitly delegates the agent harness, terminal UI, App Server, channels, and runtime to `letta-ai/letta-code`. Architecture work requiring executable code, service boundaries, persistence design, or agent orchestration must inspect that repository rather than infer implementations here.

A retired V1 API-server codebase is retained only on the external `archive` branch for reproducibility.

Grounding: `README.md`

#### Documentation and Governance Layer

This repository’s material contents are project policy, contribution, legal, and security surfaces rather than application modules. They establish how the external active codebase is governed and consumed.

- Contribution and operating expectations: `CONTRIBUTING.md`, `AGENTS.md`
- AI usage policy: `AI_POLICY.md`
- Security reporting and posture: `SECURITY.md`
- Privacy, terms, license, and citation: `PRIVACY.md`, `TERMS.md`, `LICENSE`, `CITATION.cff`

#### Automation and Repository Controls

GitHub automation is limited to issue governance rather than build, deployment, or runtime infrastructure. The issue guard workflow and contributor trust list form the visible intake-control boundary.

Grounding: `.github/workflows/issue-guard.yml`, `.github/TRUSTED_CONTRIBUTORS`, `.github/ISSUE_TEMPLATE/config.yml`

#### Runtime and External Services

Material runtimes and services described by the project are external to this tree:

- Node/npm distributes `@letta-ai/letta-code`.
- The Letta CLI hosts terminal and server entry modes.
- Letta Cloud provides cross-device persistence for agent memory, identity, and conversations.
- External clients include desktop, `chat.letta.com`, Slack, Telegram, Discord, custom channels, and the TypeScript Agent SDK.

Grounding: `README.md`

Main entry points: [`README.md`](https://github.com/letta-ai/letta/blob/main/README.md) (Project README), [`.github/workflows/issue-guard.yml`](https://github.com/letta-ai/letta/blob/main/.github/workflows/issue-guard.yml) (Issue guard workflow), [`CONTRIBUTING.md`](https://github.com/letta-ai/letta/blob/main/CONTRIBUTING.md) (Contribution guidance), [`SECURITY.md`](https://github.com/letta-ai/letta/blob/main/SECURITY.md) (Security policy)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_repo["Public landing repository"]
  node_readme["Project README<br/>project documentation<br/>[README.md]"]
  node_contributing["Contribution guidance<br/>governance<br/>[CONTRIBUTING.md]"]
  node_agents["Operating guidance<br/>governance<br/>[AGENTS.md]"]
  node_ai_policy["AI usage policy<br/>[AI_POLICY.md]"]
  node_security["Security policy<br/>security reporting<br/>[SECURITY.md]"]
  node_legal["Legal and citation<br/>legal documents<br/>[PRIVACY.md]"]
end

subgraph group_controls["Issue intake controls"]
  node_issue_guard{{"Issue guard workflow<br/>GitHub workflow<br/>[issue-guard.yml]"}}
  node_trusted_contributors["Trusted contributor list<br/>intake policy"]
  node_issue_template_config["Issue template config<br/>GitHub issue config<br/>[config.yml]"]
end

subgraph group_external["External Letta platform"]
  node_letta_code["Active Letta codebase<br/>external repository"]
  node_npm_package["@letta-ai/letta-code<br/>npm package"]
  node_letta_cli["Letta CLI<br/>terminal application"]
  node_app_server["App Server<br/>agent server"]
  node_letta_cloud[("Letta Cloud<br/>cloud service")]
  node_external_clients["External clients<br/>integration clients"]
  node_archive_branch["Archive branch<br/>retired codebase"]
end

node_readme -->|"delegates runtime to"| node_letta_code
node_readme -->|"documents installation"| node_npm_package
node_readme -->|"documents commands"| node_letta_cli
node_readme -->|"documents access"| node_letta_cloud
node_readme -->|"documents integrations"| node_external_clients
node_letta_code -->|"published as"| node_npm_package
node_npm_package -->|"installs"| node_letta_cli
node_letta_cli -->|"starts via &#96;letta server&#96;"| node_app_server
node_external_clients -->|"cross-device access"| node_letta_cloud
node_contributing -.->|"paired contributor guidance"| node_agents
node_issue_guard -->|"uses trust list"| node_trusted_contributors
node_issue_guard -->|"governs issue intake"| node_issue_template_config
node_contributing -.->|"contributor intake"| node_issue_guard
node_security -.->|"security reporting for active project"| node_letta_code
node_readme -.->|"notes retired V1 source"| node_archive_branch

click node_readme "https://github.com/letta-ai/letta/blob/main/README.md"
click node_contributing "https://github.com/letta-ai/letta/blob/main/CONTRIBUTING.md"
click node_agents "https://github.com/letta-ai/letta/blob/main/AGENTS.md"
click node_ai_policy "https://github.com/letta-ai/letta/blob/main/AI_POLICY.md"
click node_security "https://github.com/letta-ai/letta/blob/main/SECURITY.md"
click node_legal "https://github.com/letta-ai/letta/blob/main/PRIVACY.md"
click node_issue_guard "https://github.com/letta-ai/letta/blob/main/.github/workflows/issue-guard.yml"
click node_trusted_contributors "https://github.com/letta-ai/letta/blob/main/.github/TRUSTED_CONTRIBUTORS"
click node_issue_template_config "https://github.com/letta-ai/letta/blob/main/.github/ISSUE_TEMPLATE/config.yml"

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_readme,node_contributing,node_agents,node_ai_policy,node_security,node_legal toneBlue
class node_issue_guard,node_trusted_contributors,node_issue_template_config toneAmber
class node_letta_code,node_npm_package,node_letta_cli,node_app_server,node_letta_cloud,node_external_clients,node_archive_branch toneMint
```

## Components

### Public landing repository

Governance and project-facing documentation only.

- [Project README](https://github.com/letta-ai/letta/blob/main/README.md): project documentation · Directs users to supported entry points and the active codebase. · `README.md`
- [Contribution guidance](https://github.com/letta-ai/letta/blob/main/CONTRIBUTING.md): governance · `CONTRIBUTING.md`
- [Operating guidance](https://github.com/letta-ai/letta/blob/main/AGENTS.md): governance · `AGENTS.md`
- [AI usage policy](https://github.com/letta-ai/letta/blob/main/AI_POLICY.md): policy · `AI_POLICY.md`
- [Security policy](https://github.com/letta-ai/letta/blob/main/SECURITY.md): security reporting · `SECURITY.md`
- [Legal and citation](https://github.com/letta-ai/letta/blob/main/PRIVACY.md): legal documents · Privacy, terms, license, and citation materials. · `PRIVACY.md`

### Issue intake controls

- [Issue guard workflow](https://github.com/letta-ai/letta/blob/main/.github/workflows/issue-guard.yml): GitHub workflow · Automates issue-governance checks. · `.github/workflows/issue-guard.yml`
- [Trusted contributor list](https://github.com/letta-ai/letta/blob/main/.github/TRUSTED_CONTRIBUTORS): intake policy · `.github/TRUSTED_CONTRIBUTORS`
- [Issue template config](https://github.com/letta-ai/letta/blob/main/.github/ISSUE_TEMPLATE/config.yml): GitHub issue config · `.github/ISSUE_TEMPLATE/config.yml`

### External Letta platform

Runtime implementation is outside this repository.

- **Active Letta codebase**: external repository · Contains the agent harness, UI, server, channels, and runtime.
- **@letta-ai/letta-code**: npm package · Distributed through Node/npm.
- **Letta CLI**: terminal application · Provides interactive UI and server launch modes.
- **App Server**: agent server · Runs local or self-hosted agents.
- **Letta Cloud**: cloud service · Persists agent memory, identity, and conversations across devices.
- **External clients**: integration clients · Desktop, web, messaging channels, custom channels, and TypeScript SDK.
- **Archive branch**: retired codebase · Retains the V1 API-server code for reproducibility.

## Connections

- Project README → Active Letta codebase: delegates runtime to
- Project README → @letta-ai/letta-code: documents installation
- Project README → Letta CLI: documents commands
- Project README → Letta Cloud: documents access
- Project README → External clients: documents integrations
- Active Letta codebase → @letta-ai/letta-code: published as
- @letta-ai/letta-code → Letta CLI: installs
- Letta CLI → App Server: starts via `letta server`
- External clients → Letta Cloud: cross-device access
- Contribution guidance → Operating guidance: paired contributor guidance
- Issue guard workflow → Trusted contributor list: uses trust list
- Issue guard workflow → Issue template config: governs issue intake
- Contribution guidance → Issue guard workflow: contributor intake
- Security policy → Active Letta codebase: security reporting for active project
- Project README → Archive branch: notes retired V1 source
