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

# Editing and curating memory

> Keep Qodex memory small, accurate, and useful so the agent has the right context on every run.

# Editing and curating memory

Good memory is short, accurate, and current. Stale memory wastes tokens and can actively mislead the agent.

Treat memory like project documentation for Qodex: review it when the product changes, remove old facts, and keep recurring rules in the right file.

## Review cadence

Review memory after major product changes such as:

* Auth flow changes.
* Route or endpoint renames.
* Role and permission changes.
* New critical workflows.
* Large findings cleanup.
* Major UI redesigns.

Start with `project.md` and `workflow_rules.md`, then skim agent-managed files such as `api_behavior.md`, `ui_behavior.md`, and `findings_digest.md`.

## Resolve conflicts

If two memory files disagree, fix one and delete the stale version. Conflicting context is worse than missing context because the agent may follow the wrong one.

Common examples:

* Old auth endpoint in `api_behavior.md`.
* Test account changed in `project.md` but not in notes.
* A soft preference should become a hard rule in `workflow_rules.md`.

## Keep entries terse

Write memory as facts, not essays.

Bad:

```markdown theme={null}
- During a scan last month we noticed that the /api/users endpoint sometimes
  returns 401 when there is a stale CSRF cookie...
```

Better:

```markdown theme={null}
- /api/users can return 401 with a stale CSRF cookie. Clear cookies before login.
```

## Avoid these anti-patterns

* Storing credentials in memory.
* Keeping old account details after rotation.
* Duplicating the same fact across multiple files.
* Turning memory into a long wiki page.
* Deleting agent discoveries before checking whether they are still true.

## Promote recurring rules

If you tell the agent the same instruction repeatedly, add it to memory:

```text theme={null}
Remember this: never run destructive tests against /admin/reset.
```

Rules the agent must always obey belong in `workflow_rules.md`. General project facts belong in `project.md`.

## Related

<CardGroup cols={2}>
  <Card title="project.md" icon="pencil" href="/memory-project-md">
    Edit the main user-managed memory file.
  </Card>

  <Card title="Memory overview" icon="brain" href="/memory">
    See every memory file Qodex uses.
  </Card>

  <Card title="How memory works" icon="arrow-right-to-bracket" href="/kb-how-memory-works">
    Learn which files load every turn.
  </Card>

  <Card title="Memory concept overview" icon="circle-info" href="/concepts-memory">
    Read the short conceptual explanation.
  </Card>
</CardGroup>
