> Let your agent tidy its own Bilinc memory in a dream pass, merging duplicates and retiring stale entries, and undo the whole pass in one step for 7 days.

Canonical page: https://bilinc.space/docs/dream

- [Docs](https://bilinc.space/docs)
- Use Bilinc
- Dream pass

# Tidy your agent's memory, undo it in one step.

In a dream pass your agent reviews its own memory and cleans it up. Bilinc runs no model for this: your agent decides, Bilinc applies the changes and keeps a way back.

Search the docs

### All docs pages

Start

- [Overview](https://bilinc.space/docs)
- [Quickstart](https://bilinc.space/docs/quickstart)
- [Cloud quickstart](https://bilinc.space/docs/cloud-quickstart)
- [Quicktest help](https://bilinc.space/docs/quicktest-troubleshooting)
- [v2 migration](https://bilinc.space/docs/migration-v2)

Use Bilinc

- [Python SDK](https://bilinc.space/docs/python-sdk)
- [CLI](https://bilinc.space/docs/cli)
- [Cloud API](https://bilinc.space/docs/api-reference)
- [MCP integration](https://bilinc.space/docs/mcp)
- [Remote MCP for Claude](https://bilinc.space/docs/remote-mcp)
- [MCP tools](https://bilinc.space/docs/mcp-tools)
- [Wiki export](https://bilinc.space/docs/wiki)
- [Dream pass](https://bilinc.space/docs/dream)
- [Agent recipes](https://bilinc.space/docs/agent-recipes)

Agent integrations

- [Codex](https://bilinc.space/docs/codex)
- [Claude Code](https://bilinc.space/docs/claude-code)
- [Cursor](https://bilinc.space/docs/cursor)
- [MCP clients](https://bilinc.space/docs/mcp-clients)

Concepts

- [Memory model](https://bilinc.space/docs/memory-model)
- [Commit and recall](https://bilinc.space/docs/commit-recall)
- [Entitlements](https://bilinc.space/docs/entitlements)
- [Recall profiles](https://bilinc.space/docs/recall-profiles)
- [Evidence-aware recall](https://bilinc.space/docs/evidence-aware-recall)
- [Snapshots and rollback](https://bilinc.space/docs/snapshots-rollback)
- [Audit trail](https://bilinc.space/docs/audit-trail)

Operate

- [Security](https://bilinc.space/docs/security)
- [Production checklist](https://bilinc.space/docs/production-checklist)
- [Operations](https://bilinc.space/docs/operations)
- [Errors](https://bilinc.space/docs/errors)
- [Rate limits](https://bilinc.space/docs/rate-limits)
- [Troubleshooting](https://bilinc.space/docs/troubleshooting)

Reference

- [Environment variables](https://bilinc.space/docs/environment-variables)
- [CLI reference](https://bilinc.space/docs/cli-reference)

Also

- [Pricing](https://bilinc.space/pricing)
- [Changelog](https://bilinc.space/changelog)
- [Connect over MCP](https://bilinc.space/mcp)

## Start, act, and keep the undo.

### 1. Start

The agent starts a dream and reads the candidate entries: up to 200 entries changed since the last finished dream, or in the last 7 days.

### 2. Act

The agent sends actions: `revise` to merge true duplicates, `forget` to retire stale entries, `confirm` to keep an entry, `flag` to leave an unclear case for a person. Each action names the version it read, so an entry that changed since then is reported as a conflict and left alone.

### 3. Undo if needed

`dream_undo` reverses the dream's own changes for 7 days after it. An entry another writer changed since is reported as a conflict and kept.

## Limits that keep a dream small.

A dream forgets at most 30% of its candidates and at most 20 entries; a page of actions that would go past it is refused before anything is written. `dream_apply` sends actions in pages of 25 and, when a page fails, reports what earlier pages applied.

Undoing a removed entry restores its value, type, importance and source; other metadata such as TTL or canonical flags is not restored, so an entry that had a TTL comes back without one.

Keys starting `bilinc:dream:` hold dream reports, which the dream pass itself writes: an ordinary commit, revise or confirm of such a key is refused (forgetting one is allowed).

## Where it runs.

### Python SDK

`CloudClient.dream_start`, `dream_apply`, `dream_undo` and `dream_show`.

### CLI

Terminal

```
bilinc dream start --limit 50          # prints a dream id and the candidates
bilinc dream apply <dream_id> --file actions.json
bilinc dream show <dream_id>
bilinc dream undo <dream_id>
```

### MCP

The local adapter `python3 -m bilinc.cloud_mcp` and the hosted connector at [mcp.bilinc.space](https://bilinc.space/docs/remote-mcp) both have `dream_start`, `dream_apply` and `dream_undo`. On the connector, `dream_apply` and `dream_undo` are marked destructive, so Claude asks before running them, and a read-only connection does not see them.

[PreviousWiki export](https://bilinc.space/docs/wiki)
[NextAgent recipes](https://bilinc.space/docs/agent-recipes)

On this page

- Start, act, and keep the undo.
- Limits that keep a dream small.
- Where it runs.
