Agent Substrate

Capabilities Layer (L2)

L2 is the "what agents can do" layer. Every concrete tool, knowledge pipeline, memory backend, storage adapter, and trigger lives here. Kernel (L0) defines the contracts; agents (L1) drive the ReAct loop; capabilities (L2) provides everything those agents can reach for.

Ten sub-packages

text
capabilities/
├── tools/          Tool implementations + Skills + ToolChain
├── knowledge/      RAGPipeline, GraphRAGPipeline, chunkers, loaders, reranker
├── memory/         CachedShortTermMemory + DurableSessionStore + RedisSessionStore (session state)
│                   DurableMemoryStore (long-term facts)
├── history/        CachedHistoryProvider + DurableHistoryProvider + RedisHistoryProvider (chat logs)
├── vector/         PgVectorStore — implements kernel VectorStore Protocol
├── graph/          AGEGraphStore — implements kernel GraphStore Protocol
├── storage/        S3FileStore — implements kernel BlobStore Protocol
├── pipeline/       PipelineEngine, PipelineDef, DataRefStore (adapter chains)
├── llm/            OpenAIChatCompletionClient, embedding clients
└── triggers/       TriggerScheduler, WebhookRegistry, ConditionMonitor

How capabilities fit into the stack

diagram
Rendering diagram…

Design rules

Capabilities only implement kernel ProtocolsPgVectorStore implements VectorStore, RedisHistoryProvider implements HistoryProvider, and so on. No layer above L2 ever imports a concrete backend directly; they import the Protocol from kernel and receive the implementation via dependency injection in lifespan.

No capabilities import from agents or fabric — the dependency rule strictly flows downward. If you need runtime context inside a tool, it is passed as the ctx parameter to execute().

Auto-discovery, not registrationCapabilityDiscovery scans capabilities/tools/ at startup. Any package with a tool.py containing a class with {name, description, input_schema, execute} is automatically registered. No central list to update.

Pages in this section

PageTopic
1 · ToolsTool taxonomy, CapabilityDiscovery, Toolbox
2 · SkillsSkillTool, SKILL.md format, SkillManager
3 · Tool ChainToolChainTool, sandbox bridge, code-mode chaining
4 · Knowledge & RAGRAGPipeline, GraphRAGPipeline, loaders, reranker
5 · Memory & HistorySession state, chat logs, Redis/Postgres backends
6 · Storage & PipelinePgVectorStore, AGEGraphStore, S3FileStore, PipelineEngine
7 · TriggersTriggerScheduler, WebhookRegistry, ConditionMonitor