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
KBCorpusSpecandKBRuntimelifecycle for tenant-isolated corpora. - Bi-temporal Storage: Implements
PermissionedDataPointenvelopes 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: Supports multiple memory engines (cognee, mem0, llamaindex), vector stores (pgvector, qdrant), and graph stores (Neo4j, falkordb).
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 (OpenFGA or OPA). Data is isolated via workspace_id at the database level using RLS or per-tenant silos.