All Frameworks

REST API Quickstart

Store, recall, and search memory using plain curl commands — no SDK required.

1Get Your API Key

Sign up at agenticmemory.ai and copy your amk_ key from the dashboard.

export AGENTICMEMORY_API_KEY="amk_your_key_here"

2Create a Space & Store Messages

Create a memory space, then store and recall messages.

# Create a space
curl -X POST https://agenticmemory.ai/v1/spaces \
  -H "Authorization: Bearer $AGENTICMEMORY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "My Agent", "slug": "my-agent"}'

# Store a message (short-term memory)
curl -X POST https://agenticmemory.ai/v1/memory/SPACE_ID/messages \
  -H "Authorization: Bearer $AGENTICMEMORY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"role": "user", "content": "The project deadline is June 15."}'

# Recall recent messages
curl https://agenticmemory.ai/v1/memory/SPACE_ID/messages?limit=20 \
  -H "Authorization: Bearer $AGENTICMEMORY_API_KEY"

# Search memory (Pro plan)
curl -X POST https://agenticmemory.ai/v1/memory/SPACE_ID/search \
  -H "Authorization: Bearer $AGENTICMEMORY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "deadline", "limit": 10, "scope": "all"}'

# Set key-value context
curl -X PUT https://agenticmemory.ai/v1/memory/SPACE_ID/context/user_prefs \
  -H "Authorization: Bearer $AGENTICMEMORY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"value": {"theme": "dark", "lang": "en"}}'

# Get context value
curl https://agenticmemory.ai/v1/memory/SPACE_ID/context/user_prefs \
  -H "Authorization: Bearer $AGENTICMEMORY_API_KEY"

# Set scratchpad (ephemeral working memory)
curl -X PUT https://agenticmemory.ai/v1/memory/SPACE_ID/scratchpad \
  -H "Authorization: Bearer $AGENTICMEMORY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": {"step": 3, "status": "processing"}}'

# Bootstrap: load everything at once
curl -X POST https://agenticmemory.ai/v1/memory/SPACE_ID/bootstrap \
  -H "Authorization: Bearer $AGENTICMEMORY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"entries": 5, "messages": 20, "semantic": true, "query": "deadline"}'

3Expected Output

The recall endpoint returns messages in chronological order:

{
  "messages": [
    {
      "role": "user",
      "content": "The project deadline is June 15.",
      "seq": 1,
      "createdAt": "2026-05-01T12:00:00.000Z"
    }
  ]
}

Free tier: 1 space, 1K messages/month. Upgrade to Pro ($24.99/mo) for semantic search, entries, and entities.

Help
Help

Click the icon on any page for context-sensitive help.

Quick Links