> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ngram.space/llms.txt
> Use this file to discover all available pages before exploring further.

# Give memory a readable form

> Curate durable knowledge and inspect the Entity’s journal.

An Entity's knowledge and journal are ordinary Markdown files with different roles. Knowledge holds reusable context; the journal records reflections over time.

## Edit knowledge

```bash theme={"theme":"github-light-default"}
uv run ngram knowledge rook
```

This opens the Entity's `knowledge.md` in your configured editor and creates the file if needed. Organize it with second-level headings:

```markdown theme={"theme":"github-light-default"}
## [locked] identity
You are Rook, a curious and direct research companion.

## working preferences
Explain a plan before a long task. Prefer small, verifiable steps.

## current project
We are building a spatial guide to the solar system.
```

The knowledge store can retrieve relevant sections into a turn. Keep sections focused and update facts when they change.

## Let the Entity maintain sections

The `update_knowledge` tool supports `add`, `update`, and `remove`. For example, the Entity can add a section with:

```json theme={"theme":"github-light-default"}
{"action":"add","section":"demo plan","content":"Build three labeled objects, explain their relationship, then remove them."}
```

The tool writes a backup before editing and refreshes the knowledge store. It refuses updates or removal of a `[locked]` section. That lock applies to this tool, not to an operator or process with direct filesystem access.

Automatic context compaction can also extract durable facts into knowledge when `compaction_flush_to_knowledge` is enabled. This is selective retention; it does not preserve every detail of the original conversation.

## Inspect the journal

```bash theme={"theme":"github-light-default"}
uv run ngram journal rook
```

The journal tool appends entries, while the operator can inspect the underlying file. In Telegram, `/journal` shows recent entries without asking the model to rewrite them.

A journal may contain personal context. “Private” describes its intended audience, not an encryption guarantee.

## Find and preserve the files

Without a configured workspace, these files normally live under the Entity's state directory. `NGRAM_EXECUTION_WORKSPACE_DIR` can redirect them to persistent storage, and portable Entities use their runtime cache layout.

Use `uv run ngram status rook` and the [persistence guide](/deployment/persistence) to find the actual paths. Back up both files together with the structured memory store.
