Documentation / @agentick/core / useOnExecutionStart
Function: useOnExecutionStart()
useOnExecutionStart(
handler):void
Defined in: core/src/hooks/execution-context.ts:26
Register a callback that fires once at the start of each execution.
Derived from useOnTickStart — fires on the first tick of each new execution by tracking executionId changes across ticks. Does NOT fire on mount (same as useOnTickStart behavior).
Parameters
handler
(executionId, ctx) => void | Promise<void>
Returns
void
Example
tsx
useOnExecutionStart((executionId, ctx) => {
console.log(`Execution ${executionId} started`);
ctx.setState("lastExecutionId", executionId);
});