Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.strait.dev/llms.txt

Use this file to discover all available pages before exploring further.

Strait provides purpose-built primitives for orchestrating AI agents as background jobs. Track costs, manage tool calls, checkpoint agent state, and build multi-step agent pipelines with the same reliability guarantees as any other Strait workflow.

Key Capabilities

Cost Budgets

Set per-run spending limits. Strait tracks token usage and halts execution when budgets are exceeded.

Tool Call Tracking

Log every tool call an agent makes with input/output capture and latency metrics.

Checkpoints

Save agent state at any point. Resume from the last checkpoint on failure instead of restarting.

Child Job Spawning

Agents can spawn sub-jobs dynamically, enabling recursive and parallel agent patterns.

How It Works

  1. Define an agent job with a cost budget and tool definitions
  2. The agent runs as a standard Strait job with retries and timeout protection
  3. Tool calls are logged via the SDK’s toolCall endpoint
  4. Token usage is tracked via the usage endpoint
  5. If the cost budget is exceeded, the run is automatically failed with a clear error

SDK Support

All five SDKs (TypeScript, Python, Go, Ruby, Rust) support agent-specific endpoints:
  • sdk/v1/runs/{runID}/tool-call — Log a tool call
  • sdk/v1/runs/{runID}/usage — Report token/cost usage
  • sdk/v1/runs/{runID}/checkpoint — Save agent state
  • sdk/v1/runs/{runID}/spawn — Spawn a child job
  • sdk/v1/runs/{runID}/continue — Continue from checkpoint