agentleFS
botzrDevbotzrDev/dreamd/llms-full.txt

dreamd

llms.txt9 starsChanged 23 days agoApache-2.0View on GitHub

Every memory, traced. Every removal, on record. dreamd is the self-hosted record of what your AI agents learn. Claude Code, Cursor, Cline and any MCP agent on any model share one .agent/ folder in your repo, as plain files in git. Every lesson cites the events it came from. When a memory goes bad, blame finds it and forget removes it from the live record with a receipt. Copies stay in git history until you rewrite it. In your project,…

  • Installs packages

The file

We split this llms-full.txt into the rules it gives an agent

9 rules. About 0 are common, 2 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Every memory, traced. Every removal, on record.

    line 10
  2. Distinctive:

    Not a vector database. Recall is BM25 lexical (Tantivy) × salience.

    line 27
  3. Very specific:

    Not a hosted SaaS. Memory stays local by default.

    line 30
  4. Very specific:

    Not a replacement for AGENTS.md or SKILL.md.

    line 32
  5. Very specific:

    Not a Python SDK. No Python required.

    line 34
  6. Very specific:

    Not an embedded memory SDK.

    line 35
  7. Very specific:

    All files are UTF-8 plaintext.

    line 143
  8. Very specific:

    All well under the <5ms P50 warm target.

    line 209
  9. Distinctive:

    Read-after-write: a search sees every append that returned before it.

    line 211

≈ “Common” is an estimate: at least 1 in 5 of the 3,913 llms.txt files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
llms-full.txt
# dreamd: Full Documentation for LLMs
#
# Purpose: Long-form context bundle for AI tools (larger than llms.txt).
# Audience: External LLMs needing install, API, and architecture context.
# Regenerate: Update manually when README, SPEC, or GUIDE change materially.
# Index: see llms.txt for the short link list.

## What dreamd is

Every memory, traced. Every removal, on record. dreamd is the self-hosted record of
what your AI agents learn. Claude Code, Cursor, Cline and any MCP agent on any model
share one `.agent/` folder in your repo, as plain files in git. Every lesson cites the
events it came from. When a memory goes bad, `blame` finds it and `forget` removes it
from the live record with a receipt. Copies stay in git history until you rewrite it.

In your project, AGENTS.md is what you wrote down. dreamd is what your agent learned.
`SKILL.md` is how an agent calls the two MCP tools. A dream cycle runs when you
invoke `dream`; nothing runs it on a timer, and there is no MCP tool for it.

The problem dreamd solves: coding agents now write their own memories. When one picks
up a bad lesson, most teams can't tell where it came from or whether it's really gone.
dreamd keeps the record on your own machines, for every agent that reads and writes
through MCP, without any of them needing to know the others exist.

## What dreamd is not

- Not a vector database. Recall is BM25 lexical (Tantivy) × salience. Vector/embedding
  and hybrid recall are not shipped. (The "semantic" layer is LESSONS.md indexed as
  documents, scored the same lexical way, not embeddings.)
- Not a hosted SaaS. Memory stays local by default. The only opt-in network path is
  an LLM-assisted dream cycle (API key required; `--no-llm` stays offline).
- Not a replacement for AGENTS.md or SKILL.md. Those are human-authored project rules;
  `.agent/` is machine-written runtime memory. They complement each other.
- Not a Python SDK. No Python required. Distribution is npm (`npx`) and Rust (`cargo`).
- Not an embedded memory SDK. Mem0, Letta, and Zep are libraries you put inside
  one agent you control. dreamd is a folder several existing agents share through
  MCP. Mem0 also speaks MCP; Letta Code is harness-native. The cell-by-cell
  comparison is docs/compared.md.

## Install

### No Rust required (npx path)

  npx -y dreamd-mcp setup   # scaffold .agent/ and wire your harness
  npx -y dreamd-mcp         # start the MCP server (stdio)

Supported: Linux x86_64, macOS x86_64/aarch64 (the prebuilt binaries the npm shim
downloads). The shim has no Windows binary. A dreamd.exe from source, or from a
GitHub release's windows-x86_64.tar.gz when that release has one, does watch and
learn over loopback TCP with a bearer token. The dream cycle and the Tantivy
index run there too; see docs/windows.md. Node >= 18 required.

Version note: this describes 1.4.5, published on GitHub as `v1.4.5` and on npm
as `dreamd-mcp` 1.4.5. `blame`, `salience-drift`, `forget`,
`recall --without`, `doctor --provenance`, and `explain=1` are in that version;
`undo-cycle` and `report` are new in it.
`dreamd memory` still runs and was deprecated in 1.2.0; it is removed in 2.0.

