curl --request POST \
--url https://api.spikelabs.com/v1/users/{user_id}/memories/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"personality_id": "<string>",
"limit": 10,
"min_relevance": 0.7
}
'{
"data": [
{
"id": "mem_abc123",
"object": "memory",
"user_id": "<string>",
"personality_id": "<string>",
"content": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"category": "personal",
"confidence": 0.5,
"source": {
"type": "conversation",
"conversation_id": "<string>",
"extracted_from": "<string>"
},
"last_used_at": "2023-11-07T05:31:56Z",
"relevance": 123
}
]
}Semantic search across a user’s memories.
curl --request POST \
--url https://api.spikelabs.com/v1/users/{user_id}/memories/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"personality_id": "<string>",
"limit": 10,
"min_relevance": 0.7
}
'{
"data": [
{
"id": "mem_abc123",
"object": "memory",
"user_id": "<string>",
"personality_id": "<string>",
"content": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"category": "personal",
"confidence": 0.5,
"source": {
"type": "conversation",
"conversation_id": "<string>",
"extracted_from": "<string>"
},
"last_used_at": "2023-11-07T05:31:56Z",
"relevance": 123
}
]
}API key authentication. Use your secret key (starts with sk_) as a Bearer token.
User ID (starts with user_)
Search results
Show child attributes
Unique identifier
"mem_abc123"
memory User this memory belongs to
Personality this memory is scoped to
The memory content
Category of memory
personal, location, preference, relationship, schedule, context, custom Confidence score (1.0 for manually created)
0 <= x <= 1Last time this memory was retrieved in a conversation
Relevance score (0-1)