The runtime
Everything the demo skipped
- 7
- parts, one dependency
The loop is the easy part. Here is exactly what Pilot gives you, what it expects from your code, and what it deliberately leaves alone.
The runtime
What Pilot actually gives you
The durable loop
Plan, call, observe, repeat — with a checkpoint written after every step. Long runs survive deploys, restarts, and the tool that goes down for twenty minutes.
- Checkpoint after every step
- Retries with backoff and jitter
- Resume days later from the same state
- Cancel and rewind to any step
run.resume('8f21c') # picks up at step 3, not step 0
Typed tools
Write an ordinary function. Pilot reads its signature, derives the JSON schema, and validates every call before your code runs — so a hallucinated argument is a caught error, not a production incident.
- Schema derived from the signature
- Arguments validated before execution
- Enums and value objects supported
- Tools versioned alongside your code
#[Tool] function refund(string $chargeId, int $amountCents, Reason $reason): Refund
State that outlives the process
Working memory, scratchpads, and intermediate results live in your database, not in a variable. Nothing is lost to a restart, and two workers never disagree about where a run got to.
- Postgres, SQLite, or your own driver
- Optimistic locking across workers
- Scratchpads scoped per run
- Automatic pruning on completion
Human review, anywhere
Some decisions should not be automatic. Drop an approval gate into the loop and the run parks itself, routes to the right person, and continues the moment they sign off.
- Gates anywhere in the loop
- Routing to Slack, email, or your own UI
- Runs can wait for days
- Every approval recorded in the trace
await approval('refunds')->from($team)->because('over $500')
Traces you can replay
Every prompt, argument, result, token, and cent is recorded per step. Replay a run against a different model or a changed prompt and diff the two side by side before you ship the change.
- Full step-level recording
- Replay against a new model or prompt
- Diff two runs step by step
- OpenTelemetry export
Evals in your pipeline
Promote any recorded run to a test case. Your suite runs on every pull request and tells you which step regressed, not just that the score moved.
- Recorded runs become fixtures
- Assertions per step, not per run
- Runs in GitHub Actions
- Regression attributed to a step
Metered spend
Cost is attributed to the step that caused it, so you find the expensive loop instead of guessing. Set a ceiling and a run halts rather than quietly billing you for an afternoon.
- Per-run and per-step attribution
- Hard budget ceilings that halt
- Cached results reused on retry
- Per-step model routing
Runs where you already run
A library, not a platform
Pilot is a dependency inside your app, not a service you operate. It speaks to the models, stores, and queues you already have.
- OpenAI Models
- Anthropic Models
- Postgres State
- Redis Queues
- Temporal Workflows
- OpenTelemetry Tracing
- GitHub Actions CI
- Slack Approvals
Wire one tool and watch the trace
The runtime is open source. Install it, give an agent a single function to call, and read what comes back before you commit to anything.
Apache 2.0 · No account needed to start