# context

> A block for your prompt: the memories that bear on a question, each with where it came from.

The commonest integration by far is "put what you know in front of my model". Done with search, that is
the same ten lines in every project: call, loop, format each memory with where it came from, join, and
handle the empty case. `context()` is those lines, written once.

```python
context = mem.context("When can I call Devika?", limit=12)
```

```ts
const context = await mem.context("When can I call Devika?", { limit: 12 });
```

It takes `limit` (1 to 50, default 12), `kind` (`people`, `plan`, `pref` or `detail`) and
`with_sources` (default true). `context_full()` in Python and `contextFull()` in TypeScript return the
same block with the memories behind it and an `empty` flag.

Each line names its source and when it was said or learned:

```text
- Priya Nair signs the Lumen renewal.  [note, 2026-10-05]
- The Lumen renewal comes up in March 2027.  [GTM plan, 2026-10-05]
```

A note added with a title is cited by that title, a file by its name and a page by its title; a note
without a title is cited as `note`. The memories behind the block come first by how much of each the
answer restates.

Source: https://docs.geniffy.com/recall/context
