# couchbaselabs/agent-catalog architecture

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

- Interactive diagram: https://gitdiagram.com/couchbaselabs/agent-catalog
- Repository: https://github.com/couchbaselabs/agent-catalog

## Overview

Agent Catalog is a Python monorepo for defining, indexing, searching, and running catalogued agent tools and prompts, with activity tracing and framework adapters. The main user path is authoring catalog entries, indexing source into local or Couchbase-backed catalogs, then using catalog/runtime APIs and recording activity. README and sampled source support the broad capabilities; some CLI commands and catalog backends are represented by their exact directories because their implementations were not sampled. Dashed edges indicate relationships not verified in the excerpts.

Main entry points: [`libs/agentc_core/agentc_core/catalog/catalog.py`](https://github.com/couchbaselabs/agent-catalog/blob/master/libs/agentc_core/agentc_core/catalog/catalog.py) (Catalog API), [`libs/agentc_core/agentc_core/catalog/index.py`](https://github.com/couchbaselabs/agent-catalog/blob/master/libs/agentc_core/agentc_core/catalog/index.py) (Catalog indexing), [`libs/agentc_core/agentc_core/activity/span.py`](https://github.com/couchbaselabs/agent-catalog/blob/master/libs/agentc_core/agentc_core/activity/span.py) (Span API), [`libs/agentc_cli/agentc_cli/main.py`](https://github.com/couchbaselabs/agent-catalog/blob/master/libs/agentc_cli/agentc_cli/main.py) (CLI commands)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["Catalog CLI"]
  node_cli_app["CLI commands<br/>[main.py]"]
  node_cli_index["Index command<br/>[index.py]"]
  node_cli_status["Status command<br/>[status.py]"]
  node_cli_other["Catalog operations"]
end

subgraph group_catalog["Catalog Core"]
  node_catalog_index["Catalog indexing<br/>[index.py]"]
  node_record["Tool and prompt records<br/>[descriptor.py]"]
  node_descriptor["Catalog descriptor<br/>[descriptor.py]"]
  node_embedding["Embedding models<br/>[embedding.py]"]
  node_catalog_api["Catalog API<br/>[catalog.py]"]
  node_catalog_store[("Catalog backends")]
  node_config["Configuration<br/>[config.py]"]
end

subgraph group_runtime["Agent Runtime"]
  node_tool_runtime["Tool definitions"]
  node_provider["Provider loading<br/>[provider.py]"]
  node_prompt_models["Prompt models<br/>[models.py]"]
end

subgraph group_activity["Activity Tracing"]
  node_span["Span API<br/>[span.py]"]
  node_activity_content["Activity content<br/>[content.py]"]
  node_activity_logger[("Activity loggers")]
end

subgraph group_integrations["Framework Integrations"]
  node_langchain["LangChain adapter<br/>[chat.py]"]
  node_langgraph_agent["LangGraph agent<br/>[agent.py]"]
  node_langgraph_graph["LangGraph adapter<br/>[graph.py]"]
  node_checkpoint[("Graph checkpoints<br/>[checkpoint.py]")]
  node_llamaindex["LlamaIndex adapter<br/>[chat.py]"]
end

node_user(("Developer"))

node_user -.->|"runs commands"| node_cli_app
node_cli_index -->|"indexes sources"| node_catalog_index
node_catalog_index -->|"builds records"| node_record
node_catalog_index -->|"uses descriptors"| node_descriptor
node_catalog_index -->|"generates embeddings"| node_embedding
node_catalog_index -->|"loads local catalog"| node_catalog_store
node_cli_app -.->|"dispatches"| node_cli_index
node_cli_app -.->|"offers operations"| node_cli_other
node_cli_status -->|"reads catalog metadata"| node_descriptor
node_cli_index -->|"loads settings"| node_config
node_catalog_api -.->|"uses backends"| node_catalog_store
node_catalog_api -.->|"exposes catalogued tools"| node_tool_runtime
node_catalog_api -.->|"exposes prompts"| node_prompt_models
node_provider -->|"loads definitions"| node_record
node_span -->|"records content"| node_activity_content
node_span -->|"writes activity"| node_activity_logger
node_langchain -->|"creates spans"| node_span
node_langchain -->|"logs messages"| node_activity_content
node_langgraph_agent -->|"uses catalog"| node_catalog_api
node_langgraph_agent -->|"uses chat adapter"| node_langchain
node_langgraph_graph -->|"records activity"| node_span
node_langgraph_graph -->|"uses catalog"| node_catalog_api
node_checkpoint -.->|"uses catalog runtime"| node_catalog_api
node_llamaindex -->|"creates spans"| node_span
node_llamaindex -->|"logs messages"| node_activity_content

click node_cli_app "https://github.com/couchbaselabs/agent-catalog/blob/master/libs/agentc_cli/agentc_cli/main.py"
click node_cli_index "https://github.com/couchbaselabs/agent-catalog/blob/master/libs/agentc_cli/agentc_cli/cmds/index.py"
click node_cli_status "https://github.com/couchbaselabs/agent-catalog/blob/master/libs/agentc_cli/agentc_cli/cmds/status.py"
click node_cli_other "https://github.com/couchbaselabs/agent-catalog/tree/master/libs/agentc_cli/agentc_cli/cmds"
click node_catalog_index "https://github.com/couchbaselabs/agent-catalog/blob/master/libs/agentc_core/agentc_core/catalog/index.py"
click node_record "https://github.com/couchbaselabs/agent-catalog/blob/master/libs/agentc_core/agentc_core/record/descriptor.py"
click node_descriptor "https://github.com/couchbaselabs/agent-catalog/blob/master/libs/agentc_core/agentc_core/catalog/descriptor.py"
click node_embedding "https://github.com/couchbaselabs/agent-catalog/blob/master/libs/agentc_core/agentc_core/learned/embedding.py"
click node_catalog_api "https://github.com/couchbaselabs/agent-catalog/blob/master/libs/agentc_core/agentc_core/catalog/catalog.py"
click node_catalog_store "https://github.com/couchbaselabs/agent-catalog/tree/master/libs/agentc_core/agentc_core/catalog/implementations"
click node_config "https://github.com/couchbaselabs/agent-catalog/blob/master/libs/agentc_core/agentc_core/config/config.py"
click node_tool_runtime "https://github.com/couchbaselabs/agent-catalog/tree/master/libs/agentc_core/agentc_core/tool"
click node_provider "https://github.com/couchbaselabs/agent-catalog/blob/master/libs/agentc_core/agentc_core/provider/provider.py"
click node_prompt_models "https://github.com/couchbaselabs/agent-catalog/blob/master/libs/agentc_core/agentc_core/prompt/models.py"
click node_span "https://github.com/couchbaselabs/agent-catalog/blob/master/libs/agentc_core/agentc_core/activity/span.py"
click node_activity_content "https://github.com/couchbaselabs/agent-catalog/blob/master/libs/agentc_core/agentc_core/activity/models/content.py"
click node_activity_logger "https://github.com/couchbaselabs/agent-catalog/tree/master/libs/agentc_core/agentc_core/activity/logger"
click node_langchain "https://github.com/couchbaselabs/agent-catalog/blob/master/libs/agentc_integrations/langchain/agentc_langchain/chat/chat.py"
click node_langgraph_agent "https://github.com/couchbaselabs/agent-catalog/blob/master/libs/agentc_integrations/langgraph/agentc_langgraph/agent/agent.py"
click node_langgraph_graph "https://github.com/couchbaselabs/agent-catalog/blob/master/libs/agentc_integrations/langgraph/agentc_langgraph/graph/graph.py"
click node_checkpoint "https://github.com/couchbaselabs/agent-catalog/blob/master/libs/agentc_integrations/langgraph/agentc_langgraph/state/checkpoint.py"
click node_llamaindex "https://github.com/couchbaselabs/agent-catalog/blob/master/libs/agentc_integrations/llamaindex/agentc_llamaindex/chat/chat.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_cli_app,node_cli_index,node_cli_status,node_cli_other toneBlue
class node_catalog_index,node_record,node_descriptor,node_embedding,node_catalog_api,node_catalog_store,node_config toneAmber
class node_tool_runtime,node_provider,node_prompt_models toneMint
class node_span,node_activity_content,node_activity_logger toneRose
class node_langchain,node_langgraph_agent,node_langgraph_graph,node_checkpoint,node_llamaindex,node_user toneIndigo
```

## Components

### Catalog CLI

- [CLI commands](https://github.com/couchbaselabs/agent-catalog/blob/master/libs/agentc_cli/agentc_cli/main.py): `libs/agentc_cli/agentc_cli/main.py`
- [Index command](https://github.com/couchbaselabs/agent-catalog/blob/master/libs/agentc_cli/agentc_cli/cmds/index.py): `libs/agentc_cli/agentc_cli/cmds/index.py`
- [Status command](https://github.com/couchbaselabs/agent-catalog/blob/master/libs/agentc_cli/agentc_cli/cmds/status.py): `libs/agentc_cli/agentc_cli/cmds/status.py`
- [Catalog operations](https://github.com/couchbaselabs/agent-catalog/tree/master/libs/agentc_cli/agentc_cli/cmds): `libs/agentc_cli/agentc_cli/cmds`

### Catalog Core

- [Catalog indexing](https://github.com/couchbaselabs/agent-catalog/blob/master/libs/agentc_core/agentc_core/catalog/index.py): `libs/agentc_core/agentc_core/catalog/index.py`
- [Tool and prompt records](https://github.com/couchbaselabs/agent-catalog/blob/master/libs/agentc_core/agentc_core/record/descriptor.py): `libs/agentc_core/agentc_core/record/descriptor.py`
- [Catalog descriptor](https://github.com/couchbaselabs/agent-catalog/blob/master/libs/agentc_core/agentc_core/catalog/descriptor.py): `libs/agentc_core/agentc_core/catalog/descriptor.py`
- [Embedding models](https://github.com/couchbaselabs/agent-catalog/blob/master/libs/agentc_core/agentc_core/learned/embedding.py): `libs/agentc_core/agentc_core/learned/embedding.py`
- [Catalog API](https://github.com/couchbaselabs/agent-catalog/blob/master/libs/agentc_core/agentc_core/catalog/catalog.py): `libs/agentc_core/agentc_core/catalog/catalog.py`
- [Catalog backends](https://github.com/couchbaselabs/agent-catalog/tree/master/libs/agentc_core/agentc_core/catalog/implementations): `libs/agentc_core/agentc_core/catalog/implementations`
- [Configuration](https://github.com/couchbaselabs/agent-catalog/blob/master/libs/agentc_core/agentc_core/config/config.py): `libs/agentc_core/agentc_core/config/config.py`

### Agent Runtime

- [Tool definitions](https://github.com/couchbaselabs/agent-catalog/tree/master/libs/agentc_core/agentc_core/tool): `libs/agentc_core/agentc_core/tool`
- [Provider loading](https://github.com/couchbaselabs/agent-catalog/blob/master/libs/agentc_core/agentc_core/provider/provider.py): `libs/agentc_core/agentc_core/provider/provider.py`
- [Prompt models](https://github.com/couchbaselabs/agent-catalog/blob/master/libs/agentc_core/agentc_core/prompt/models.py): `libs/agentc_core/agentc_core/prompt/models.py`

### Activity Tracing

- [Span API](https://github.com/couchbaselabs/agent-catalog/blob/master/libs/agentc_core/agentc_core/activity/span.py): `libs/agentc_core/agentc_core/activity/span.py`
- [Activity content](https://github.com/couchbaselabs/agent-catalog/blob/master/libs/agentc_core/agentc_core/activity/models/content.py): `libs/agentc_core/agentc_core/activity/models/content.py`
- [Activity loggers](https://github.com/couchbaselabs/agent-catalog/tree/master/libs/agentc_core/agentc_core/activity/logger): `libs/agentc_core/agentc_core/activity/logger`

### Framework Integrations

- [LangChain adapter](https://github.com/couchbaselabs/agent-catalog/blob/master/libs/agentc_integrations/langchain/agentc_langchain/chat/chat.py): `libs/agentc_integrations/langchain/agentc_langchain/chat/chat.py`
- [LangGraph agent](https://github.com/couchbaselabs/agent-catalog/blob/master/libs/agentc_integrations/langgraph/agentc_langgraph/agent/agent.py): `libs/agentc_integrations/langgraph/agentc_langgraph/agent/agent.py`
- [LangGraph adapter](https://github.com/couchbaselabs/agent-catalog/blob/master/libs/agentc_integrations/langgraph/agentc_langgraph/graph/graph.py): `libs/agentc_integrations/langgraph/agentc_langgraph/graph/graph.py`
- [Graph checkpoints](https://github.com/couchbaselabs/agent-catalog/blob/master/libs/agentc_integrations/langgraph/agentc_langgraph/state/checkpoint.py): `libs/agentc_integrations/langgraph/agentc_langgraph/state/checkpoint.py`
- [LlamaIndex adapter](https://github.com/couchbaselabs/agent-catalog/blob/master/libs/agentc_integrations/llamaindex/agentc_llamaindex/chat/chat.py): `libs/agentc_integrations/llamaindex/agentc_llamaindex/chat/chat.py`

### Other components

- **Developer**

## Connections

- Developer → CLI commands: runs commands
- Index command → Catalog indexing: indexes sources (evidence: `libs/agentc_cli/agentc_cli/cmds/index.py`)
- Catalog indexing → Tool and prompt records: builds records (evidence: `libs/agentc_core/agentc_core/catalog/index.py`)
- Catalog indexing → Catalog descriptor: uses descriptors (evidence: `libs/agentc_core/agentc_core/catalog/index.py`)
- Catalog indexing → Embedding models: generates embeddings (evidence: `libs/agentc_core/agentc_core/catalog/index.py`)
- Catalog indexing → Catalog backends: loads local catalog (evidence: `libs/agentc_core/agentc_core/catalog/index.py`)
- CLI commands → Index command: dispatches
- CLI commands → Catalog operations: offers operations (evidence: `libs/agentc_cli/agentc_cli/main.py`)
- Status command → Catalog descriptor: reads catalog metadata (evidence: `libs/agentc_cli/agentc_cli/cmds/status.py`)
- Index command → Configuration: loads settings (evidence: `libs/agentc_cli/agentc_cli/cmds/index.py`)
- Catalog API → Catalog backends: uses backends
- Catalog API → Tool definitions: exposes catalogued tools
- Catalog API → Prompt models: exposes prompts
- Provider loading → Tool and prompt records: loads definitions (evidence: `libs/agentc_core/agentc_core/provider/provider.py`)
- Span API → Activity content: records content (evidence: `libs/agentc_core/agentc_core/activity/span.py`)
- Span API → Activity loggers: writes activity (evidence: `libs/agentc_core/agentc_core/activity/span.py`)
- LangChain adapter → Span API: creates spans (evidence: `libs/agentc_integrations/langchain/agentc_langchain/chat/chat.py`)
- LangChain adapter → Activity content: logs messages (evidence: `libs/agentc_integrations/langchain/agentc_langchain/chat/chat.py`)
- LangGraph agent → Catalog API: uses catalog (evidence: `libs/agentc_integrations/langgraph/agentc_langgraph/agent/agent.py`)
- LangGraph agent → LangChain adapter: uses chat adapter (evidence: `libs/agentc_integrations/langgraph/agentc_langgraph/agent/agent.py`)
- LangGraph adapter → Span API: records activity (evidence: `libs/agentc_integrations/langgraph/agentc_langgraph/graph/graph.py`)
- LangGraph adapter → Catalog API: uses catalog (evidence: `libs/agentc_integrations/langgraph/agentc_langgraph/graph/graph.py`)
- Graph checkpoints → Catalog API: uses catalog runtime
- LlamaIndex adapter → Span API: creates spans (evidence: `libs/agentc_integrations/llamaindex/agentc_llamaindex/chat/chat.py`)
- LlamaIndex adapter → Activity content: logs messages (evidence: `libs/agentc_integrations/llamaindex/agentc_llamaindex/chat/chat.py`)
