# atlanai/ai-registry architecture

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

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

## Overview

ai-registry is an open-format agent registry specification and aireg is its CLI client. The main user workflow is to add a registry, install selected artifacts, record exact versions, and link them into coding-agent directories; users can also publish and synchronize artifacts. The CLI includes terminal and browser interfaces, plus a daemon for job and run management. The README establishes the product workflow, while sampled excerpts show parts of the installer and browser UI wiring; unsampled implementation links are omitted or marked unverified.

Main entry points: [`cli/src/main.ts`](https://github.com/atlanai/ai-registry/blob/main/cli/src/main.ts) (aireg CLI), [`cli/src/engine/install/pipeline.ts`](https://github.com/atlanai/ai-registry/blob/main/cli/src/engine/install/pipeline.ts) (Install planning), [`cli/src/cli/ui/server.ts`](https://github.com/atlanai/ai-registry/blob/main/cli/src/cli/ui/server.ts) (Browser UI server), [`cli/ui/src/lib/rpc.ts`](https://github.com/atlanai/ai-registry/blob/main/cli/ui/src/lib/rpc.ts) (Browser RPC client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI experience"]
  node_cli["aireg CLI<br/>[main.ts]"]
  node_commands["Command workflows"]
  node_terminal["Terminal console<br/>[app.ts]"]
end

subgraph group_registry["Registry access"]
  node_registry_sources["Registry adapters"]
  node_registry_format["Registry format<br/>[parse.ts]"]
end

subgraph group_lifecycle["Artifact lifecycle"]
  node_install["Install planning<br/>[pipeline.ts]"]
  node_targets["Agent targets"]
  node_manifest["Lock manifest<br/>[repository.ts]"]
  node_publish["Publish workflow"]
  node_sync["Sync workflow"]
end

subgraph group_runtime["Background runtime"]
  node_daemon["Daemon runtime<br/>[runtime.ts]"]
  node_daemon_rpc["Daemon RPC<br/>[server.ts]"]
  node_job_runner["Job scheduler<br/>[scheduler.ts]"]
end

subgraph group_web["Browser interface"]
  node_ui_server["Browser UI server<br/>[server.ts]"]
  node_ui_operations["UI operations<br/>[operations.ts]"]
  node_ui_protocol["UI RPC contract<br/>[protocol.ts]"]
  node_web_app["Browser app<br/>[app.tsx]"]
  node_web_rpc["Browser RPC client<br/>[rpc.ts]"]
  node_web_state["Browser state<br/>[state.ts]"]
end

node_user(("CLI user"))
node_external_registry[("Registry files")]
node_agent_dirs[("Agent directories")]

node_user -->|"runs commands"| node_cli
node_cli -->|"reads registries"| node_registry_sources
node_external_registry -->|"serves files"| node_registry_sources
node_cli -->|"installs artifacts"| node_install
node_install -->|"records versions"| node_manifest
node_install -->|"links artifacts"| node_agent_dirs
node_cli -->|"publishes artifacts"| node_publish
node_cli -->|"syncs agents"| node_sync
node_cli -.->|"opens console"| node_terminal
node_ui_server -->|"dispatches actions"| node_ui_operations
node_web_app -->|"requests operations"| node_web_rpc
node_web_state -->|"fetches state"| node_web_rpc
node_web_rpc -->|"posts RPC"| node_ui_server
node_ui_server -->|"implements contract"| node_ui_protocol
node_daemon -.->|"serves RPC"| node_daemon_rpc
node_daemon -.->|"schedules jobs"| node_job_runner

click node_cli "https://github.com/atlanai/ai-registry/blob/main/cli/src/main.ts"
click node_commands "https://github.com/atlanai/ai-registry/tree/main/cli/src/cli/commands"
click node_terminal "https://github.com/atlanai/ai-registry/blob/main/cli/src/cli/console/ui/app.ts"
click node_registry_sources "https://github.com/atlanai/ai-registry/tree/main/cli/src/adapters"
click node_registry_format "https://github.com/atlanai/ai-registry/blob/main/cli/src/core/manifest/parse.ts"
click node_install "https://github.com/atlanai/ai-registry/blob/main/cli/src/engine/install/pipeline.ts"
click node_targets "https://github.com/atlanai/ai-registry/tree/main/cli/src/targets"
click node_manifest "https://github.com/atlanai/ai-registry/blob/main/cli/src/core/manifest/repository.ts"
click node_publish "https://github.com/atlanai/ai-registry/tree/main/cli/src/engine/publish"
click node_sync "https://github.com/atlanai/ai-registry/tree/main/cli/src/engine/sync"
click node_daemon "https://github.com/atlanai/ai-registry/blob/main/cli/src/daemon/runtime.ts"
click node_daemon_rpc "https://github.com/atlanai/ai-registry/blob/main/cli/src/daemon/rpc/server.ts"
click node_job_runner "https://github.com/atlanai/ai-registry/blob/main/cli/src/daemon/runs/scheduler.ts"
click node_ui_server "https://github.com/atlanai/ai-registry/blob/main/cli/src/cli/ui/server.ts"
click node_ui_operations "https://github.com/atlanai/ai-registry/blob/main/cli/src/cli/ui/operations.ts"
click node_ui_protocol "https://github.com/atlanai/ai-registry/blob/main/cli/src/cli/ui/protocol.ts"
click node_web_app "https://github.com/atlanai/ai-registry/blob/main/cli/ui/src/app.tsx"
click node_web_rpc "https://github.com/atlanai/ai-registry/blob/main/cli/ui/src/lib/rpc.ts"
click node_web_state "https://github.com/atlanai/ai-registry/blob/main/cli/ui/src/lib/state.ts"

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_cli,node_commands,node_terminal,node_user toneBlue
class node_registry_sources,node_registry_format,node_external_registry,node_agent_dirs toneAmber
class node_install,node_targets,node_manifest,node_publish,node_sync toneMint
class node_daemon,node_daemon_rpc,node_job_runner toneRose
class node_ui_server,node_ui_operations,node_ui_protocol,node_web_app,node_web_rpc,node_web_state toneIndigo
```

## Components

### CLI experience

- [aireg CLI](https://github.com/atlanai/ai-registry/blob/main/cli/src/main.ts): `cli/src/main.ts`
- [Command workflows](https://github.com/atlanai/ai-registry/tree/main/cli/src/cli/commands): `cli/src/cli/commands`
- [Terminal console](https://github.com/atlanai/ai-registry/blob/main/cli/src/cli/console/ui/app.ts): `cli/src/cli/console/ui/app.ts`

### Registry access

- [Registry adapters](https://github.com/atlanai/ai-registry/tree/main/cli/src/adapters): `cli/src/adapters`
- [Registry format](https://github.com/atlanai/ai-registry/blob/main/cli/src/core/manifest/parse.ts): `cli/src/core/manifest/parse.ts`

### Artifact lifecycle

- [Install planning](https://github.com/atlanai/ai-registry/blob/main/cli/src/engine/install/pipeline.ts): `cli/src/engine/install/pipeline.ts`
- [Agent targets](https://github.com/atlanai/ai-registry/tree/main/cli/src/targets): `cli/src/targets`
- [Lock manifest](https://github.com/atlanai/ai-registry/blob/main/cli/src/core/manifest/repository.ts): `cli/src/core/manifest/repository.ts`
- [Publish workflow](https://github.com/atlanai/ai-registry/tree/main/cli/src/engine/publish): `cli/src/engine/publish`
- [Sync workflow](https://github.com/atlanai/ai-registry/tree/main/cli/src/engine/sync): `cli/src/engine/sync`

### Background runtime

- [Daemon runtime](https://github.com/atlanai/ai-registry/blob/main/cli/src/daemon/runtime.ts): `cli/src/daemon/runtime.ts`
- [Daemon RPC](https://github.com/atlanai/ai-registry/blob/main/cli/src/daemon/rpc/server.ts): `cli/src/daemon/rpc/server.ts`
- [Job scheduler](https://github.com/atlanai/ai-registry/blob/main/cli/src/daemon/runs/scheduler.ts): `cli/src/daemon/runs/scheduler.ts`

### Browser interface

- [Browser UI server](https://github.com/atlanai/ai-registry/blob/main/cli/src/cli/ui/server.ts): `cli/src/cli/ui/server.ts`
- [UI operations](https://github.com/atlanai/ai-registry/blob/main/cli/src/cli/ui/operations.ts): `cli/src/cli/ui/operations.ts`
- [UI RPC contract](https://github.com/atlanai/ai-registry/blob/main/cli/src/cli/ui/protocol.ts): `cli/src/cli/ui/protocol.ts`
- [Browser app](https://github.com/atlanai/ai-registry/blob/main/cli/ui/src/app.tsx): `cli/ui/src/app.tsx`
- [Browser RPC client](https://github.com/atlanai/ai-registry/blob/main/cli/ui/src/lib/rpc.ts): `cli/ui/src/lib/rpc.ts`
- [Browser state](https://github.com/atlanai/ai-registry/blob/main/cli/ui/src/lib/state.ts): `cli/ui/src/lib/state.ts`

### Other components

- **CLI user**
- **Registry files**
- **Agent directories**

## Connections

- CLI user → aireg CLI: runs commands (evidence: `README.md`)
- aireg CLI → Registry adapters: reads registries (evidence: `README.md`)
- Registry files → Registry adapters: serves files (evidence: `README.md`)
- aireg CLI → Install planning: installs artifacts (evidence: `README.md`)
- Install planning → Lock manifest: records versions (evidence: `README.md`)
- Install planning → Agent directories: links artifacts (evidence: `README.md`)
- aireg CLI → Publish workflow: publishes artifacts (evidence: `README.md`)
- aireg CLI → Sync workflow: syncs agents (evidence: `README.md`)
- aireg CLI → Terminal console: opens console
- Browser UI server → UI operations: dispatches actions (evidence: `cli/src/cli/ui/server.ts`)
- Browser app → Browser RPC client: requests operations (evidence: `cli/ui/src/app.tsx`)
- Browser state → Browser RPC client: fetches state (evidence: `cli/ui/src/lib/state.ts`)
- Browser RPC client → Browser UI server: posts RPC (evidence: `cli/ui/src/lib/rpc.ts`)
- Browser UI server → UI RPC contract: implements contract (evidence: `cli/src/cli/ui/protocol.ts`)
- Daemon runtime → Daemon RPC: serves RPC
- Daemon runtime → Job scheduler: schedules jobs
