# veeresh-bikkaneti/airlock architecture

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

- Interactive diagram: https://gitdiagram.com/veeresh-bikkaneti/airlock
- Repository: https://github.com/veeresh-bikkaneti/airlock

## Overview

Airlock is a Windows-first local AI platform with two distinct user workflows: start a machine-sized chat backend, or start a separately sized coding backend and verify its tool-calling capability. The platform also offers model selection and switching, an OpenAI-compatible tool-calling proxy, and a memory service that supports retrieval-augmented chat and coding sessions. The graph includes the sampled memory-service internals; unsampled PowerShell runtime behavior is represented only where the README documents it, so some subsystem links are omitted.

Main entry points: [`memory-service/app/main.py`](https://github.com/veeresh-bikkaneti/airlock/blob/main/memory-service/app/main.py) (Memory API), [`scripts/Start-AI.ps1`](https://github.com/veeresh-bikkaneti/airlock/blob/main/scripts/Start-AI.ps1) (Chat Startup), [`memory-service/app/proxy.py`](https://github.com/veeresh-bikkaneti/airlock/blob/main/memory-service/app/proxy.py) (Backend Forwarding), [`memory-service/app/memory_store.py`](https://github.com/veeresh-bikkaneti/airlock/blob/main/memory-service/app/memory_store.py) (Vector Memory Store)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User Interfaces"]
  node_vscode["VS Code Extension<br/>[extension.ts]"]
  node_cli["AI CLI Helpers"]
end

subgraph group_runtime["Local Runtime"]
  node_chat_start["Chat Startup<br/>[Start-AI.ps1]"]
  node_coding_start["Coding Session"]
  node_model_fit["Backend Capability"]
  node_ollama["Ollama Backend"]
  node_vllm["vLLM Backend<br/>[Start-VLLM.ps1]"]
  node_llama["llama.cpp Backend<br/>[llamacpp.ps1]"]
  node_model_config["Model Registry<br/>[models.json]"]
end

subgraph group_memory["Memory Service"]
  node_memory_api["Memory API<br/>[main.py]"]
  node_memory_graph["Chat Retrieval Graph<br/>[graph.py]"]
  node_memory_store[("Vector Memory Store<br/>[memory_store.py]")]
  node_embeddings["Embedding Backends<br/>[embeddings.py]"]
  node_checkpointer[("Session Checkpointer<br/>[checkpointer.py]")]
  node_memory_config["Memory Configuration<br/>[config.py]"]
  node_backend_proxy["Backend Forwarding<br/>[proxy.py]"]
  node_audit["Audit Logging<br/>[audit.py]"]
end

subgraph group_proxies["Compatibility Proxies"]
  node_tool_proxy["Tool-Calling Proxy<br/>[main.py]"]
end

node_user(("User"))

node_user -->|"starts or manages"| node_cli
node_user -->|"controls platform"| node_vscode
node_vscode -->|"runs helpers"| node_cli
node_cli -->|"starts chat"| node_chat_start
node_chat_start -->|"checks backend"| node_model_fit
node_chat_start -->|"starts backend"| node_ollama
node_chat_start -->|"may invoke"| node_vllm
node_user -->|"starts coding"| node_coding_start
node_coding_start -->|"starts backend"| node_llama
node_vscode -->|"reads models"| node_model_config
node_user -.->|"sends tool requests"| node_tool_proxy
node_memory_api -.->|"orchestrates retrieval"| node_memory_graph
node_memory_graph -->|"recalls memories"| node_memory_store
node_memory_store -->|"embeds documents"| node_embeddings
node_memory_api -->|"stores and recalls"| node_memory_store
node_memory_api -.->|"uses session state"| node_checkpointer
node_memory_api -.->|"forwards chat"| node_backend_proxy
node_memory_api -.->|"records events"| node_audit
node_memory_store -->|"loads settings"| node_memory_config
node_embeddings -->|"reads endpoints"| node_memory_config
node_memory_api -.->|"loads paths"| node_memory_config
node_backend_proxy -.->|"forwards chat"| node_ollama
node_backend_proxy -.->|"forwards chat"| node_vllm
node_backend_proxy -.->|"forwards coding"| node_llama
node_audit -->|"uses platform paths"| node_memory_config

click node_vscode "https://github.com/veeresh-bikkaneti/airlock/blob/main/src/extension.ts"
click node_cli "https://github.com/veeresh-bikkaneti/airlock/blob/main/scripts/profile-helpers.ps1"
click node_chat_start "https://github.com/veeresh-bikkaneti/airlock/blob/main/scripts/Start-AI.ps1"
click node_coding_start "https://github.com/veeresh-bikkaneti/airlock/blob/main/scripts/Start-AgentSession.ps1"
click node_model_fit "https://github.com/veeresh-bikkaneti/airlock/blob/main/scripts/Get-BackendCapability.ps1"
click node_vllm "https://github.com/veeresh-bikkaneti/airlock/blob/main/scripts/Start-VLLM.ps1"
click node_llama "https://github.com/veeresh-bikkaneti/airlock/blob/main/scripts/runtime-adapters/llamacpp.ps1"
click node_model_config "https://github.com/veeresh-bikkaneti/airlock/blob/main/config/models.json"
click node_tool_proxy "https://github.com/veeresh-bikkaneti/airlock/blob/main/tool-proxy/app/main.py"
click node_memory_api "https://github.com/veeresh-bikkaneti/airlock/blob/main/memory-service/app/main.py"
click node_memory_graph "https://github.com/veeresh-bikkaneti/airlock/blob/main/memory-service/app/graph.py"
click node_memory_store "https://github.com/veeresh-bikkaneti/airlock/blob/main/memory-service/app/memory_store.py"
click node_embeddings "https://github.com/veeresh-bikkaneti/airlock/blob/main/memory-service/app/embeddings.py"
click node_checkpointer "https://github.com/veeresh-bikkaneti/airlock/blob/main/memory-service/app/checkpointer.py"
click node_memory_config "https://github.com/veeresh-bikkaneti/airlock/blob/main/memory-service/app/config.py"
click node_backend_proxy "https://github.com/veeresh-bikkaneti/airlock/blob/main/memory-service/app/proxy.py"
click node_audit "https://github.com/veeresh-bikkaneti/airlock/blob/main/memory-service/app/audit.py"

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_vscode,node_cli,node_user toneBlue
class node_chat_start,node_coding_start,node_model_fit,node_ollama,node_vllm,node_llama,node_model_config toneAmber
class node_memory_api,node_memory_graph,node_memory_store,node_embeddings,node_checkpointer,node_memory_config,node_backend_proxy,node_audit toneMint
class node_tool_proxy toneRose
```

## Components

### User Interfaces

- [VS Code Extension](https://github.com/veeresh-bikkaneti/airlock/blob/main/src/extension.ts): `src/extension.ts`
- [AI CLI Helpers](https://github.com/veeresh-bikkaneti/airlock/blob/main/scripts/profile-helpers.ps1): `scripts/profile-helpers.ps1`

### Local Runtime

- [Chat Startup](https://github.com/veeresh-bikkaneti/airlock/blob/main/scripts/Start-AI.ps1): `scripts/Start-AI.ps1`
- [Coding Session](https://github.com/veeresh-bikkaneti/airlock/blob/main/scripts/Start-AgentSession.ps1): `scripts/Start-AgentSession.ps1`
- [Backend Capability](https://github.com/veeresh-bikkaneti/airlock/blob/main/scripts/Get-BackendCapability.ps1): `scripts/Get-BackendCapability.ps1`
- **Ollama Backend**
- [vLLM Backend](https://github.com/veeresh-bikkaneti/airlock/blob/main/scripts/Start-VLLM.ps1): `scripts/Start-VLLM.ps1`
- [llama.cpp Backend](https://github.com/veeresh-bikkaneti/airlock/blob/main/scripts/runtime-adapters/llamacpp.ps1): `scripts/runtime-adapters/llamacpp.ps1`
- [Model Registry](https://github.com/veeresh-bikkaneti/airlock/blob/main/config/models.json): `config/models.json`

### Memory Service

- [Memory API](https://github.com/veeresh-bikkaneti/airlock/blob/main/memory-service/app/main.py): `memory-service/app/main.py`
- [Chat Retrieval Graph](https://github.com/veeresh-bikkaneti/airlock/blob/main/memory-service/app/graph.py): `memory-service/app/graph.py`
- [Vector Memory Store](https://github.com/veeresh-bikkaneti/airlock/blob/main/memory-service/app/memory_store.py): `memory-service/app/memory_store.py`
- [Embedding Backends](https://github.com/veeresh-bikkaneti/airlock/blob/main/memory-service/app/embeddings.py): `memory-service/app/embeddings.py`
- [Session Checkpointer](https://github.com/veeresh-bikkaneti/airlock/blob/main/memory-service/app/checkpointer.py): `memory-service/app/checkpointer.py`
- [Memory Configuration](https://github.com/veeresh-bikkaneti/airlock/blob/main/memory-service/app/config.py): `memory-service/app/config.py`
- [Backend Forwarding](https://github.com/veeresh-bikkaneti/airlock/blob/main/memory-service/app/proxy.py): `memory-service/app/proxy.py`
- [Audit Logging](https://github.com/veeresh-bikkaneti/airlock/blob/main/memory-service/app/audit.py): `memory-service/app/audit.py`

### Compatibility Proxies

- [Tool-Calling Proxy](https://github.com/veeresh-bikkaneti/airlock/blob/main/tool-proxy/app/main.py): `tool-proxy/app/main.py`

### Other components

- **User**

## Connections

- User → AI CLI Helpers: starts or manages (evidence: `README.md`)
- User → VS Code Extension: controls platform (evidence: `README.md`)
- VS Code Extension → AI CLI Helpers: runs helpers (evidence: `src/extension.ts`)
- AI CLI Helpers → Chat Startup: starts chat (evidence: `README.md`)
- Chat Startup → Backend Capability: checks backend (evidence: `README.md`)
- Chat Startup → Ollama Backend: starts backend (evidence: `README.md`)
- Chat Startup → vLLM Backend: may invoke (evidence: `README.md`)
- User → Coding Session: starts coding (evidence: `README.md`)
- Coding Session → llama.cpp Backend: starts backend (evidence: `README.md`)
- VS Code Extension → Model Registry: reads models (evidence: `src/extension.ts`)
- User → Tool-Calling Proxy: sends tool requests
- Memory API → Chat Retrieval Graph: orchestrates retrieval (evidence: `memory-service/app/main.py`)
- Chat Retrieval Graph → Vector Memory Store: recalls memories (evidence: `memory-service/app/graph.py`)
- Vector Memory Store → Embedding Backends: embeds documents (evidence: `memory-service/app/memory_store.py`)
- Memory API → Vector Memory Store: stores and recalls (evidence: `memory-service/app/main.py`)
- Memory API → Session Checkpointer: uses session state (evidence: `memory-service/app/main.py`)
- Memory API → Backend Forwarding: forwards chat (evidence: `memory-service/app/main.py`)
- Memory API → Audit Logging: records events (evidence: `memory-service/app/main.py`)
- Vector Memory Store → Memory Configuration: loads settings (evidence: `memory-service/app/memory_store.py`)
- Embedding Backends → Memory Configuration: reads endpoints (evidence: `memory-service/app/embeddings.py`)
- Memory API → Memory Configuration: loads paths (evidence: `memory-service/app/main.py`)
- Backend Forwarding → Ollama Backend: forwards chat
- Backend Forwarding → vLLM Backend: forwards chat
- Backend Forwarding → llama.cpp Backend: forwards coding
- Audit Logging → Memory Configuration: uses platform paths (evidence: `memory-service/app/audit.py`)
