User Profiles
One call that answers "who is this user, currently?" — built from the collection's latest, non-expired facts and preferences.
Get a profile#
# Python
p = mem.profile("people")
print(p["profile"], "based on", p["based_on"], "memories")
# HTTP
GET /v1/memory/collections/people/profile
→ {"profile": "Alex is a product manager at Stripe who prefers morning meetings…",
"based_on": 12}
What goes in#
- Only
factandpreferencememories — episodes are excluded. - Only current ones: superseded (
is_latest = false) and expired facts never appear, so the profile tracks reality as it changes. - Ranked by importance and recency (up to 80 memories feed the summary).
Using it in an agent#
profile = mem.profile(f"user-{user_id}")["profile"]
system_prompt = f"""You are a helpful assistant.
What you know about this user:
{profile}
"""
Pattern: one collection per end-user (or one collection + container tags),
remember what conversations reveal, and fetch the profile at session start.
Profiles are computed on demand by an LLM call — cache per session, not per message.