Profile
What is true about one app user now, as a short text to put in your system prompt, and the same lines one by one.
- Auth
- read key
- Cost
- free; never refused for your plan
Profile answers one question with no question asked: what should my assistant know about this person before it
replies? It returns the known lines, what memory holds to be true now, as one text ready for a system prompt,
within a size you set. Call it once at the start of a conversation; search for what the person
asks.
The lines come in this order, each section under its heading: How they asked to be helped, What they saved, What is true now (values as they stand, newest said first), What they prefer and Coming up. When they don't
all fit in max_tokens, the ones that do come first; summary has every line. The profile is
as of today in UTC, so what is coming up is counted from that day; summary takes the person's own date.
GET /v2/memory/profile is the same call, with max_tokens in the address:
/v2/memory/profile?max_tokens=800.
Headers
AuthorizationstringrequiredBearer ax_…. A read key is enough.
X-Alexein-UserstringrequiredThe app user whose profile to read. See App users.
X-Request-IdstringYour id for this request, echoed on the response.
Body
max_tokensintegerThe most tokens text takes, counted on the generous side, so it stays under this for the common models.
50 to 4,000. Default 400. Send {}, or no body, for the default.
Response
textstringThe lines under their headings, ready to put in a prompt as it is. Empty when memory knows nothing of the person yet.
linesobject[]The lines in text, in its order, each {type, text, section, from, ref} as summary lists
them: section is rules, saved, current, preferences or coming_up; from is who said it (user,
other for someone else, assistant, or null when not known); ref is the fact it came from, or null
for a line made of several.
updatingbooleantrue while memory is still reading what was lately added, forgotten or corrected, so the profile is about
to change.
A line appears once its item is processed, usually within minutes of the add; a note an app user saves in
their own words (author.self) appears at once. Lines resting on anything the person asked memory to
forget, or on a fact you corrected, are not shown. For an app user with no memory
yet it answers 200 with text empty and lines [].
Profile is free: it is never counted as a search.
Errors
400bad requestX-Alexein-User is missing or not a usable id.
401unauthorizedThe bearer is not a key this service issued.
403forbiddenThe organisation has been closed in the console.
422invalidA max_tokens under 50 or over 4,000, or not a whole number.
429too many requestsPast your organisation's rate limits, or this app user has too many requests in flight or reads too fast.
Retry after Retry-After seconds. See Limits.
503unavailableThe service is busy or briefly unavailable. Retry after Retry-After seconds, or with backoff when
there is none.
curl https://api.alexein.ai/v2/memory/profile \
-H "Authorization: Bearer $ALEXEIN_API_KEY" \
-H "X-Alexein-User: user_42"{
"text": "How they asked to be helped:\n- Alice wants answers in British English [said 2026-09-14, 78 days ago]\n\nWhat is true now:\n- Alice Chen · home city: Lisbon [said 2026-10-01, 61 days ago]; Berlin [said 2024-06-01, 913 days ago]\n\nWhat they prefer:\n- Alice Chen · diet: vegan [said 2026-10-02, 60 days ago]",
"lines": [
{
"type": "known",
"text": "Alice wants answers in British English [said 2026-09-14, 78 days ago]",
"section": "rules",
"from": "user",
"ref": "mem_K32NVfBr35x-wxMTpl8vMQ3GY-IatUcR7tFtUwmux9HWPp6r3Krn9M"
},
{
"type": "known",
"text": "Alice Chen · home city: Lisbon [said 2026-10-01, 61 days ago]; Berlin [said 2024-06-01, 913 days ago]",
"section": "current",
"from": null,
"ref": null
},
{
"type": "known",
"text": "Alice Chen · diet: vegan [said 2026-10-02, 60 days ago]",
"section": "preferences",
"from": "user",
"ref": "mem_svPomWn9AVKcEcDTO-BCdIYk-7JZvfUg3hpgY4ZxrJ_4XtO9S0MG-Z"
}
],
"updating": false
}{ "text": "", "lines": [], "updating": false }Didn’t find what you needed? Ask the team