Getting started
SDK client
The Kestrel client holds your key, your defaults and its retry rules. Make one per process and share it.
Create a client
import { Kestrel } from "@kestrel/sdk";
const kestrel = new Kestrel({
defaultRepo: "acme/web-app",
timeoutMs: 60_000,
maxRetries: 4,
});from kestrel import Kestrel
kestrel = Kestrel(
default_repo="acme/web-app",
timeout_ms=60_000,
max_retries=4,
)Options
| Option | Default | What it does |
|---|---|---|
apiKey | KESTREL_API_KEY | The key every request carries |
defaultRepo | none | Used when a call leaves out repo |
baseUrl | https://api.kestrel.dev/v1 | Point at your own Kestrel inside your VPC |
timeoutMs | 60000 | How long one HTTP request may take, not a whole run |
maxRetries | 4 | Retries on network errors and 5xx, with backoff. See Retries |
What the client gives you
kestrel.runs: start, list, watch and cancel runs.kestrel.sandboxes: make sandboxes yourself, outside a run.kestrel.memory: read and edit what agents have learned about a repo.
Every method returns plain objects you can log or store. Long waits, like run.wait(), poll for you and stop when the run ends.
Note
The client is safe to share across requests in a server. Making one per request works, but it throws away the connection pool.
Was this page helpful?