<< All versions

Skill v1.0.1

currentAutomated scan100/100
egonschiele/agency-lang/agency-runtime-docs

+5 new

──Details
PublishedOctober 25, 2026 at 10:40 PM
Content Hashsha256:c40a8abb2014bb24...
Git SHA4882a7fcc555
Bump Typepatch
Compare with v1.0.0
──Files
Files (1 file, 4.9 KB)
SKILL.md4.9 KBactive
SKILL.md · 35 lines · 4.9 KB

version: "1.0.1" name: agency-runtime-docs description: Developer docs for the Agency runtime: the execution engine, interrupts and how a program resumes mid-block, concurrent interrupts, checkpointing, rewind, traces, threads, async calls, global state, guards and saveDraft, locks, subprocess IPC, and AgencyConfig. Use when changing how compiled Agency programs execute.


Runtime developer docs

Paths are relative to packages/agency-lang/. Read the one that matches the task; each doc records the key decisions, the architecture, the relevant files, and the subtleties that are easy to miss.

  • docs/dev/runtime/simplemachine.md — The graph execution engine that runs compiled Agency programs.
  • docs/dev/runtime/interrupts.md — How a program resumes in the middle of a block after an interrupt, using step counters.
  • docs/dev/runtime/concurrent-interrupts.md — What happens when several concurrent execution paths interrupt at the same time.
  • docs/dev/runtime/runBatch.md — The one primitive that owns concurrent-interrupt orchestration for forks, parallel blocks, tool calls, and subprocesses.
  • docs/dev/runtime/checkpoint-code-fingerprints.md — Refusing to resume a checkpoint when the code of a module it is paused inside has changed.
  • docs/dev/runtime/checkpoint-integrity.md — The optional HMAC checksum embedded in a checkpoint, and how a host verifies it.
  • docs/dev/runtime/checkpointing.md — Snapshotting execution state so a program can restore back to it later.
  • docs/dev/runtime/checkpoint-patch.md — Editing a paused program before it resumes: the named edits and their addresses, the field-kind table, the validator that checks the result against the source, re-signing, how the old resume overrides became edits and which frame they land on, the two thread copies and the guard clones, and why the loop now records its tool names.
  • docs/dev/runtime/rewind.md — Replaying execution from a checkpoint, optionally with different values for its local variables.
  • docs/dev/runtime/pause.md — Pausing a node run from outside with pauseSignal: the runner check, the thrown signal, which steps defer a pause, cancel precedence, and resumeFromCheckpoint.
  • docs/dev/runtime/resume-command.md — The agency resume child carrier, shared restore setup, overrides, integrity check, and lifecycle.
  • docs/dev/runtime/trace.md — Execution traces: a checkpoint per step, written to a file the debugger can replay.
  • docs/dev/runtime/threads.md — How LLM conversation history accumulates and flows through thread and subthread blocks.
  • docs/dev/runtime/globalstore.md — Module-namespaced storage for top-level variables at runtime.
  • docs/dev/runtime/async.md — How async function calls work, and the problems the design solves.
  • docs/dev/runtime/async-behavior-checklist.md — The case-by-case behavioral checklist the async implementation was built against.
  • docs/dev/runtime/async-context.md — The Run value that carries runtime state as an ordinary argument: what it holds, where runs come from, callPlain and currentRun() for functions that take no run, the lenient read, the lint check, the wrong-run check, logging, and stored callbacks.
  • docs/dev/runtime/host.md — The host: what a run takes from its platform (the terminal, environment variables, the clock, random values, the working directory), the seven capabilities and the NEEDS table, makeHost and why no host writes a refusal, nodeHost, browserHost, and the default host behind #default-host, ctx.host and a host per run through InvocationOptions, currentHost() for a helper with no run, the lint rule and its Node-only list, the browser entry point and #platform, the bundle check and the headless smoke test with its real model call, the three things an app writes to run a program in a page and the esbuild flags it needs, and how to add a function to the host.
  • docs/dev/runtime/running-without-node.md — The goals for running Agency outside Node, the rule about branching between targets, and the decision to pass the run explicitly in place of AsyncLocalStorage, with what it cost, how a model call from a browser gets its API keys through the host, and what is still open.
  • docs/dev/runtime/callback-hooks.md — Registering callbacks for runtime events such as node, function, and tool lifecycle, and the per-statement onCheckpoint hook a host uses to resume a crashed run.
  • docs/dev/runtime/saveDraft.md — How a scope's best-so-far value survives a guard trip instead of being lost.
  • docs/dev/runtime/lock.md — A per-run mutex for serializing access to shared resources such as the terminal prompt.
  • docs/dev/runtime/subprocess-ipc.md — How an agent compiles and runs Agency code in a subprocess, and how the parent's handler chain extends across that boundary.
  • docs/dev/runtime/config.md — Every AgencyConfig option, with types and defaults, and how config is resolved.
← v1.0.0All versions