Durable execution
Persist every step. Resume after crash. Replay deterministically.
import {
createRuntime,
createDurableRunner,
createFileStepLog,
} from '@agentskit/runtime'
const runtime = createRuntime({ adapter, tools })
const durable = createDurableRunner({
runtime,
store: createFileStepLog({ path: '.agentskit/steps.jsonl' }),
})
await durable.run({ runId: 'r-42', input: 'refactor auth middleware' })
// Crash β restart β resume from last completed step
await durable.resume('r-42')#Step log contract
type StepRecord = {
runId: string
seq: number
kind: 'llm' | 'tool' | 'event'
at: number
input: unknown
output?: unknown
error?: string
}#Stores
createInMemoryStepLog()β tests.createFileStepLog({ path })β JSONL on disk.- BYO: implement
StepLogStore(Redis, Postgres, S3, etc.).
#Related
Explore nearby
- PeerAgents
Everything that runs the loop β runtime, tools, skills, delegation, durable execution, topologies, background agents, HITL, self-debug.
- PeerRuntime
Execution engine for autonomous agents β runs a ReAct loop (observe, think, act) until final answer or step limit.
- PeerMulti-Agent Delegation
Coordinate multiple specialist agents from a parent agent using directed delegation.