Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## v1.6.0 — 2026-08-21
- Add `type: cursor` REPL provider (Cursor CLI) so Auto / Router works in `agent-tester repl` alongside other models; `/reset` clears the CLI chat session; document `models.cursor-auto` config

## v1.5.0 — 2026-08-21
- Add built-in `cursor` agent preset (`agent -p --force --trust`) using Cursor Auto when `--model` is omitted; document comparing Auto to other agents (claude/codex/etc.), optional `cursor-composer` example, and `CURSOR_API_KEY` auth (README, `config.example.yaml`, Docker Compose)

Expand Down
49 changes: 48 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ agent-tester run "Refactor the auth module" --agents cursor,claude
agent-tester run "Refactor the auth module" --agents cursor,codex
```

For interactive multi-model sessions, configure the same Auto backend under `models:` with `type: cursor` (see [Cursor CLI authentication](#cursor-cli)):

```bash
agent-tester repl --workdir .
# then compare @cursor-auto against other configured models
```

You can also pin a Cursor model (or any other CLI agent) as a separate config entry — useful when you want two Cursor variants, or to show that any agent tool works the same way:

```yaml
Expand Down Expand Up @@ -147,7 +154,7 @@ your-repo/.agent-tester/skills/style.md # adds a new skill for this project

### Cursor CLI

The `cursor` shell agent uses the Cursor CLI (`agent`), not the `providers:` block. Authenticate in one of these ways:
The `cursor` shell agent (`agent-tester run`) and the `type: cursor` REPL provider both use the Cursor CLI (`agent`). Authenticate in one of these ways:

1. **Interactive:** run `agent login` once on the host (stores credentials for later runs).
2. **API key:** export `CURSOR_API_KEY` in the environment (recommended for CI / Docker / headless). AgentTester forwards the process environment to each agent; `docker-compose.yaml` also passes `CURSOR_API_KEY` through from the host.
Expand All @@ -156,6 +163,7 @@ The `cursor` shell agent uses the Cursor CLI (`agent`), not the `providers:` blo
```bash
export CURSOR_API_KEY=your_api_key_here
agent-tester run "…" --agents cursor,claude
agent-tester repl --workdir .
```

```yaml
Expand All @@ -164,8 +172,24 @@ agents:
command: "agent -p --force --trust {prompt}"
env:
CURSOR_API_KEY: "your_api_key_here" # prefer env / Docker; do not commit

providers:
cursor:
type: cursor
# api_key_env: CURSOR_API_KEY # default
# binary: agent # or cursor-agent

models:
cursor-auto:
provider: cursor
model: auto # Cursor Auto / Router (omit --model)
# cursor-composer:
# provider: cursor
# model: composer-2.5
```

The REPL provider runs Cursor as a full agent (its own tools). With `--workdir`, each model still gets an isolated clone; Cursor is pointed at that clone via `--workspace`. `/reset` clears REPL history and the Cursor CLI chat session.

### Providers (evaluators and REPL models)

Define a `providers` block to share credentials across evaluators and REPL model agents. Each provider type reads credentials from a standard environment variable automatically — no `api_key_env` required unless you want to override the default.
Expand All @@ -177,6 +201,7 @@ Define a `providers` block to share credentials across evaluators and REPL model
| `bedrock` | AWS Bedrock Converse API | `BEDROCK_API_KEY` (api_key mode) | built-in; `pip install agenttester[aws]` for boto3 modes |
| `azure` | Azure AI Foundry / Azure OpenAI Service | `AZURE_OPENAI_API_KEY` | built-in |
| `vertex` | GCP Vertex AI (OpenAI-compatible endpoint) | `GOOGLE_API_KEY` | built-in |
| `cursor` | Cursor CLI agent (Auto / Router or a pinned model) | `CURSOR_API_KEY` | built-in; requires [Cursor CLI](https://cursor.com/docs/cli/overview) on PATH |

Override the default for any provider or evaluator with `api_key_env: MY_CUSTOM_VAR`.

Expand Down Expand Up @@ -257,6 +282,23 @@ providers:

CLI tokens (Azure and GCP) are cached for 55 minutes to avoid extra subprocesses on every request.

### Cursor (REPL)

```yaml
providers:
cursor:
type: cursor
# api_key_env: CURSOR_API_KEY
# binary: agent

models:
cursor-auto:
provider: cursor
model: auto
```

`model: auto` (or `default` / `auto-smart`) uses Cursor Auto. Pin any other id from `agent models` the same way. See [Cursor CLI authentication](#cursor-cli).

### Evaluators and REPL models

Providers are referenced by name in `evaluators:` (for diff review) and `models:` (for the REPL):
Expand All @@ -265,6 +307,8 @@ Providers are referenced by name in `evaluators:` (for diff review) and `models:
providers:
anthropic:
type: anthropic
cursor:
type: cursor
my-azure:
type: azure
endpoint: https://my-resource.openai.azure.com
Expand All @@ -287,6 +331,9 @@ evaluation:
max_aggregate_tokens: 2000 # aggregate is summarized before injection if too long

models:
cursor-auto:
provider: cursor
model: auto
claude-bedrock:
provider: bedrock-sso
model: anthropic.claude-3-5-sonnet-20241022-v2:0
Expand Down
13 changes: 13 additions & 0 deletions config.example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,19 @@ agents:
# aws_access_key_id_env: MY_KEY_ID # explicit credential env vars
# aws_secret_access_key_env: MY_SECRET
# aws_session_token_env: MY_TOKEN # optional
#
# cursor:
# type: cursor
# # api_key_env: CURSOR_API_KEY # default; or use `agent login`
# # binary: agent # or cursor-agent
#
# models:
# cursor-auto:
# provider: cursor
# model: auto # Cursor Auto / Router
# # cursor-composer:
# # provider: cursor
# # model: composer-2.5

# --- LLM-based code quality evaluation ---
# After each iteration, each evaluator independently reviews every agent's diff
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "agenttester"
version = "1.5.0"
version = "1.6.0"
description = "Run a prompt against multiple coding agents in parallel and compare results"
readme = "README.md"
requires-python = ">=3.10"
Expand Down
7 changes: 7 additions & 0 deletions src/agenttester/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
AnthropicProvider,
AzureProvider,
BedrockProvider,
CursorProvider,
OpenAICompatProvider,
Provider,
VertexProvider,
Expand Down Expand Up @@ -245,6 +246,12 @@ def _build_named_provider(name: str, data: dict) -> Provider:
api_key_env=data.get("api_key_env"),
auth_method=data.get("auth_method", "api_key"),
)
if ptype == "cursor":
return CursorProvider(
api_key_env=data.get("api_key_env", "CURSOR_API_KEY"),
binary=data.get("binary", "agent"),
optimize_for=data.get("optimize_for"),
)
raise ValueError(f"Unknown provider type {ptype!r} for provider '{name}'")


Expand Down
2 changes: 2 additions & 0 deletions src/agenttester/providers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@
from .aws import BedrockProvider
from .azure import AzureProvider
from .base import Provider
from .cursor import CursorProvider
from .gcp import VertexProvider
from .openai_compat import OpenAICompatProvider

__all__ = [
"AnthropicProvider",
"AzureProvider",
"BedrockProvider",
"CursorProvider",
"OpenAICompatProvider",
"Provider",
"VertexProvider",
Expand Down
Loading
Loading