Skip to main content
Requires Node.js 22 or newer.

Select authorized scope

Run firedrill init with the separately installed CLI; it offers sign-in if needed. Then construct your client from the public configuration:
fromConfig(path?, options?) defaults to firedrill.config.json in the current directory. It reads project/environment IDs, not repository credentials, and never opens a browser. In CI, supply FIREDRILL_TOKEN from the secret store. For a file-free client, use new Firedrill({projectId, environmentId}) with the actual authorized IDs, or set FIREDRILL_PROJECT_ID and FIREDRILL_ENVIRONMENT_ID. Firedrill selects its production service automatically. Keep scope consistent across configuration, options, and environment variables; disagreement fails before a request.

Simulate your application

This example assumes your existing application exports an async runAgent(input, {signal}) function from ./src/agent.js. Adjust that import and the callback to your actual entry point; do not substitute generated answers for application execution. Save as simulate.mjs:
These are four real callback invocations: two scenarios × two repetitions. The example requests observation, not grading. Add only the checks or rubric your task requires. The callback receives detached JSON input and a context containing run/attempt IDs, ID-only scenario context, configuration, cancellation signal, deadline, run-scoped Tools, observation and attachment methods. It returns JSON-compatible application output. context.observe records runner-attributed evidence, not independent proof of an external side effect. Native callbacks share your process; they are not a sandbox. Honor cancellation in the application. Start sequentially unless you have reviewed shared state and reset behavior. allowParallel: true on a fresh simulation records explicit shared-state acknowledgement; it does not create isolation.

Use a saved recipe

A callback recipe may omit target. A recipe for an existing command or HTTP endpoint supplies target and needs no callback:
Paths in command targets retain the process working directory’s meaning. They are not rebased to the recipe file. Commands receive the versioned task envelope on stdin; HTTP receives the same envelope as a POST. Read client.schema("target-invocation") for the exact contract.

Inspect and recover

Use returned cursors unchanged with the same selection. Large results may use a compact result and retained read handles; omitted values are not null. Keep the operation ID and private journal after interruption. Do not call simulate again to repair an uncertain acknowledgement.

CI and assessment

Use client.simulate(recipe, target, {submissionOrigin: "ci"}) in CI, or set FIREDRILL_SUBMISSION_ORIGIN=ci. The CI generator runs your script directly. For the saved-recipe version of the script above, replace its simulation and output section with this CI-aware form. Keep the same actual application target:
The generated workflow supplies CI origin and protected credentials. This script reads the selected recipe and propagates its retained gate/execution state instead of treating a printed report as a passed job. The canonical result.gate is not_configured, allow, block, or inconclusive. Read execution, evidence coverage, and assessment separately. Fractional semantic provider scores are distinct from ordinal rubric levels; missing results are not zero and scores are not probabilities. An evaluator problem does not turn a completed target into a failed agent. See errors and recovery before implementing retries.