### From source (requires Rust stable)

  git clone https://github.com/botzrDev/dreamd.git
  cd dreamd
  cargo install --path crates/dreamd-cli
  dreamd setup             # or `dreamd init` to scaffold without writing MCP config
  dreamd mcp

## MCP configuration

`setup` writes this block for you (`.mcp.json` for Claude Code, `.cursor/mcp.json`
for Cursor). By hand:

### Claude Code: add to `.mcp.json` in your project root:

  {
    "mcpServers": {
      "dreamd": {
        "command": "npx",
        "args": ["-y", "dreamd-mcp"]
      }
    }
  }

### Cursor: same block in `.cursor/mcp.json`. Also copy
  `adapters/cursor/.cursor/rules/dreamd-recall.mdc`
  into your project's `.cursor/rules/` for automatic recall on session start.

### Cline / other MCP-aware harnesses: same `mcpServers` block in the harness's
  own MCP settings file (Cline: see adapters/cline/README.md).

## MCP tools

dreamd exposes two MCP tools: `search_nodes` and `append_node`.

### search_nodes: recall from memory

  Input:  { "query": "string", "k": number }   (k defaults to 5; no other arguments)
  Output: { "results": [...] } ranked by BM25 × salience. Each hit has score, bm25,
          salience, source ("episodic" = raw event, "semantic" = LESSONS.md lesson),
          content, and metadata (timestamp_sec, pain, importance, recurrence,
          skill_action, source_harness).

  Use when:
  - Starting a new task in a project worked in before
  - The user references a past decision or problem
  - About to make a choice that may have a documented prior

### append_node: write to memory

  Input:
  {
    "skill_action":   "rust::error_handling::axum_rejection",  // :: -separated, language-first
    "content":        "Axum requires custom Error types to implement IntoResponse.",
    "source_harness": "claude-code",   // required; omitting causes a deserialization error
    "pain":           7.5,             // 0–10, how disruptive if not known (default 5.0)
    "importance":     8.0,             // 0–10, how broadly applicable (default 5.0)
    "client_dedup_key": "axum_requires_custom_error_types_to_implement_intoresponse"
      // optional idempotency key; a repeat call with the same key returns the first id
  }
  Returns: a tool result with { "id": "evt_…", "timestamp": "…", "deduplicated": false }
  after the line is synced to disk. (HTTP `POST /api/v1/learn` returns 201 with the
  same body.) The server mints `id`, `timestamp`, and `schema_version`.

  skill_action convention: language::domain::specific
    rust::error_handling::axum_rejection
    typescript::testing::vitest_async_timeout
    python::deps::virtualenv_activation

PROTOCOL NOTE: after `initialize`, send `notifications/initialized` before calling
tools, as the MCP lifecycle requires. A just-appended node becomes searchable after
the next index commit (up to 5 s); an empty result right after an append is that delay.

## .agent/ folder layout

  .agent/
    episodic/AGENT_LEARNINGS.jsonl   # append-only event log
    semantic/LESSONS.md              # lessons consolidated by the dream cycle
    semantic/recurrence_counts.json  # cluster counts written by the dream cycle
    personal/PREFERENCES.md          # user preferences (never sent to LLM without consent)
    working/WORKSPACE.md             # scratch file; `dreamd reset workspace` re-scaffolds it
    .dreamd/                         # implementation state, gitignored (index, state,
                                     # config.toml, branches/, provenance/, snapshots/)

All files are UTF-8 plaintext. `.agent/` is checked into git. You can cat, grep, and
git diff any file. Durable appends to the JSONL go through `append_node` / the daemon
(single writer). A line fixed by hand needs `dreamd doctor --repair`. A dream cycle
keeps a hand-edited LESSONS.md, makes no model call, and says so.

## Episodic record schema (schema_version: "1.0.0")

  {
    "schema_version": "1.0.0",
    "id":             "evt_01M3YEFV3K86X3S7AKJTVERJ0B",   // evt_ + 26-char ULID, server-minted
    "timestamp":      "2026-05-08T10:55:00Z",
    "source_harness": "claude-code",
    "skill_action":   "rust::error_handling::axum_rejection",
    "content":        "Axum requires custom Error types to implement IntoResponse.",
    "pain":           7.5,
    "importance":     8.0,
    "pinned":         false
  }

