> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anonalabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Tutor that remembers the learner

> Progress, sticking points and preferences that persist between sessions, months apart.

[← All use cases](/use-cases/overview)

<div className="uc-examples"><a href="https://github.com/anonalabs/Anona-Memory-SDK/blob/main/examples/user_profiles.py">user\_profiles.py</a><a href="https://github.com/anonalabs/Anona-Memory-SDK/blob/main/examples/time_travel.py">time\_travel.py</a></div>

## The scenario

A tutor that forgets is a tutor that re-teaches. It re-explains what the student
already has, misses that they have failed the same kind of problem four times,
and cannot tell you in March what they were struggling with in January.

Session memory does not fix this. The gap between sessions is where the teaching
signal lives.

## Step 1 — Record what happened, not just what was said

```python theme={null}
client.record(
    space_id="tutoring",
    content="Priya solved quadratics by factoring but could not start one needing the formula.",
    user_id="student-4417",
    timestamp="2026-01-18T16:00:00Z",
)
```

`timestamp` is when the thing *happened*, which is not always when you are
writing it down. Getting it right is what makes the temporal questions below
answerable at all.

## Step 2 — Open the next session already knowing

```python theme={null}
profile = client.get_user_profile(space_id="tutoring", user_id="student-4417")
print(profile["context"])
```

One call returns what is known about that learner, already formatted for a
prompt. Put it in the system message and the first minute of the session stops
being an interview.

## Step 3 — Ask a question about one student

```python theme={null}
print(client.ask_about_user(
    space_id="tutoring",
    user_id="student-4417",
    query="Which topics has she needed re-explaining more than once?",
))
```

## Step 4 — Show progress over a real interval

```python theme={null}
client.retrieve(
    space_id="tutoring",
    query="quadratics",
    user_id="student-4417",
    occurred_after="2026-01-01T00:00:00Z",
    occurred_before="2026-03-01T00:00:00Z",
)
```

That is the parents' evening answer, and it is the one no chat history can give
you.

## Evals

1. Record five sessions for one student across three months.
2. Ask `ask_about_user` for recurring difficulties. Check it names the one you
   planted deliberately.
3. Run the same question with a two-week `occurred_after` window and confirm the
   answer narrows rather than repeating itself.
4. Ask about a student with no memories. It should say so, not improvise.

## Guardrails

<Warning>
  **This is data about a child, in many deployments.** Scope every write, keep
  the space out of reach of other learners' guardians, and have the
  [deletion runbook](/use-cases/delete-a-users-memories) ready before you need
  it — not after a parent asks.
</Warning>

* **`memory_count` on a profile is non-monotonic.** Consolidation merges related
  memories, so the number can go *down* while the system knows strictly more.
  Do not show it to a parent as "things learned".
* **Don't record judgements you would not say out loud.** Anything stored is
  retrievable, and "seems lazy" reads very differently in an export than it did
  in the moment.
* **Set `timestamp` yourself for anything you are backfilling.** Without it the
  event time is the write time, and a year of history imported on Tuesday all
  happened on Tuesday.

## Built from

Both are complete, runnable scripts:
[`user_profiles.py`](https://github.com/anonalabs/Anona-Memory-SDK/blob/main/examples/user_profiles.py),
[`time_travel.py`](https://github.com/anonalabs/Anona-Memory-SDK/blob/main/examples/time_travel.py).
