# Adding context

> Give the KazoCode agent the right context with @ mentions for files, folders, code, docs, a selection, open editors, terminal output and images, plus automatic codebase search.

The agent can find most things itself, but pointing it at the right files makes it faster and more accurate. Type `@` in the message box to open **Add Context**.

## What you can add

| Item | What it attaches |
| --- | --- |
| **Files…** | One or more files, searched by name |
| **Folders…** | A folder, so the agent knows where to look |
| **Code…** | Specific lines found with codebase search |
| **Docs…** | Passages from a documentation site you've indexed |
| **Selection** | The text selected in the editor |
| **Open Editors** | The files open in your tabs |
| **Terminal** | Recent output from a terminal |
| **Image from Clipboard** | An image you copied, such as a screenshot |

Attached items appear as chips above the message box. Remove one with its close button before you send.

You can also drag files from the explorer into the chat, or paste an image directly.

## Codebase search

KazoCode indexes your project so the agent can find code by meaning, not only by exact text. The index splits files at declarations and ranks matches with keyword search over identifiers; add an embedding model in **Settings › Agent** for semantic search on top of that.

The most relevant code is added to each request automatically, and the agent can search the index itself whenever it needs to. To share embeddings with teammates who use the same embedding model, turn on sharing and the index is written to `.kazo/index/embeddings.json` in the project.

## Documentation sites

Choose **Docs… › Add Docs...** and enter the address of a documentation site. KazoCode reads up to 80 pages under that address, splits them into passages and indexes them. After that, `@` › **Docs…** attaches the passages that match your message, and the agent can search the docs on its own. Manage your docs sources in **Settings › Agent**.

## Instructions and memory

Some context is always there: your [instructions and rules](https://kazocode.app/docs/customize/instructions.md) (`KAZO.md`, `AGENTS.md` and others) and what the agent [remembers](https://kazocode.app/docs/customize/memory.md) about you and the project. You don't need to attach those.
