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

# Improve an agent

> Claude Code reads container logs from your platform and recursively improves your agents.

This is the part where owning the platform pays off. Your container logs, your agent code, your running platform, and your iteration tool all live in one repo. Claude Code can see every part of it.

## Run the prompt

Open Claude Code in the cloned `agent-platform` repo and paste:

```
Run docs/improve-agent.md
```

Claude will:

1. **Pick an agent.** Either the one you just built, or one you point it at.
2. **Pull recent container logs.** Reads `docker compose logs` to see runs, sessions, and tool calls.
3. **Identify failure modes.** Reads through the logs and flags weak prompts, bad tool selections, missing instructions, hallucinations.
4. **Propose changes.** Edits the agent's instructions, adds or removes tools, tightens the prompt, adds guardrails.
5. **Re-run and verify.** Tests the changed agent against the same prompts, compares before/after, asks if you want to keep the changes.

## Why this works

Three things have to be true for a coding agent to improve another agent:

| Requirement           | Where it lives                                                 |
| --------------------- | -------------------------------------------------------------- |
| The container logs    | `docker compose logs`, visible to Claude Code in the terminal. |
| The agent code        | `agents/*.py` in this repo.                                    |
| A way to test changes | The running platform, hot-reloads on file change.              |

When all three live in one place, the loop closes. When they're split across three SaaS products, it doesn't.

## When to run it

* After a batch of real usage (not just your own testing).
* Before deploying a major change.
* When users report that an agent is missing the point.
* Periodically as part of routine maintenance.

## What changes, what doesn't

Claude Code edits agent code in place: instructions, tools, guardrails, model choice. It does not touch:

* The platform code (`app/`, `db/`).
* Other agents not under review.
* Your `.env` or any secrets.

Every change is a regular file edit you can `git diff` and revert.

## Next

[Lock in behavior with evals →](/tutorials/agent-platform/evals)
