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

# Creating Agents

> Build custom agents for your own metrics

Create agents tailored to your project's specific improvement goals.

## Interactive Setup

```bash theme={null}
tenet peter agent create
```

Walks you through: name, metric, eval script, scope files, time budget.

## Manual Setup

1. **Write an eval script** in `eval/`:

```bash theme={null}
#!/usr/bin/env bash
CLI_DIR="${AGENT_WORKTREE:-$HOME/your-project}"
# ... measure your metric ...
echo '{"my_metric": 0.42}'
```

2. **Create agent config** in `.tenet/agents/my-agent.toml`:

```toml theme={null}
[agent]
name = "my-agent"
scope = "quality"
metric = "my_metric"
direction = "maximize"
time_budget_seconds = 300
description = "What this agent should do to improve my_metric"

[eval]
script = "eval/my-eval.sh"
data = "eval/fixtures/my-agent-baseline.jsonl"

[constraints]
scope_files = ["src/**/*.ts"]
max_file_changes = 3
```

3. **Test the eval** manually:

```bash theme={null}
bash eval/my-eval.sh
# {"my_metric": 0.42}
```

4. **Run the agent**:

```bash theme={null}
tenet peter agent my-agent --rounds 1
```

## Tips

* **Start with one metric** — focused agents beat general-purpose ones
* **Verify gradient** — run the eval, confirm the metric isn't at ceiling
* **Narrow scope** — fewer `scope_files` = more focused changes
* **Short rounds** — 3-5 minutes per round is ideal for iteration speed
