Documentation Index
Fetch the complete documentation index at: https://docs.emergence.ai/llms.txt
Use this file to discover all available pages before exploring further.
Context Packs
A Context Pack is the fundamental storage unit for agent memories. It groups related memories into a named, typed container that agents query when they need relevant background knowledge before responding or acting.Three-Layer Architecture
Context Packs use a three-layer structure that balances retrieval speed with information depth:| Layer | Contents | When Loaded |
|---|---|---|
| Summary | High-level description, topic tags, last-updated timestamp | Always, fast pack discovery |
| Metadata | Memory count, type distribution, confidence scores, access patterns | On pack selection |
| Content | Full memory records with embeddings, provenance, relationships | On demand, specific memory retrieval |
Two-Phase Query Model
Agents retrieve context through a two-phase process that avoids loading unnecessary detail:Phase 1: Discover
Query Context Pack summaries to find relevant packs. Returns pack IDs, topic descriptions, and match scores. Fast, only summary layer is read.
Context Pack Types
| Type | Purpose | Decay rate |
|---|---|---|
| session | Single conversation context, ephemeral, high detail | Aggressive (hours to days) |
| user | Long-term user preferences and history, persistent | Conservative (months) |
| domain | Domain knowledge, facts, rules, entity relationships | Very conservative (years) |
| project | Project-specific context, decisions, conventions, constraints | Conservative (months) |
| agent | Agent-specific learned behaviors and patterns | Conservative (months) |
Memory Record Schema
Each memory stored in a Context Pack has the following structure:Managing Context Packs via API
List Packs
Create a Pack
Query a Pack (Phase 2 retrieval)
Degradation Tiers
Memories in Context Packs degrade gracefully over time when not accessed:| Tier | Description | Storage impact |
|---|---|---|
| full | Complete memory record with all detail | Full |
| summary | Key points only, detail compressed | ~30% |
| key_facts | Core facts only, context removed | ~10% |
| existence_marker | Memory existed, no content | Minimal |
| archived | Moved to cold storage, not retrieved | Off-heap |
Related
Memory Service
Overview of the memory system and API usage.
Memory Integration Guide
Step-by-step guide to adding memory to your agents.

