
Generate API keys and integrate with long memory endpoints.
The API Setup tab provides your authentication credentials and endpoint reference for integrating long memory into your application.
Your API key authenticates all requests to the long memory API. Keys are prefixed with mk_ to distinguish them from RAG project keys.
Key management:
Security: Store your API key in environment variables or a secrets manager. Never commit keys to version control or expose them in client-side code.
All requests require the X-Memory-Api-Key header:
X-Memory-Api-Key: mk_your_key_here
Store a new long-term memory record.
curl -X POST https://api.guidedmind.ai/api/v1/memory/long/store \
-H "Content-Type: application/json" \
-H "X-Memory-Api-Key: mk_your_key_here" \
-d '{
"user_id": "user-456",
"role": "user",
"content": "I prefer the Professional plan at $199/month",
"session_id": "session-789",
"metadata": {"category": "pricing_preference"}
}'Response:
{
"record_id": "mem_abc123",
"user_id": "user-456",
"status": "stored"
}Perform semantic search across stored memories.
curl -X POST https://api.guidedmind.ai/api/v1/memory/long/search \
-H "Content-Type: application/json" \
-H "X-Memory-Api-Key: mk_your_key_here" \
-d '{
"query": "What plan does the user prefer?",
"external_user_id": "user-456",
"limit": 10,
"offset": 0,
"threshold": 0.7
}'Response:
{
"results": [
{
"record_id": "mem_abc123",
"content": "I prefer the Professional plan at $199/month",
"score": 0.92,
"metadata": {"category": "pricing_preference"},
"created_at": "2024-01-15T10:30:00Z"
}
],
"total": 1
}| Parameter | Type | Default | Description |
|---|---|---|---|
query | string | required | Search query string — semantically matched against stored memories |
external_user_id | string | required | Filter results to a specific user |
limit | integer | 20 | Maximum results to return |
offset | integer | 0 | Pagination offset |
threshold | float | 0.7 | Minimum similarity score — higher values return fewer, more relevant results |
| Status | Meaning |
|---|---|
| 401 | Invalid or missing API key |
| 404 | Project not found or disabled |
| 429 | Rate limit exceeded |
| 500 | Internal server error |
pip install guidedmind-rag-sdk-pythonYour long memory project is ready. Start storing and searching persistent conversation memory in your AI agent.