KestrelDocs

Getting started

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,
});

Options

OptionDefaultWhat it does
apiKeyKESTREL_API_KEYThe key every request carries
defaultRepononeUsed when a call leaves out repo
baseUrlhttps://api.kestrel.dev/v1Point at your own Kestrel inside your VPC
timeoutMs60000How long one HTTP request may take, not a whole run
maxRetries4Retries 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?

Open the dashboard