Skip to main content
Vault memory lets you attach structured knowledge to a vault — facts, party details, deadlines, preferences, and more. Agents and workflows can read and search this memory to stay context-aware without re-processing documents. Use vault memory when you want to:
  • persist key facts extracted from documents (parties, dates, issues)
  • give agents per-case context that survives across sessions
  • build a correction layer so agents learn from feedback

Entry types

Every memory entry has a type that describes the kind of knowledge it holds:
TypeUse case
factGeneral statements (“Client prefers email over phone”)
partyPeople and organizations involved
issueLegal or business issues identified
deadlineImportant dates and filing deadlines
discoveryDiscovery-related findings
correctionCorrections to previous agent outputs
preferenceUser or client preferences

Create an entry

Endpoint
POST /vault/{id}/memory
curl -X POST "https://api.case.dev/vault/$VAULT_ID/memory" \
  -H "Authorization: Bearer sk_case_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "fact",
    "content": "The client prefers email communication over phone calls.",
    "source": "intake-form",
    "tags": ["communication", "preference"]
  }'

Request body

FieldTypeRequiredDescription
typestringYesOne of: fact, party, issue, deadline, discovery, correction, preference
contentstringYesThe memory content
sourcestringNoWhere this fact came from (e.g. intake-form, agent-extraction)
tagsstring[]NoTags for filtering

Response

{
  "entry": {
    "id": "mem_abc123",
    "type": "fact",
    "content": "The client prefers email communication over phone calls.",
    "source": "intake-form",
    "tags": ["communication", "preference"],
    "created_by": "key_xxx",
    "created_at": "2026-04-02T12:00:00.000Z",
    "updated_at": "2026-04-02T12:00:00.000Z"
  }
}

Search memory

Search entries by meaning — not just keywords.
Endpoint
POST /vault/{id}/memory/search
curl -X POST "https://api.case.dev/vault/$VAULT_ID/memory/search" \
  -H "Authorization: Bearer sk_case_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "how does the client prefer to be contacted?", "limit": 5}'

Parameters

FieldTypeRequiredDescription
querystringYesNatural-language search query
typesstring[]NoFilter by entry type
tagsstring[]NoFilter by tag
limitnumberNoMax results (1–100, default 10)

List entries

Retrieve all memory entries for a vault.
Endpoint
GET /vault/{id}/memory
curl "https://api.case.dev/vault/$VAULT_ID/memory" \
  -H "Authorization: Bearer sk_case_YOUR_API_KEY"

Update an entry

Endpoint
PATCH /vault/{id}/memory/{entryId}
curl -X PATCH "https://api.case.dev/vault/$VAULT_ID/memory/$ENTRY_ID" \
  -H "Authorization: Bearer sk_case_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Updated: client now prefers phone calls.",
    "tags": ["communication", "preference", "updated"]
  }'

Parameters

FieldTypeRequiredDescription
contentstringNoUpdated content
sourcestring | nullNoUpdated source (set null to clear)
tagsstring[]NoReplacement tag list
At least one field must be provided.

Delete an entry

Endpoint
DELETE /vault/{id}/memory/{entryId}
curl -X DELETE "https://api.case.dev/vault/$VAULT_ID/memory/$ENTRY_ID" \
  -H "Authorization: Bearer sk_case_YOUR_API_KEY"
Returns { "deleted": true } on success.