Skip to main content

Recall

Memory for agents. Episodic turns, semantic embeddings, working sets, and a scoped KV — all in one schema, all hit through agent-memory.

Tables

TablePurpose
recall.episodicOrdered turns (kind, text, provenance, scope).
recall.semanticEmbedded chunks with a Firestore vector search column.
recall.working_setsNamed, bounded sets the agent actively reasons over.
recall.kvScoped key/value (per-agent, per-scope).

Scopes

Every write carries scope text[] (e.g. ['self'], ['team:triage'], ['org']). Reads intersect the caller's authorized scopes. A leaked device key for agent A can never read B's ['self'] rows.

recall.semantic uses Firestore vector search with an ivfflat index. The Cloud Function exposes /mem/query:

{
"agent_id": "agent-hello",
"q": "what did I promise the vendor?",
"k": 8,
"scope": ["self", "team:sales"]
}

Firestore vector search returns cosine-ranked chunks; provenance rides back so the agent can cite.

Episodic turns

Turns are append-only and carry provenance (e.g. inbound-email:<msg-id>, slack:<ts>) so downstream summaries trace back to primary sources.

Routes

MethodPathPurpose
POST/mem/writeAppend an episode, semantic chunk, or KV row.
POST/mem/querySimilarity or exact-match read.
POST/mem/forgetSoft-delete by id or provenance.
POST/set/putUpdate a working set.
POST/kv/getScoped KV fetch.
POST/kv/putScoped KV write.

Retention

agentpack_recall_episodic_retention (03:37 UTC daily) trims episodic rows past recall_episodic_retention_days (default 180). Semantic and KV are retained until explicit forget.