# tabbyml/tabby architecture

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

- Interactive diagram: https://gitdiagram.com/tabbyml/tabby
- Repository: https://github.com/tabbyml/tabby

## Overview

Tabby is a self-hosted AI coding assistant: IDE users request code completions or chat assistance, while the server exposes API capabilities and can use local models. The repository also includes repository/document ingestion and an enterprise web application. The graph preserves those documented product branches, but the excerpts do not expose the complete server, retrieval, indexing, or UI call paths; those relationships are therefore omitted or marked unverified.

Main entry points: [`clients/intellij/src/main/kotlin/com/tabbyml/intellijtabby/completion/InlineCompletionService.kt`](https://github.com/tabbyml/tabby/blob/main/clients/intellij/src/main/kotlin/com/tabbyml/intellijtabby/completion/InlineCompletionService.kt) (IntelliJ plugin), [`clients/tabby-agent/src/server.ts`](https://github.com/tabbyml/tabby/blob/main/clients/tabby-agent/src/server.ts) (Language server), [`clients/eclipse/plugin/src/com/tabbyml/tabby4eclipse/inlineCompletion/InlineCompletionService.java`](https://github.com/tabbyml/tabby/blob/main/clients/eclipse/plugin/src/com/tabbyml/tabby4eclipse/inlineCompletion/InlineCompletionService.java) (Eclipse plugin), [`crates/tabby/src/serve.rs`](https://github.com/tabbyml/tabby/blob/main/crates/tabby/src/serve.rs) (API serving)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ide["IDE clients"]
  node_eclipse["Eclipse plugin"]
  node_intellij["IntelliJ plugin"]
  node_connection["Agent connection"]
  node_settings["IDE settings<br/>[SettingsService.kt]"]
end

subgraph group_agent["Agent runtime"]
  node_agentserver["Language server<br/>[server.ts]"]
  node_completion["Completion engine<br/>[index.ts]"]
  node_chat["Chat and inline edit<br/>[inlineEdit.ts]"]
  node_api["Tabby API client<br/>[tabbyApiClient.ts]"]
  node_chatpanel["Chat panel"]
end

subgraph group_server["Server and AI"]
  node_servercli["Server CLI<br/>[main.rs]"]
  node_serve["API serving<br/>[serve.rs]"]
  node_inference["Model inference<br/>[lib.rs]"]
end

subgraph group_knowledge["Knowledge and UI"]
  node_indexing["Repository indexing"]
  node_crawler["Document crawling<br/>[llms_txt_parser.rs]"]
  node_ingestion["Ingestion API<br/>[ingestion.rs]"]
  node_database[("Enterprise storage<br/>[ingestion.rs]")]
  node_webapp["Admin and answer UI"]
end

node_developer(("Developer"))
node_externalapi(("IDE and API consumers"))

node_developer -->|"uses"| node_eclipse
node_developer -->|"uses"| node_intellij
node_intellij -->|"requests agent"| node_connection
node_connection -->|"starts process"| node_agentserver
node_intellij -.->|"requests completion"| node_completion
node_eclipse -.->|"requests completion"| node_completion
node_eclipse -->|"renders suggestions"| node_eclipse
node_intellij -->|"renders suggestions"| node_intellij
node_settings -.->|"configures connection"| node_connection
node_agentserver -->|"initializes client"| node_api
node_agentserver -->|"initializes feature"| node_completion
node_agentserver -->|"initializes feature"| node_chat
node_completion -.->|"uses API"| node_api
node_chat -.->|"uses API"| node_api
node_developer -->|"uses chat"| node_chatpanel
node_externalapi -->|"calls API"| node_serve
node_servercli -->|"dispatches serve"| node_serve
node_servercli -.->|"loads model"| node_inference
node_serve -.->|"serves inference"| node_inference
node_serve -.->|"uses repository context"| node_indexing
node_crawler -.->|"provides documents"| node_ingestion
node_ingestion -.->|"stores ingestion"| node_database
node_developer -.->|"uses dashboard"| node_webapp
node_webapp -.->|"manages ingestion"| node_ingestion

click node_eclipse "https://github.com/tabbyml/tabby/blob/main/clients/eclipse/plugin/src/com/tabbyml/tabby4eclipse/inlineCompletion/InlineCompletionService.java"
click node_intellij "https://github.com/tabbyml/tabby/blob/main/clients/intellij/src/main/kotlin/com/tabbyml/intellijtabby/completion/InlineCompletionService.kt"
click node_connection "https://github.com/tabbyml/tabby/blob/main/clients/intellij/src/main/kotlin/com/tabbyml/intellijtabby/lsp/ConnectionService.kt"
click node_settings "https://github.com/tabbyml/tabby/blob/main/clients/intellij/src/main/kotlin/com/tabbyml/intellijtabby/settings/SettingsService.kt"
click node_agentserver "https://github.com/tabbyml/tabby/blob/main/clients/tabby-agent/src/server.ts"
click node_completion "https://github.com/tabbyml/tabby/blob/main/clients/tabby-agent/src/codeCompletion/index.ts"
click node_chat "https://github.com/tabbyml/tabby/blob/main/clients/tabby-agent/src/chat/inlineEdit.ts"
click node_api "https://github.com/tabbyml/tabby/blob/main/clients/tabby-agent/src/http/tabbyApiClient.ts"
click node_servercli "https://github.com/tabbyml/tabby/blob/main/crates/tabby/src/main.rs"
click node_serve "https://github.com/tabbyml/tabby/blob/main/crates/tabby/src/serve.rs"
click node_inference "https://github.com/tabbyml/tabby/blob/main/crates/tabby-inference/src/lib.rs"
click node_indexing "https://github.com/tabbyml/tabby/tree/main/crates/tabby-index/src"
click node_crawler "https://github.com/tabbyml/tabby/blob/main/crates/tabby-crawler/src/llms_txt_parser.rs"
click node_ingestion "https://github.com/tabbyml/tabby/blob/main/ee/tabby-webserver/src/routes/ingestion.rs"
click node_database "https://github.com/tabbyml/tabby/blob/main/ee/tabby-db/src/ingestion.rs"
click node_webapp "https://github.com/tabbyml/tabby/tree/main/ee/tabby-ui/app"
click node_chatpanel "https://github.com/tabbyml/tabby/tree/main/clients/tabby-chat-panel/src"

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_eclipse,node_intellij,node_connection,node_settings toneBlue
class node_agentserver,node_completion,node_chat,node_api,node_chatpanel toneAmber
class node_servercli,node_serve,node_inference,node_externalapi toneMint
class node_indexing,node_crawler,node_ingestion,node_database,node_webapp toneRose
class node_developer toneIndigo
```

## Components

### IDE clients

- [Eclipse plugin](https://github.com/tabbyml/tabby/blob/main/clients/eclipse/plugin/src/com/tabbyml/tabby4eclipse/inlineCompletion/InlineCompletionService.java): `clients/eclipse/plugin/src/com/tabbyml/tabby4eclipse/inlineCompletion/InlineCompletionService.java`
- [IntelliJ plugin](https://github.com/tabbyml/tabby/blob/main/clients/intellij/src/main/kotlin/com/tabbyml/intellijtabby/completion/InlineCompletionService.kt): `clients/intellij/src/main/kotlin/com/tabbyml/intellijtabby/completion/InlineCompletionService.kt`
- [Agent connection](https://github.com/tabbyml/tabby/blob/main/clients/intellij/src/main/kotlin/com/tabbyml/intellijtabby/lsp/ConnectionService.kt): `clients/intellij/src/main/kotlin/com/tabbyml/intellijtabby/lsp/ConnectionService.kt`
- [IDE settings](https://github.com/tabbyml/tabby/blob/main/clients/intellij/src/main/kotlin/com/tabbyml/intellijtabby/settings/SettingsService.kt): `clients/intellij/src/main/kotlin/com/tabbyml/intellijtabby/settings/SettingsService.kt`

### Agent runtime

- [Language server](https://github.com/tabbyml/tabby/blob/main/clients/tabby-agent/src/server.ts): `clients/tabby-agent/src/server.ts`
- [Completion engine](https://github.com/tabbyml/tabby/blob/main/clients/tabby-agent/src/codeCompletion/index.ts): `clients/tabby-agent/src/codeCompletion/index.ts`
- [Chat and inline edit](https://github.com/tabbyml/tabby/blob/main/clients/tabby-agent/src/chat/inlineEdit.ts): `clients/tabby-agent/src/chat/inlineEdit.ts`
- [Tabby API client](https://github.com/tabbyml/tabby/blob/main/clients/tabby-agent/src/http/tabbyApiClient.ts): `clients/tabby-agent/src/http/tabbyApiClient.ts`
- [Chat panel](https://github.com/tabbyml/tabby/tree/main/clients/tabby-chat-panel/src): `clients/tabby-chat-panel/src`

### Server and AI

- [Server CLI](https://github.com/tabbyml/tabby/blob/main/crates/tabby/src/main.rs): `crates/tabby/src/main.rs`
- [API serving](https://github.com/tabbyml/tabby/blob/main/crates/tabby/src/serve.rs): `crates/tabby/src/serve.rs`
- [Model inference](https://github.com/tabbyml/tabby/blob/main/crates/tabby-inference/src/lib.rs): `crates/tabby-inference/src/lib.rs`

### Knowledge and UI

- [Repository indexing](https://github.com/tabbyml/tabby/tree/main/crates/tabby-index/src): `crates/tabby-index/src`
- [Document crawling](https://github.com/tabbyml/tabby/blob/main/crates/tabby-crawler/src/llms_txt_parser.rs): `crates/tabby-crawler/src/llms_txt_parser.rs`
- [Ingestion API](https://github.com/tabbyml/tabby/blob/main/ee/tabby-webserver/src/routes/ingestion.rs): `ee/tabby-webserver/src/routes/ingestion.rs`
- [Enterprise storage](https://github.com/tabbyml/tabby/blob/main/ee/tabby-db/src/ingestion.rs): `ee/tabby-db/src/ingestion.rs`
- [Admin and answer UI](https://github.com/tabbyml/tabby/tree/main/ee/tabby-ui/app): `ee/tabby-ui/app`

### Other components

- **Developer**
- **IDE and API consumers**

## Connections

- Developer → Eclipse plugin: uses (evidence: `README.md`)
- Developer → IntelliJ plugin: uses (evidence: `README.md`)
- IntelliJ plugin → Agent connection: requests agent (evidence: `clients/intellij/src/main/kotlin/com/tabbyml/intellijtabby/lsp/ConnectionService.kt`)
- Agent connection → Language server: starts process (evidence: `clients/intellij/src/main/kotlin/com/tabbyml/intellijtabby/lsp/ConnectionService.kt`)
- IntelliJ plugin → Completion engine: requests completion
- Eclipse plugin → Completion engine: requests completion
- Eclipse plugin → Eclipse plugin: renders suggestions (evidence: `clients/eclipse/plugin/src/com/tabbyml/tabby4eclipse/inlineCompletion/InlineCompletionService.java`)
- IntelliJ plugin → IntelliJ plugin: renders suggestions (evidence: `clients/intellij/src/main/kotlin/com/tabbyml/intellijtabby/completion/InlineCompletionService.kt`)
- IDE settings → Agent connection: configures connection (evidence: `clients/intellij/src/main/kotlin/com/tabbyml/intellijtabby/lsp/ConnectionService.kt`)
- Language server → Tabby API client: initializes client (evidence: `clients/tabby-agent/src/server.ts`)
- Language server → Completion engine: initializes feature (evidence: `clients/tabby-agent/src/server.ts`)
- Language server → Chat and inline edit: initializes feature (evidence: `clients/tabby-agent/src/server.ts`)
- Completion engine → Tabby API client: uses API
- Chat and inline edit → Tabby API client: uses API
- Developer → Chat panel: uses chat (evidence: `README.md`)
- IDE and API consumers → API serving: calls API (evidence: `README.md`)
- Server CLI → API serving: dispatches serve (evidence: `crates/tabby/src/main.rs`)
- Server CLI → Model inference: loads model
- API serving → Model inference: serves inference
- API serving → Repository indexing: uses repository context
- Document crawling → Ingestion API: provides documents
- Ingestion API → Enterprise storage: stores ingestion
- Developer → Admin and answer UI: uses dashboard
- Admin and answer UI → Ingestion API: manages ingestion
