# briefing

> What a session opens with: where the project stands, what is due, the lessons that apply, what happened, then the memories.

A person coming back to a project doesn't search their memory for ten facts. They recall where things stand,
what they promised, what they learned the hard way and what happened last time. `briefing()` gives your model the
same, in one read, written out for your prompt.

```python
briefing = mem.briefing(project="checkout", cue=user_message)
system = f"{briefing}\n\n{instructions}"
```

```ts
const briefing = await mem.briefing({ project: "checkout", cue: userMessage });
const system = `${briefing}\n\n${instructions}`;
```

```bash
curl https://api.geniffy.com/v1/briefing \
  -H "Authorization: Bearer $GENIFFY_API_KEY" \
  -H "X-Geniffy-Space: customer_1042" \
  -H "Content-Type: application/json" \
  -d '{"project": "checkout", "cue": "Refunds still fail for orders over 10,000."}'
```

It reads, in this order, and stops at `budget_chars` (default 6,000) without cutting a line in half:

| Part | What it holds |
| --- | --- |
| Where things stand | The project's goal and focus, what is still open and since when, the decisions made and why, next steps, what blocks it, and what was finished |
| Due or promised | Promises and plans, yours and those made to you, whose time has come first |
| Rules and lessons | How-tos, rules and lessons learned, with when they apply and why; the ones that bear on the cue first |
| What happened | Episodes: what happened, how it ended and what it led to; the ones most related to the cue, then the latest |
| What is known | The memories that match the cue, each with its date |

Every line carries its date and time, so when an older note and a newer one disagree, your model can tell
which came later.

- `project` is the label the sources carry: a `project`, `context`, `thread` or `repo` label. A session
  saved from a repository is that repository's project. Leave it out to read across every project.
- `cue` is what is happening now: the task, the question, the opening message. Give it when you have it; it
  decides which lessons, episodes and memories come first.
- It is read, not written by a model, so it costs nothing and is fast enough to call on every turn. Call it
  at the start of a session, and again when the task changes.
- `briefing_full()` in Python and `briefingFull()` in TypeScript return the same text with its parts: `now`,
  `due`, `lessons`, `episodes` and `memories`, each with the source it came from.

## Where it comes from

The briefing is built from everything you add, read as it happened. Send whole sessions, tool calls and
results included ([Conversations](https://docs.geniffy.com/add-memories/conversations)), and Geniffy works out the rest: the stories,
where each project stands, the lessons and the promises. Facts still come only from what people said. Each
part can also be read on its own: [now, episodes, lessons and intentions](https://docs.geniffy.com/recall/state).

## Free to read

The briefing is read, not generated: no model is called, so it comes back at once, and it is never counted against
a plan. Call it as often as your app needs. See [Plans and usage](https://docs.geniffy.com/plans-and-usage).

Source: https://docs.geniffy.com/recall/briefing
