> ## 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.

# How does Qodex memory actually work?

> Qodex memory keeps core project facts in every agent turn and loads larger behavior notes only when relevant.

# How does Qodex memory actually work?

Qodex memory is a set of project files the agent can use across chats, scans, and test runs.

It helps Qodex remember your app's auth pattern, test accounts, workflow rules, and known behavior. You can browse all of it on the **Knowledge** page under **Context** in the left navigation.

## Always-loaded memory

Some memory is small and important enough to include in every agent turn.

| File | Why it is always loaded |
| - | - |
| `business.md` | Core project facts, stack, auth patterns, test accounts, and constraints. |
| `rules.md` | Rules the agent should always follow. |

Keep these files concise. They should contain facts Qodex needs almost every time it works on the project.

## On-demand memory

Larger behavior notes are indexed and loaded only when relevant.

| File | What it usually contains |
| - | - |
| `api.md` | Endpoint behavior, payload patterns, and API observations. |
| `ui.md` | Page behavior, selectors, UI flows, and browser observations. |
| `code/` | A structural map of each linked repository: routes, auth, models, and components. |
| `imported/` | Documents you uploaded, such as PRDs or product docs. |

The agent can search or read these files when a task needs that context. For previous findings, it reads the live findings list rather than a summary, so it never works from stale bug history.

## Rules sources

`business.md` and `rules.md` are rules sources. An uploaded document becomes one when you open it on the **Knowledge** page and turn on **Use as a source of rules**.

When Qodex claims your software broke a rule, the claim must trace to a rules source or to something you said. Otherwise, Qodex asks you whether the behavior is intended instead of filing a bug.

## Why it is not traditional RAG

Qodex memory is file-based, not embedding-first.

The agent reads named files or searches their text. This makes memory easier for humans to inspect, edit, and reason about.

## How memory stays bounded

`business.md` and `rules.md` have token caps so they stay cheap to load on every turn.

Files Qodex writes are trimmed and consolidated over time, with older content kept in dated archives. The goal is to preserve useful facts without letting memory grow forever.

## Why this matters

Good memory helps Qodex:

* Reuse the correct login flow.
* Avoid rediscovering known API and UI behavior.
* Respect project-specific rules.
* Explain why it made a testing decision.
* Avoid repeating past mistakes.

## Next steps

> [card] [Memory overview](https://qodex.ai/docs/memory.md)
>
> Learn the memory system.

> [card] [business.md](https://qodex.ai/docs/memory-project-md.md)
>
> Write the most important project context.

> [card] [Memory concept overview](https://qodex.ai/docs/concepts-memory.md)
>
> See the conceptual model.

> [card] [Editing and curating](https://qodex.ai/docs/memory-editing-and-curating.md)
>
> Keep memory accurate over time.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.