Docs Memory API
Set up an integration, step by step
A production checklist: projects and keys, identities and audiences, backfill, live sync, recall in the agent, and verification.
#1. Create projects per environment
Use separate projects for development, staging and production. Memory never crosses projects, and each project has its own keys, limits and usage records.
#2. Map your users to identities
An identity is your id for a person or system — user_ruth, cust_5520, svc_helpdesk. Use stable ids from your own directory, not emails that may change. Create identities implicitly by sending them as author or viewer, or explicitly with traits:
curl -X PUT "$AULD_API_BASE/v1/identities/user_ruth" \
-H "Authorization: Bearer $AULD_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "traits": { "name": "Ruth Adeyemi", "team": "finance" }, "audiences": ["account-team"] }'#3. Decide visibility before you backfill
Every record is project-visible, audience-visible or private to one user. Decide the rule per source system now — re-sending later to change visibility works, but it is easier to get right first. See access control.
#4. Backfill history in time order
Send historical records with their original occurredAt. Order doesn’t have to be perfect — late records are placed by time — but sending oldest first keeps job queues short. Use POST /v1/records:batch for bulk loads and an Idempotency-Key per batch so restarts are free.
#5. Turn on live sync
Send new records as they happen from your application, or configure a webhook source so another system posts events directly.
#6. Recall in the agent
Call recall before the model answers anything history-dependent, with the signed-in user as viewer. Put the result in the system prompt with its dates and source titles.
#7. Verify scoping
Before launch, recall the same query as two identities in different audiences and compare. The same read as an identity outside both audiences should return project-visible memory only.
curl -X POST "$AULD_API_BASE/v1/recall" \
-H "Authorization: Bearer $AULD_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "query": "renewal budget", "viewer": "user_outsider" }'Illustrative interface example · replace the host and key placeholders