The runtime-js package is the reference runtime implementation for executing A22 agents locally using Node.js.
- File Loading: Loads and parses
.a22files. - Agent Resolution: Resolves agent definitions and capabilities.
- Event Bus: Handles event emission and routing to agent
on eventhandlers. - Workflow Engine: Executes imperative workflows (steps) triggered by agents.
npm install
npm run buildRun the runtime CLI to load an A22 file and trigger an event:
# General Syntax
node dist/index.js <file.a22> <event_name> [json_payload]
# Example
node dist/index.js test_runtime.a22 pingsrc/runtime.ts: MainRuntimeclass managing state and event dispatch.src/workflow.ts:WorkflowEnginefor executing steps sequentially.