Usage Guide¶
All commands are available through the tot-agent entry point installed by
pip install -e ..
Global options¶
These options apply to every sub-command and are placed before the sub-command name:
| Option | Default | Description |
|---|---|---|
--version |
— | Print version and exit |
--log-level |
INFO |
DEBUG, INFO, WARNING, ERROR |
--log-file PATH |
— | Write logs to a file in addition to stderr |
--model MODEL |
claude-opus-4-5 |
Override Claude model ID |
--max-steps N |
40 |
Override per-run iteration ceiling |
--site-url URL |
http://localhost:4321 |
Override target application base URL |
# Enable debug logging and write to a file
tot-agent --log-level DEBUG --log-file run.log seed --tests 3
Commands¶
create — Create A/B tests¶
Create A/B tests using real book covers fetched from Open Library.
tot-agent create --count 5
tot-agent create --count 3 --genre "horror"
tot-agent create --count 2 --genre "fantasy" --headless
| Option | Default | Description |
|---|---|---|
--count N |
5 |
Number of A/B tests to create |
--genre TEXT |
mixed |
Book genre; "mixed" samples a variety |
--headless |
false |
Hide the browser window |
vote — Single user voting¶
Have one simulated user vote on existing A/B tests.
| Option | Default | Description |
|---|---|---|
--user TEXT |
required | Username (must exist in SIM_USERS) |
--count N |
3 |
Number of tests to vote on |
--headless |
false |
Hide the browser window |
simulate — Multi-user voting simulation¶
Simulate all configured users voting on existing tests.
| Option | Default | Description |
|---|---|---|
--votes-each N |
2 |
Number of votes each user casts |
--headless |
false |
Hide the browser window |
seed — Full pipeline¶
Create tests, run voting simulation, and view results — all in one command.
| Option | Default | Description |
|---|---|---|
--tests N |
5 |
Number of A/B tests to create |
--vote-rounds N |
1 |
Voting rounds per user |
--headless |
false |
Hide the browser window |
goal — Custom natural-language goal¶
Execute any plain-English objective against the target site.
tot-agent goal "Log in as alice, navigate to /tests, and take a screenshot."
tot-agent goal "Create one test using two sci-fi covers, then have bob vote." --headless
Tip
The goal command is the most flexible option. Use it for one-off
explorations or for goals that don't fit the pre-built commands.
users — List simulated users¶
Print a table of all configured simulated users and their voting biases.
Output:
┌──────────┬───────────┬──────────────┬────────────────────────┐
│ Username │ Password │ Display Name │ Voting Bias │
├──────────┼───────────┼──────────────┼────────────────────────┤
│ admin │ admin123 │ Admin │ random │
│ alice │ password1 │ Alice │ prefers_illustrated │
│ bob │ password2 │ Bob │ prefers_dark │
│ carol │ password3 │ Carol │ prefers_bright │
│ dave │ password4 │ Dave │ random │
└──────────┴───────────┴──────────────┴────────────────────────┘
info — Show configuration¶
Display current runtime configuration.
covers — Preview book covers¶
Fetch and display book covers without launching a browser.
| Option | Default | Description |
|---|---|---|
--count N |
4 |
Number of covers to fetch |
--verify |
false |
HEAD-check each URL to confirm it resolves |
Adapting to your application¶
tot-agent uses screenshots + vision so it adapts to most UIs, but you may
want to update config.py to match your application's routes:
| Setting | Purpose |
|---|---|
ROUTES["login"] |
Path to your login page |
ROUTES["create_test"] |
Path to the new-test form |
SIM_USERS |
Accounts that exist on your dev site |
SITE_URL |
Your dev server address |