Documentation / @agentick/core / ExecutionRunner
Interface: ExecutionRunner ​
Defined in: core/src/app/types.ts:144
Properties ​
name ​
name:
string
Defined in: core/src/app/types.ts:146
Runner identifier (e.g., "default", "repl")
Methods ​
executeToolCall()? ​
optionalexecuteToolCall(call,tool,next):Promise<ToolResult>
Defined in: core/src/app/types.ts:182
Wrap individual tool call execution.
Called for each tool call. The next function executes the tool normally (via ToolExecutor). Runners can intercept, transform, or replace execution.
Use cases:
- REPL: Route
executetool to sandbox, run code with tools as callable functions - Logging: Add runner-specific telemetry around tool execution
- Sandboxing: Run tools in isolated contexts
Parameters ​
call ​
The tool call from the model
tool ​
The resolved executable tool (undefined if not found)
ExecutableTool<(input, ctx?) => ContentBlock[] | Promise<ContentBlock[]>> | undefined
next ​
() => Promise<ToolResult>
Execute the tool normally (delegates to ToolExecutor)
Returns ​
Promise<ToolResult>
Tool result
onDestroy()? ​
optionalonDestroy(session):void|Promise<void>
Defined in: core/src/app/types.ts:213
Called when a session is closed/destroyed. Clean up runner resources (sandbox, temp files, etc.).
Parameters ​
session ​
Returns ​
void | Promise<void>
onPersist()? ​
optionalonPersist(session,snapshot):SessionSnapshot|Promise<SessionSnapshot>
Defined in: core/src/app/types.ts:198
Called when a session snapshot is being created. Runner can add its own state to the snapshot.
Parameters ​
session ​
snapshot ​
Returns ​
SessionSnapshot | Promise<SessionSnapshot>
onRestore()? ​
optionalonRestore(session,snapshot):void|Promise<void>
Defined in: core/src/app/types.ts:207
Called when a session is being restored from a snapshot. Runner can restore its own state from the snapshot.
Parameters ​
session ​
snapshot ​
Returns ​
void | Promise<void>
onSessionInit()? ​
optionalonSessionInit(session):void|Promise<void>
Defined in: core/src/app/types.ts:192
Called once when the runner is first used by a session. Set up per-session runner state (sandbox, working directory, etc.).
Parameters ​
session ​
Returns ​
void | Promise<void>
transformCompiled()? ​
optionaltransformCompiled(compiled,tools):COMInput|Promise<COMInput>
Defined in: core/src/app/types.ts:164
Transform the compiled structure before it reaches the model.
Called per tick, after compilation but before the adapter's fromEngineState flattens COMInput into model-specific format. This lets runners operate on the rich semantic structure (system, timeline, sections, tools, ephemeral).
Use cases:
- REPL: Replace tool schemas with command descriptions in a section, expose a single
executetool - Filtering: Remove tools the model shouldn't see in this runner
Parameters ​
compiled ​
The COMInput from compilation (timeline, system, sections, tools, etc.)
tools ​
ExecutableTool<(input, ctx?) => ContentBlock[] | Promise<ContentBlock[]>>[]
The resolved executable tools
Returns ​
Transformed COMInput (or original if no transformation needed)