ZeroMemory API Reference
Base URL: https://api.ainative.studio/api/v1/public/memory/v2
All endpoints require Authorization: Bearer <token>.
POST /remember
Store a memory. Auto-generates embeddings, extracts entities, assigns importance scores.
Request:
{
"content": "Alice is the CTO of AINative. She prefers Python.",
"entity_id": "alice-johnson",
"memory_type": "episodic",
"importance": 0.8,
"tags": ["team", "preferences"],
"metadata": {"source": "onboarding"}
}
| Field | Type | Default | Description |
|---|---|---|---|
content | string | required | Memory text content |
entity_id | string | null | Entity this memory is about |
memory_type | string | "episodic" | working, episodic, or semantic |
importance | float | 0.5 | 0.0-1.0 importance score |
tags | string[] | null | Tags for categorization |
metadata | object | null | Arbitrary metadata |
Response:
{
"memory_id": "mem_abc123",
"content": "Alice is the CTO of AINative...",
"importance": 0.8,
"memory_type": "episodic",
"entities_extracted": ["Alice", "AINative", "Python"],
"next_steps": {
"action": "recall",
"suggestion": "Memory stored. Recall it by meaning using /recall.",
"endpoint": "POST /api/v1/public/memory/v2/recall"
}
}
POST /recall
Search memories by meaning. Returns scored, ranked results using blended scoring (similarity + importance + recency).
Request:
{
"query": "Who is the CTO?",
"entity_id": "alice-johnson",
"layer": "episodic",
"limit": 5
}
| Field | Type | Default | Description |
|---|---|---|---|
query | string | required | Natural language search query |
entity_id | string | null | Filter by entity |
layer | string | null | Filter: working, episodic, semantic |
limit | int | 10 | 1-100 max results |
Response:
{
"results": [
{
"memory_id": "mem_abc123",
"content": "Alice is the CTO of AINative. She prefers Python.",
"score": 0.94,
"importance": 0.8,
"memory_type": "episodic",
"created_at": "2026-04-01T12:00:00Z"
}
],
"count": 1
}
DELETE /forget/{memory_id}
Delete a specific memory by ID.
curl -X DELETE https://api.ainative.studio/api/v1/public/memory/v2/forget/mem_abc123 \
-H "Authorization: Bearer $TOKEN"
POST /reflect/{entity_id}
Generate insights by reflecting on an entity's memories. Uses LLM to synthesize patterns.
curl -X POST https://api.ainative.studio/api/v1/public/memory/v2/reflect/alice-johnson \
-H "Authorization: Bearer $TOKEN"
Response:
{
"entity_id": "alice-johnson",
"reflection": "Alice is the CTO, prefers Python, focuses on backend architecture...",
"memory_count": 15,
"key_themes": ["leadership", "python", "architecture"]
}
GET /profile/{entity_id}
Get a consolidated profile built from all memories about an entity.
curl https://api.ainative.studio/api/v1/public/memory/v2/profile/alice-johnson \
-H "Authorization: Bearer $TOKEN"
POST /relate
Store a typed relationship between two entities.
Request:
{
"subject": "Alice Johnson",
"predicate": "manages",
"object": "Backend Team",
"confidence": 0.9
}
| Field | Type | Default | Description |
|---|---|---|---|
subject | string | required | Source entity |
predicate | string | required | Relationship type |
object | string | required | Target entity |
confidence | float | 0.8 | 0.0-1.0 confidence |
GET /graph/{entity_id}
Get all relationships for an entity.
curl "https://api.ainative.studio/api/v1/public/memory/v2/graph/alice-johnson?limit=50" \
-H "Authorization: Bearer $TOKEN"
GET /entities
List entities auto-extracted from stored memories.
curl "https://api.ainative.studio/api/v1/public/memory/v2/entities?entity_type=person&limit=20" \
-H "Authorization: Bearer $TOKEN"
| Parameter | Type | Default | Description |
|---|---|---|---|
user_id | UUID | caller | Filter by owner |
entity_type | string | null | person, org, tech, concept |
limit | int | 100 | 1-500 max results |
Endpoint Summary
| Method | Path | Description |
|---|---|---|
| POST | /remember | Store a memory |
| POST | /recall | Semantic search |
| DELETE | /forget/{id} | Delete a memory |
| POST | /reflect/{entity_id} | Generate insights |
| GET | /profile/{entity_id} | Entity profile |
| POST | /relate | Store relationship |
| GET | /graph/{entity_id} | Entity relationships |
| GET | /entities | List extracted entities |
For knowledge graph endpoints (traverse, GraphRAG, ontology), see the Context Graph API.