Quickstart
Running your first task
This guide starts your first Kestrel run, from an API key to a pull request, in about five minutes.
Create a Kestrel account
Every new workspace starts on Hobby: 100 runs a month on one repo, free. Open the dashboard and connect GitHub when it asks.
Set your API key
- Open Settings → API keys in the dashboard.
- Create a key and copy it. You will see it once.
- Paste it into your
.envfile.
KESTREL_API_KEY=kst_live_••••••••Install the SDK
Install the SDK in your project, or use the CLI with
npxand skip this step.npm i @kestrel/sdkpip install kestrelStart a run
Give Kestrel a repo and a task in plain words. It starts a sandbox, copies the repo in, and hands the task to your agent.
import { Kestrel } from "@kestrel/sdk"; const kestrel = new Kestrel(); const run = await kestrel.runs.create({ repo: "acme/web-app", task: "Fix the flaky checkout test", }); console.log(`Watching ${run.id}`);from kestrel import Kestrel kestrel = Kestrel() run = kestrel.runs.create( repo="acme/web-app", task="Fix the flaky checkout test", ) print(f"Watching {run.id}")Watch it work
Each step arrives as it finishes. When the evals pass, the run ends with a pull request.
for await (const step of run.steps()) { console.log(step.name, step.model, `${step.durationMs} ms`); } const result = await run.wait(); console.log(result.status, result.pullRequest?.url); // "pr_opened", ".../pull/412"for step in run.steps(): print(step.name, step.model, f"{step.duration_ms} ms") result = run.wait() print(result.status, result.pull_request.url) # "pr_opened", ".../pull/412"Or do it all from the terminal
The CLI does the same in two commands.
npx kestrel init kestrel run "fix the flaky checkout test" ✓ sandbox ready 0.8 s ✓ 48 of 48 checks passed ✓ pull request #412 opened
A run that cannot pass the evals after three tries stops with the status needs_review and no pull request. Its trace shows the failure the agent could not fix. See Eval gate.
Next steps
- Connect your agent to run Claude Code, Codex or your own loop.
- Allow a network host if your build installs packages.
- Read a run's trace to see where the time went.
Was this page helpful?