Skip to main content

Memory Service

The Memory Service provides multi-agent memory management for CRAFT. It gives agents the ability to remember information across conversations, accumulate domain knowledge, and personalize responses based on prior interactions. Memory is built into the Utils service (em-runtime-utils). No separate service is required — the same Utils API that handles schedules, metadata, and catalog tags also manages Context Packs and Memories.

Key Concepts

Memories

A memory is a discrete, self-contained piece of information extracted from conversations, documents, or agent messages. Each memory has:
  • Content: The information itself (a fact, preference, insight, or relationship)
  • Type: The category of memory (fact, preference, observation, glossary, policy, etc., see Memory Types below)
  • Name: An optional label for direct retrieval
  • Metadata: Source, timestamp, confidence, access count
  • Embeddings: Vector representation for semantic search

Context Packs

A Context Pack is the storage container for a related set of memories. Context Packs organize memories by domain or purpose and provide efficient retrieval. See Context Packs for the detailed architecture.

Memory Lifecycle

Memories move through a managed lifecycle:
  1. Created, extracted from input and scored for worthiness
  2. Active, retrievable and contributing to agent context
  3. Degraded, fading through summarization tiers (full → key facts → existence marker)
  4. Archived, removed from active retrieval but preserved for audit
  5. Re-promoted, any retrieval restores a degraded memory to active state

Memory Types

Memories are categorized into two groups:

General Types

Data Governance Enrichment Types

Using the Memory API

All memory operations go through the Utils service (/api/utils/). Authentication uses the same JWT tokens as all other platform APIs, plus an X-Project-ID header to scope results to the current project.

Add a Memory to a Context Pack

Memories are created within a named Context Pack:

List Memories

Retrieve by ID

Retrieve by Name within a Pack

Update a Memory

Delete a Memory

Lifecycle Operations

Scoping

Memories are scoped per organization and project:
  • Organization: determined automatically from the JWT’s org_id claim — no separate header needed
  • Project: pass the X-Project-ID header on every request

Context Packs

Deep dive into the Context Pack storage architecture.

Memory Integration Guide

How-to guide for integrating memory into your agents.

Utils API Reference

Full memory endpoint API reference.