Documentation / @agentick/kernel / ExecutionEvent
Interface: ExecutionEvent
Defined in: kernel/src/context.ts:61
Event emitted during procedure execution.
Events are emitted to both the global request bus (ctx.events) and the operation handle (ctx.executionHandle) if present.
Example
ctx.events.on('stream:chunk', (event: ExecutionEvent) => {
console.log(`[${event.source}] ${event.type}:`, event.payload);
});
// Listen to all events
ctx.events.on('*', (event: ExecutionEvent) => {
console.log(`Event: ${event.type}`);
});See
Context.emit - Emit events to the current context
Properties
executionId?
optionalexecutionId:string
Defined in: kernel/src/context.ts:75
Execution ID from context (auto-populated if available)
parentExecutionId?
optionalparentExecutionId:string
Defined in: kernel/src/context.ts:77
Parent execution ID for nested executions (fork, spawn, component_tool)
payload
payload:
any
Defined in: kernel/src/context.ts:65
Event payload data
procedureId?
optionalprocedureId:string
Defined in: kernel/src/context.ts:79
Procedure ID from context (auto-populated if available)
requestId?
optionalrequestId:string
Defined in: kernel/src/context.ts:73
Request ID for this execution context
source
source:
string
Defined in: kernel/src/context.ts:69
Source of the event (e.g., 'agent:sales', 'model:openai')
tenantId?
optionaltenantId:string
Defined in: kernel/src/context.ts:88
Tenant ID from context (for multi-tenant dashboards)
tick?
optionaltick:number
Defined in: kernel/src/context.ts:81
Current tick number if in a tick context
timestamp
timestamp:
number
Defined in: kernel/src/context.ts:67
Unix timestamp when the event occurred
traceId
traceId:
string
Defined in: kernel/src/context.ts:71
Trace ID for correlation (distributed tracing)
type
type:
string
Defined in: kernel/src/context.ts:63
Event type (e.g., 'stream:chunk', 'procedure:error')
userId?
optionaluserId:string
Defined in: kernel/src/context.ts:86
User ID from context (for attribution and multi-tenant filtering)