For agents
@agentskit/runtime — for agents
Standalone agent runtime (ReAct loop) + speculate + topologies + durable execution + background agents.
Purpose
Run an agent without a UI. Supports reflection, planning, multi-agent orchestration, durable step logs, cron + webhooks, speculative execution.
Install
npm install @agentskit/runtimePrimary exports
createRuntime({ adapter, tools, memory, skills, observers, ... })— one-line agent;runtime.run(task)returns{ content, steps, ... }.createSharedContext— typed shared context across tools.speculate({ candidates, pick, timeoutMs })— race adapters, abort losers. See Speculative execution.supervisor,swarm,hierarchical,blackboard— multi-agent topologies. See Topologies.createDurableRunner+createInMemoryStepLog/createFileStepLog— Temporal-style step-log durability. See Durable execution.createCronScheduler(5-field cron +every:<ms>) +createWebhookHandler— background agents. See Background agents.
Minimal example
import { createRuntime } from '@agentskit/runtime'
import { anthropic } from '@agentskit/adapters'
const runtime = createRuntime({
adapter: anthropic({ apiKey: process.env.ANTHROPIC_API_KEY!, model: 'claude-sonnet-4-6' }),
})
const result = await runtime.run('Summarize the quarterly report.')
console.log(result.content)Common patterns
- Survive crashes: wrap side effects in
runner.step(id, fn)(durable). - A/B across models:
speculateorreplayAgainst. - Compose agents: supervisor / swarm / hierarchical / blackboard.
- React to events:
createWebhookHandler+createCronScheduler.