Documentation

API reference for AgentMemry. Memory that understands.

Getting Started

Installation

# Python
pip install agentmemry

# JavaScript
npm install agentmemry

Quick Example

from agentmemory import AgentMemory

mem = AgentMemory("am_your_api_key")

# Store a memory
mem.store("User loves Thai food and is vegetarian")

# Search by meaning
results = mem.search("restaurant recommendations")
# → Returns the Thai food memory!

Authentication

All API requests require a Bearer token in the Authorization header:

Authorization: Bearer am_your_api_key

Get your API key at agentmemry.ai

API Reference

Store Memory

POST /v1/store

Store a memory with automatic vector embedding for semantic search.

ParameterTypeDescription
contentstringThe memory to store (required)
keystringCustom key (optional, auto-generated if omitted)
namespacestringNamespace for organization (default: "default")
metadataobjectCustom metadata (optional)
ttlnumberTime-to-live in seconds (optional)
curl -X POST https://api.agentmemry.ai/v1/store \
  -H "Authorization: Bearer am_your_key" \
  -H "Content-Type: application/json" \
  -d '{"content": "User prefers dark mode"}'

Semantic Search

POST /v1/search

Search memories by meaning, not just keywords. Uses vector embeddings.

ParameterTypeDescription
querystringWhat you're looking for (required)
namespacestringNamespace to search (default: "default")
limitnumberMax results (default: 10, max: 50)
thresholdnumberMin similarity score 0-1 (default: 0)
curl -X POST https://api.agentmemry.ai/v1/search \
  -H "Authorization: Bearer am_your_key" \
  -H "Content-Type: application/json" \
  -d '{"query": "what are their UI preferences?"}'
✨ This is the magic. Ask "UI preferences" and find "prefers dark mode" even though the words don't match.

Recall by Key

GET /v1/recall/:key

Retrieve a specific memory by its key.

curl https://api.agentmemry.ai/v1/recall/user_preferences \
  -H "Authorization: Bearer am_your_key"

List Memories

GET /v1/list

List all memories in a namespace.

ParameterTypeDescription
namespacestringNamespace (default: "default")
limitnumberMax results (default: 50, max: 100)

Forget (Delete)

DELETE /v1/forget/:key

Delete a memory by key.

curl -X DELETE https://api.agentmemry.ai/v1/forget/old_memory \
  -H "Authorization: Bearer am_your_key"

Context (Advanced)

POST /v1/context

Send a conversation, get relevant memories back, and optionally auto-extract new facts.

ParameterTypeDescription
messagesarrayConversation messages [{role, content}]
extractbooleanAuto-extract and store facts (default: false)
limitnumberMax memories to return (default: 5)

Usage & Limits

GET /v1/usage

Check your API usage statistics.

Pricing

PlanPriceRequestsStorage
free$01k/mo1 MB
pro0.002 ETH50k/mo100 MB
scale0.01 ETHunlimited1 GB

Pay with ETH on Base network. Get started free →