Built for AI Agents

Agent Memory API

Persistent key-value storage, vector search, and conversation history. The memory layer every AI agent needs.

3
Storage Types
128d
Vector Dims
20+
Endpoints
<5ms
Avg Latency

Three Storage Primitives

🔑

Key-Value Store

Set, get, delete with optional TTL. Store JSON, strings, numbers. Namespace isolation. Bulk operations. Pattern-based search with glob syntax.

🔍

Vector Store

Store text with auto-generated 128d embeddings or bring your own vectors. Semantic search via cosine similarity. Perfect for RAG, knowledge bases, and long-term recall.

💬

Conversation History

Ordered message history with roles (user, assistant, system, tool). Create threads, append messages, replay full conversations. Session management built in.

How It Works

1
Create API Key
2
Create Namespace
3
Store & Search
4
Persist Across Sessions

Live API Examples

# Create API key (50 free credits)
curl -X POST http://agent-memory.167.148.41.86.nip.io/api/keys/create

# Create a namespace for your agent
curl -X POST http://agent-memory.167.148.41.86.nip.io/api/namespaces \
  -H "Authorization: Bearer am_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"my-agent","description":"My AI agent memory"}'

# Store a value with 1-hour TTL
curl -X POST http://agent-memory.167.148.41.86.nip.io/api/kv/my-agent \
  -H "Authorization: Bearer am_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"key":"user_pref","value":{"theme":"dark"},"ttl":3600}'

# Retrieve it
curl http://agent-memory.167.148.41.86.nip.io/api/kv/my-agent/user_pref \
  -H "Authorization: Bearer am_YOUR_KEY"
# Store text (auto-generates 128d embedding)
curl -X POST http://agent-memory.167.148.41.86.nip.io/api/vectors/my-agent \
  -H "Authorization: Bearer am_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"key":"fact1","content":"The user prefers dark mode and uses Claude"}'

# Semantic search
curl -X POST http://agent-memory.167.148.41.86.nip.io/api/vectors/my-agent/search \
  -H "Authorization: Bearer am_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"what are the user preferences?","top_k":5}'

# Or bring your own embeddings
curl -X POST http://agent-memory.167.148.41.86.nip.io/api/vectors/my-agent \
  -H "Authorization: Bearer am_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"key":"doc1","content":"...","embedding":[0.1,0.2,...]}'
# Create a conversation thread
curl -X POST http://agent-memory.167.148.41.86.nip.io/api/conversations/my-agent \
  -H "Authorization: Bearer am_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title":"Planning session"}'

# Add messages
curl -X POST http://agent-memory.167.148.41.86.nip.io/api/conversations/my-agent/CONV_ID/messages \
  -H "Authorization: Bearer am_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"role":"user","content":"What should I build next?"}'

# Retrieve full conversation
curl http://agent-memory.167.148.41.86.nip.io/api/conversations/my-agent/CONV_ID/messages \
  -H "Authorization: Bearer am_YOUR_KEY"
import requests

BASE = "http://agent-memory.167.148.41.86.nip.io"
KEY = "am_YOUR_KEY"
headers = {"Authorization": f"Bearer {KEY}", "Content-Type": "application/json"}

# Create namespace
requests.post(f"{BASE}/api/namespaces", json={"name": "my-agent"}, headers=headers)

# Store memory
requests.post(f"{BASE}/api/kv/my-agent", json={
    "key": "last_task",
    "value": {"action": "deploy", "target": "production"},
    "ttl": 86400  # 24 hours
}, headers=headers)

# Semantic recall
results = requests.post(f"{BASE}/api/vectors/my-agent/search", json={
    "query": "what did I do yesterday?",
    "top_k": 3
}, headers=headers).json()

for r in results["results"]:
    print(f"{r['score']:.2f} — {r['content']}")

Pricing

Free Tier

$0/forever
  • 20 requests per day
  • 50 credits on key creation
  • All storage types included
  • No credit card required

Agent Discovery

Machine-readable endpoints for automatic integration

/.well-known/agent.json /llms.txt