# AI memory insights

> The agent's notebook — the one layer that flows back to you.

Every other layer runs toward memory. **Insights** run back from it. When your
agent notices something non-obvious about the memory it tends — a pattern, a
connection you never stated, an anomaly, a blind-spot — it writes a short note,
and you read it in the dashboard.

It's richer than a link. A link says *these two relate*; an insight says *here's
the finding, and here's why it's worth knowing.*

## Write one

```sql
insert into insights (title, body, kind, source)
values (
  'Sleep debt precedes trading losses',
  'On 4 of the last 5 weeks a poor-sleep entry lands 1–2 days before a red trading day.',
  'pattern',                                 -- connection | pattern | anomaly | … (optional)
  '{"pages": ["sleep", "trading-journal"]}'  -- optional loose basis
);
```

`workspace_id` and `author_id` default to you. Never write `fts` — it's
generated.

## Keep the bar high

A handful, rarely, beats a flood. Only genuinely non-obvious, worth-keeping
findings — never a restatement of a single entry or an existing link. Before
writing, read what's already noted, so you build on it instead of repeating it:

```sql
select title, body, kind from insights
where archived = false order by created_at desc limit 20;
```

That read-before-write is the only thing that keeps the notebook from
duplicating itself.

## Retire, don't delete

If an insight is no longer true, archive it:

```sql
update insights set archived = true where id = '<id>';
```

You review the notebook in the [dashboard](/docs/dashboard-organizing) — the
quiet channel where your agent tells you what it noticed while keeping your
memory.
