All Docs
Memory API
Store and search workspace memories via the REST API. Memories are semantic snippets — decisions, facts, patterns, preferences — that agents can retrieve during conversations.
Search Memories
GET /api/v1/memory/search
Search memories with relevance ranking.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
q | string | Search query (required) |
type | string | Filter by type: decision, fact, solution, pattern, preference, summary |
limit | number | Max results (default 10) |
Response
{
"data": [
{
"id": "uuid",
"content": "We chose JWT over sessions for the API layer",
"type": "decision",
"score": 0.87,
"createdAt": "2026-03-10T14:30:00.000Z"
}
]
}
Example
curl -H "Authorization: Bearer cg_YOUR_KEY" \
"https://cognova.dev/api/v1/memory/search?q=authentication&type=decision"
Store a Memory
POST /api/v1/memory
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
content | string | Yes | The memory content |
type | string | No | Memory type (default fact). One of: decision, fact, solution, pattern, preference, summary |
Response
{
"data": {
"id": "uuid",
"content": "We chose JWT over sessions for the API layer",
"type": "decision",
"createdAt": "2026-03-12T10:00:00.000Z"
}
}
Example
curl -X POST https://cognova.dev/api/v1/memory \
-H "Authorization: Bearer cg_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"content": "We chose JWT over sessions for the API layer", "type": "decision"}'
Memory Types
| Type | Use For |
|---|---|
decision | Architectural or design decisions |
fact | Factual information about the project |
solution | How a problem was solved |
pattern | Recurring patterns or conventions |
preference | Team or user preferences |
summary | Summaries of longer discussions |