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

# Set up Koharu Agent

> Choose the Agent model and connect agents in other programs over MCP.

Koharu Agent is a project assistant inside the editor. It runs on any model you can pick for translation that calls tools: a hosted model, a subscription such as ChatGPT, or one of Koharu's general local models.

**1. Connect a provider**

Add an API key or sign in under **Settings → Providers**, or skip this step to use a local
model. See [translation providers](https://koharu.rs/models/providers.md).

**2. Open the Agent panel**

Open a project and select the **Agent** tab beside **Properties** on the right.

**3. Choose a model**

Select a model and a reasoning level at the top of the panel. **Provider default** uses the
model's own level. More reasoning can help with ambiguous edits but takes longer.

## What context is shared

Each request starts with the open project's outline: its pages and their layers. The Agent renders and attaches a page image only when it calls its page-view tool; it does not attach every page. A hosted model's provider receives what the Agent sends it.

> [!NOTE]
>
> The Agent and translation share provider connections, but not models: the Agent's model and
> reasoning are saved in the `[agent]` section of `~/.koharu/config.toml`, apart from translation's.
> That section also holds the Agent's system prompt, `max_turns` (20 model calls per request by
> default), and `corrections` (how many times a malformed tool call goes back to the model, 2 by
> default).

## Connect other agents over MCP

While Koharu runs, it serves the same tools to agents in other programs over MCP's Streamable HTTP transport at `http://127.0.0.1:7878/mcp`, shown at the top of the Agent panel. Add that URL to an MCP client on the same machine. The server works on whichever project is open, accepts connections from this machine only, and refuses requests from web pages.

> [card] [Work with a project](https://koharu.rs/agent/projects.md)
>
> Give the Agent a precise scope, review its edits, and use project history.


## Related topics

- [Koharu documentation](https://koharu.rs/index.md)
- [Work with Koharu Agent](https://koharu.rs/agent/projects.md)
- [Clean up source lettering](https://koharu.rs/guides/cleanup.md)
- [Settings](https://koharu.rs/reference/settings.md)
- [Formats and data](https://koharu.rs/reference/data.md)


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