Use the REST API when your backend explicitly controls Memory writes and reads. Both operations authenticate with the project'ssk- client key.
#Capture
curl -X POST https://api.agihalo.com/api/v1/memory/capture \
-H "Authorization: Bearer $HALO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"projectKey": "customer-product",
"endUserKey": "user_123",
"sessionData": {
"messages": [
{
"role": "user",
"content": "Keep my weekly reports short and send them in the morning."
}
]
},
"response": {
"role": "assistant",
"content": "I will keep them concise and morning-ready."
}
}'Capture stores the raw exchange, accounts for write usage, and queues topic classification and summary work for the Memory worker.
#Direct retrieve
curl -X POST https://api.agihalo.com/api/v1/memory/retrieve \
-H "Authorization: Bearer $HALO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"projectKey": "customer-product",
"endUserKey": "user_123",
"topics": ["report_preferences"],
"limit": 5,
"includeRaw": true,
"includeDisabledTopics": false
}'| Field | Purpose |
|---|---|
topics | Restrict to explicit topic keys |
limit | Bound returned raw records |
includeRaw | Include linked source exchanges |
includeDisabledTopics | Include topics disabled for normal retrieval |
#Endpoint summary
POST
/api/v1/memory/capturePOST
/api/v1/memory/retrievePOST
/api/v1/memory/functions/halo_retrieve_end_user_memoryPOST
/api/v1/memory/delete