# ATK Generated Agent

This is a minimal OpenAI-compatible Python Agent generated by **ATK new Agent**.

## Configure

Copy `.env.example` to `.env` and set:

```text
OPENAI_API_KEY=
OPENAI_BASE_URL=https://api.openai.com/v1
OPENAI_MODEL=gpt-4.1-mini
```

## Run

ATK new Agent normally runs `uv sync` after generating this project. If that setup step was skipped or failed, run it before the first local execution:

```sh
uv sync
uv run python run_agent.py --input hello
```

You can also pass a JSON object:

```sh
uv run python run_agent.py --input '{"question":"What should I do next?"}'
```

## Observability

`agent.py::run_agent` emits standard Python `logging` records on logger `atk.generated_agent` for each input item start, completion, and exception. When this Agent is connected with `atk-init`, the generated evaluation runner can capture those records into per-row log files referenced by `log_path`.

## ATK Handoff

After confirming the Agent runs, continue with Agent Tune Kit:

```text
$atk-init Agent 入口是 agent.py 的 run_agent，评估数据是 <dataset-path>
```

The generated Agent entrypoint is `agent.py::run_agent`.