## CLI commands

  dreamd setup             # scaffold .agent/ (via init) and write the harness MCP config
  dreamd init              # scaffold .agent/ in the current project
  dreamd mcp               # start MCP server over stdio
  dreamd watch             # foreground daemon mode (SIGINT/SIGTERM-graceful)
  dreamd service install|start|restart|status|uninstall   # per-user service running `watch`
  dreamd status            # daemon liveness, project, last dream cycle
  dreamd dream             # run the dream cycle: consolidate episodic → semantic
  dreamd dream --dry       # print the LESSONS.md the cycle would write; writes nothing
  dreamd recall <query>    # ranked search (table); --explain, --without, --without-cluster
  dreamd blame <query>     # which memories drove a query's ranking; --explain, --json
  dreamd score             # top memories by salience, no query
  dreamd salience-drift    # salience distribution and drift vs. 7 days ago; --json
  dreamd memory branch|checkout|branches|delete|diff|bisect   # deprecated in 1.2.0, removed in 2.0; branch .agent/ with git
  dreamd forget <evt_id>   # remove one event + the lesson state built from it; --dry-run, --proof <path>
  dreamd doctor            # health check; --repair, --cluster-health, --provenance
  dreamd archive <evt_id> --force-unpin   # clear a pin so decay can prune the entry
  dreamd migrate --from 1.0.0 --to 1.0.0  # episodic schema migration (identity no-op only)
  dreamd vectors enable    # model download on a `--features vectors` build; exits 2 on
                           # the default binary; recall is unchanged either way
  dreamd uninstall         # stop local servers, unregister project, clear caches
  dreamd update            # stop local servers, keep the cached binaries of this
                           # version and of an installed service, remove the others
  dreamd version           # structured version output
  dreamd reset workspace   # re-scaffold working/WORKSPACE.md

On the npm path, `npx -y dreamd-mcp <cmd>` forwards every command above. The shim
does not put `dreamd` on `PATH`. From 1.2.1 that includes `recall`, `score`,
`status`, `archive`, and `migrate`. The 1.2.0 shim did not forward those five.

## HTTP API (daemon)

`dreamd watch` serves HTTP on the Unix socket `~/.agent/dreamd.sock` (peer-UID checked);
every request carries `X-Agent-Root: <project root>`. On Windows it is loopback TCP +
bearer token instead. Main routes: `POST /api/v1/learn`, `GET /api/v1/recall`
(`q`, `k`, `explain=1` for a `citations` array, repeatable `exclude=`),
`POST /api/v1/dream`, `GET /api/v1/health`, `GET /api/v1/preferences`,
`GET /api/v1/observability/salience`. `POST /api/v1/migrate`
is a stub that answers 501. Full reference: docs/http-api.md.

## Recall latency (warm in-RAM BM25 index, Criterion 0.5, WSL2/Linux; historical measurement, not re-run on 1.0.0)

  1,000 entries    ~50 µs
  10,000 entries   ~313 µs
  100,000 entries  ~2.8 ms

All well under the <5ms P50 warm target. Run `cargo bench -p dreamd-core --bench recall` to
reproduce (docs/benchmarks.md).
Read-after-write: a search sees every append that returned before it. When the index
has not committed one yet, the search waits for that commit, at most one second.

## Privacy

Memory stays local by default. The daemon makes no network calls unless you opt
into an LLM-assisted dream cycle (API key in the environment or
`~/.config/dreamd/secrets.toml`; `--no-llm` keeps the cycle offline).
`.agent/personal/` is excluded from that request unless you pass
`--share-personal` on that call.

## Current scope (v1.4.5)

IN: BM25 lexical recall (including `LESSONS.md` as a Tantivy document layer,
not embeddings), Linux + macOS full daemon, Windows learn, dream cycle, and Tantivy index (loopback TCP; no prebuilt npm binary), opt-in LLM
dream cycle, `dreamd service`, npm `dreamd-mcp`, `dreamd memory`
(deprecated, removed in 2.0; branch `.agent/` with git), provenance ledger recording + `dreamd doctor --provenance`
(stored roots signed from 1.4.5, no trust label), `dreamd forget` (signed
receipt, not a proof that every copy is gone), `dreamd report`, `undo-cycle`,
`dreamd proof` and `dreamd verify`,
`dreamd blame`, `recall --without`, `salience-drift`, `explain=1` citations.
NOT: vector/embedding or hybrid recall (the optional `vectors` cargo feature only
downloads a model), a power-loss proof of the Windows directory flush, Homebrew,
auto dream cycle, a proof that a removed memory is gone everywhere, sync/CRDT.

## Key links

  Repo:    https://github.com/botzrDev/dreamd
  SPEC.md: https://github.com/botzrDev/dreamd/blob/main/SPEC.md
  npm:     https://www.npmjs.com/package/dreamd-mcp
  License: Apache-2.0

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.