KestrelDocs

SDK Reference

The kestrel command: set up a repo, start runs, read traces and edit memory from the terminal.

Terminal
npm i -g kestrel   # or run any command with npx kestrel

The CLI reads KESTREL_API_KEY, or asks you to sign in in the browser the first time.

Commands

CommandWhat it does
kestrel initAdd a kestrel.yaml with commands it found in the repo
kestrel run "<task>"Start a run on the current repo and follow it
kestrel runs listList runs, newest first
kestrel runs cancel <id>Cancel a queued or running run
kestrel trace <id>Print a run's trace
kestrel sandboxOpen a shell in a new sandbox for the current repo
kestrel memory listShow the repo's memory
kestrel memory add "<fact>"Add a fact
kestrel memory forget <topic>Remove facts on a topic

kestrel run

Terminal
kestrel run "fix the flaky checkout test" --agent codex --repeat-tests 20 --no-follow
FlagDefaultWhat it does
--repothe current repoRun on another repo
--agentfrom kestrel.yamlPick the agent for this run
--fromnoneStart from a snapshot
--repeat-tests1Run the tests this many times in the gate
--no-followoffPrint the run id and return at once
--jsonoffPrint machine-readable output

Exit codes

CodeMeaning
0A pull request opened
1The run stopped at the eval gate (needs_review)
2The run failed or was cancelled
3Bad input or a missing key

Was this page helpful?

Open the dashboard