Add-on Module

Knowledge graph and vector recall for AI agents

Prime is an optional module that adds knowledge graphs, vector search, and agent recall to the AllSource event store. Combine graph traversal, HNSW embeddings, provenance, and temporal context in one memory layer.

Core
durable source
WAL + Parquet events
3
search strategies
vector + graph + temporal
Published
recall evaluation
method and corpus disclosed
0
network hops
embedded NIF mode
Knowledge graph event store meets vector search — purpose-built for durable agent memory in Rust

Everything an AI agent needs to remember

Knowledge Graph

Model entities and their relationships as a directed graph. BFS traversal discovers multi-hop connections across domains — customers to orders to products to suppliers — without pre-defined joins.

Vector Embeddings

HNSW index stores high-dimensional embeddings alongside your events. Semantic similarity search finds related entities even when they share no common identifiers or schemas.

Compressed Index

Auto-generated cross-domain scaffolding links entities that co-occur across event streams. A published AllSource project evaluation measured improved cross-domain recall on its test corpus; results depend on your data and queries.

Recall API

Hybrid search that combines vector similarity, graph traversal, and temporal ordering in a single query. Your AI agents get ranked results with provenance — not just embeddings, but the events that produced them.

Core-Backed Projection Reads

A concurrent in-memory map serves Core projection reads separately from event ingestion. The published 11.9us p99 Core benchmark is not an end-to-end Prime hybrid-recall measurement.

Offline / Embedded Mode

Run Prime in-process via a Rustler NIF — no network hop, no separate service. Ship durable AI agent memory inside your Elixir application or as a standalone embedded binary.

The Recall API combines graph traversal, vector similarity, and temporal ordering into a single ranked response

One API call. Full context.

Terminal
# Ask Prime to recall relevant context for an AI agent
curl -X POST https://api.all-source.xyz/api/v1/prime/recall \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "What do we know about customer acme-corp?",
    "top_k": 5,
    "strategy": "hybrid"
  }'

# Example response shape; scores depend on corpus and query
{
  "nodes": [
    {
      "entity_id": "customer:acme-corp",
      "type": "customer",
      "score": 0.94,
      "source": "graph+vector",
      "relationships": [
        { "to": "order:ord-7821", "rel": "placed", "weight": 0.88 },
        { "to": "ticket:tkt-312", "rel": "opened", "weight": 0.72 }
      ],
      "last_event": "2026-04-15T09:32:11Z"
    },
    {
      "entity_id": "order:ord-7821",
      "type": "order",
      "score": 0.88,
      "source": "graph",
      "payload": { "total": 24500.00, "status": "fulfilled" },
      "last_event": "2026-04-14T14:07:44Z"
    }
  ],
  "strategy_used": "hybrid"
}
Prime is a projection layer — all data is derived from events that Core already persists

Works with the Core event store

Hosted Prime reads and writes tenant-scoped prime.* events through Core. Local Prime embeds Core in-process. In both modes, durable events are the source for graph and vector projections.

All Prime data is a projection. If you rebuild Prime from scratch, it replays events from Core and arrives at the same state. No separate source of truth.

You can run Core without Prime. The event store stands alone for event sourcing, time-travel queries, and projections. Prime is purely additive.

Hosted Prime keeps only warm per-tenant projections in memory and rebuilds them from Core after a cold start. Local Prime keeps its event log and projections in the selected data directory.

Add durable memory to your AI agents

Prime plugs into any AllSource Core deployment. Knowledge graphs, vector search, and compressed recall — no external dependencies, no separate database.