Saltar al contenido principal

alphaswarm-kb

Catalog date: 2026-06-24.

alphaswarm-kb is the boundary package for the platform's cognitive-memory layer. It provides the structured and unstructured memory surfaces that agents use for long-term learning and context retention.

Role​

  • Memory Lifecycle: Manages the KBCorpusSpec and KBRuntime lifecycle for tenant-isolated corpora.
  • Bi-temporal Storage: Implements PermissionedDataPoint envelopes for auditable, time-travel-safe fact storage.
  • Layer Composition: Composes memory layers (private, hierarchical, marketplace, global) into a unified view for the agent.
  • Pluggable Adapters: Zero-extras defaults are the hierarchical_rag memory engine, pgvector vector store, and neo4j graph store; opt-in extras add memory engines (cognee, graphiti, mem0, letta, llamaindex), vector stores (qdrant, lancedb), and graph stores (falkordb, memgraph, neptune; kuzu is deprecated).

Architecture​

src/alphaswarm_kb/
├── domain/ # ports (KBAdapterMeta), bi-temporal models, DTOs
├── application/ # use cases, permission resolver, layer composer
├── infrastructure/ # adapters (memory/vector/graph/relational/acl/policy/identity)

Multi-tenancy​

Every recall and storage operation is gated by an ACL evaluator (native kb_acl_envelopes by default; OpenFGA/SpiceDB are opt-in extras) plus an OPA policy engine (Cedar is an opt-in extra). Data is isolated via workspace_id at the database level using RLS or per-tenant silos.

Repository​