Skip to main content

1. Get Your API Key

Sign up at engram.training/dashboard to get your API key. All keys start with sk_live_.
export ENGRAM_API_KEY="sk_live_your_key_here"
export ENGRAM_API="https://api.engram.training/v1"
Autonomous agents can self-register without a dashboard account:
curl -X POST "$ENGRAM_API/auth/agent-register" \
  -H "Content-Type: application/json" \
  -d '{"name": "my-agent"}'
This returns an API key and 100 starter credits. See Agent Registration.

2. Store a Memory

curl -X POST "$ENGRAM_API/memory" \
  -H "Authorization: Bearer $ENGRAM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "semantic",
    "key": "facts/user-preference",
    "content": "User prefers dark mode and TypeScript.",
    "importance": 0.8,
    "expiresIn": "30d",
    "metadata": {
      "tags": ["preference", "ui"],
      "visibility": "private"
    }
  }'
Response (201):
{
  "id": "7cf4b433-4bb2-4522-980e-ad3ee4f270b9",
  "type": "semantic",
  "key": "facts/user-preference",
  "version": 1,
  "blobName": "memory/semantic/facts/user-preference/v1",
  "sizeBytes": 42,
  "pinned": false,
  "importance": 0.8,
  "isCompressed": false,
  "encryptionProvider": null,
  "createdAt": "2026-03-23T19:29:58.023Z"
}

3. Retrieve a Memory

curl "$ENGRAM_API/memory/7cf4b433-4bb2-4522-980e-ad3ee4f270b9" \
  -H "Authorization: Bearer $ENGRAM_API_KEY"
Response:
{
  "id": "7cf4b433-4bb2-4522-980e-ad3ee4f270b9",
  "type": "semantic",
  "key": "facts/user-preference",
  "content": "User prefers dark mode and TypeScript.",
  "version": 1,
  "pinned": false,
  "importance": 0.8,
  "metadata": { "tags": ["preference", "ui"], "visibility": "private" },
  "createdAt": "2026-03-23T19:29:58.023Z"
}

4. Search Memories

curl -X POST "$ENGRAM_API/memory/search" \
  -H "Authorization: Bearer $ENGRAM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "preference",
    "contentQuery": "dark mode",
    "tags": ["ui"],
    "limit": 10
  }'

5. Update a Memory

curl -X PUT "$ENGRAM_API/memory/7cf4b433-4bb2-4522-980e-ad3ee4f270b9" \
  -H "Authorization: Bearer $ENGRAM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "User prefers dark mode, TypeScript, and cursor-based pagination."
  }'
This creates version 2 — the original is preserved in history.

6. Upload a File

curl -X POST "$ENGRAM_API/memory/upload" \
  -H "Authorization: Bearer $ENGRAM_API_KEY" \
  -F "[email protected];type=application/pdf" \
  -F "type=file" \
  -F "key=docs/quarterly-report" \
  -F "blobFilename=quarterly_report" \
  -F "expiresIn=90d" \
  -F 'metadata={"tags":["report","Q4"],"visibility":"share"}'

What’s Next?

Memory Types

Choose the right type for each kind of knowledge.

Encryption

Encrypt sensitive memories with AES-256-GCM.

Vector Search

Build RAG pipelines with semantic similarity search.

Full API Reference

Every endpoint, parameter, and response documented.