AbsoluteJS

@absolutejs/agent-runtime

@absolutejs/agent-runtimev0.2.6betaAI

Durable provider-neutral AI agent runs, steps, checkpoints, budgets, leases, timers, effects, and handoffs.

#Installation

BASH
bun add @absolutejs/agent-runtime

#Capabilities

Overview

Durable, provider-neutral orchestration for AI agents. This package owns runs, steps, leases, budgets, checkpoints, timers, cancellation, effects, and handoffs. It does not choose a model, database driver, queue, or web framework.

Every run pins the exact signed discovery descriptor id, version, and digest that was selected. A remote agent therefore cannot silently replace its advertised capabilities during a workflow or handoff.

Workers claim due runs with FOR UPDATE SKIP LOCKED. Every append checks the lease, optimistic version, sequence, idempotency key, and budget inside one transaction. Effects are recorded as requested before execution and require a stable idempotency key; use @absolutejs/execution as the executor for crash-safe external effects and reconciliation.

Show 2 more

PostgreSQL is the durable default. Apply agentRuntimePostgresSchemaSql() through your migrations. Redis is not a run store or work queue.

Memory stores are development and test defaults only.

Outcomes

What you can build

Build on the supported package contract

Use @absolutejs/agent-runtime through its supported public entry points.

Hardening checklist

Production guidance

Make every external boundary explicitPin the deployed @absolutejs/agent-runtime version, replace example or memory-backed dependencies with durable implementations, bound external calls, protect credentials, and emit enough evidence to retry or recover safely.

Follow in order

Troubleshooting path

1
Trace from the first failed boundary
Reproduce the smallest canonical @absolutejs/agent-runtime example, confirm the supported entry point and version in the API explorer, then inspect the first boundary that did not produce its documented result.

#@absolutejs/agent-runtime quick start

Partial snippet

# @absolutejs/agent-runtime

TS
const runtime = createAgentRuntime({
  store: createPostgresAgentRuntimeStore({ client: sql }),
  driver: myModelAdapter,
  effects: executionAdapter,
});

await runtime.start({
  actor: { tenantId, userId, agentId, delegationId },
  agent: selectedDiscoveryIdentity,
  goal: "Rebook the delayed flight",
  input,
  budget: { actions: 8, costMicros: 50_000, spendMinor: 30_000 },
});

#Public entry points

Supported entry points declared by this package manifest.

Package entry point declared in package.json.

@absolutejs/agent-runtime@absolutejs/agent-runtime/manifest@absolutejs/agent-runtime/manifest.json

#Package commands

Scripts declared by this package manifest.

bun run buildrm -rf dist && bun build src/index.ts src/manifest.ts --outdir dist --target=bun --external @absolutejs/manifest --external @sinclair/typebox --external drizzle-orm --external 'drizzle-orm/*' && tsc -p tsconfig.build.json && absolute-manifest emit
bun run check:packagebun run typecheck && bun run test && bun run build
bun run formatprettier --write "./**/*.{ts,json,md,yml}"
bun run testbun test
bun run typechecktsc --noEmit

#API reference

Search the declarations exported by the current package type files. Expand a symbol to inspect its source-backed signature.

32 symbols
AgentRunStatustypePermalinkSource
TS
type AgentRunStatus = "queued" | "running" | "waiting" | "suspended" | "handed_off" | "completed" | "failed" | "cancelled";
Exported from @absolutejs/agent-runtime