Skip to content

agent-core / Exports / IToolExecutionContext

Interface: IToolExecutionContext

Tool execution context - type-safe context for tool execution Enhanced with hierarchical execution tracking support

Table of contents

Properties

Properties

toolName

toolName: string

Defined in

packages/agent-core/src/interfaces/tool.ts:71


parameters

parameters: TToolParameters

Defined in

packages/agent-core/src/interfaces/tool.ts:72


executionId

Optional executionId: string

Defined in

packages/agent-core/src/interfaces/tool.ts:73


userId

Optional userId: string

Defined in

packages/agent-core/src/interfaces/tool.ts:74


sessionId

Optional sessionId: string

Defined in

packages/agent-core/src/interfaces/tool.ts:75


metadata

Optional metadata: TToolMetadata

Defined in

packages/agent-core/src/interfaces/tool.ts:76


parentExecutionId

Optional parentExecutionId: string

Parent execution ID for hierarchical tool execution tracking

Defined in

packages/agent-core/src/interfaces/tool.ts:81


rootExecutionId

Optional rootExecutionId: string

Root execution ID (Team/Agent level) for complete execution tree tracking

Defined in

packages/agent-core/src/interfaces/tool.ts:84


executionLevel

Optional executionLevel: number

Execution depth level (0: Team, 1: Agent, 2: Tool, etc.)

Defined in

packages/agent-core/src/interfaces/tool.ts:87


executionPath

Optional executionPath: string[]

Execution path array showing the complete execution hierarchy

Defined in

packages/agent-core/src/interfaces/tool.ts:90


realTimeData

Optional realTimeData: Object

Real-time execution data for accurate tracking (no simulation)

Type declaration

NameTypeDescription
startTimeDateActual execution start time
actualParametersTToolParametersActual input parameters passed to the tool
estimatedDuration?numberTool-provided estimated duration (optional)

Defined in

packages/agent-core/src/interfaces/tool.ts:93


extensions

Optional extensions: Record<string, TToolContextExtensionValue>

Additional tool execution context extensions.

IMPORTANT:

  • Avoid ad-hoc top-level fields to keep the contract stable.
  • Use this map for forward-compatible extra data with constrained value types.

Defined in

packages/agent-core/src/interfaces/tool.ts:109


ownerType

Optional ownerType: string

Owner context propagated from EventService

Defined in

packages/agent-core/src/interfaces/tool.ts:112


ownerId

Optional ownerId: string

Defined in

packages/agent-core/src/interfaces/tool.ts:113


ownerPath

Optional ownerPath: IOwnerPathSegment[]

Defined in

packages/agent-core/src/interfaces/tool.ts:114


sourceId

Optional sourceId: string

Defined in

packages/agent-core/src/interfaces/tool.ts:115


eventService

Optional eventService: IEventService

Tool-call scoped EventService instance. Caller (ExecutionService/ToolExecutionService) is responsible for providing an ownerPath-bound EventService for this tool call.

Defined in

packages/agent-core/src/interfaces/tool.ts:122


baseEventService

Optional baseEventService: IEventService

Unbound base EventService instance.

Required when a tool needs to create another owner-bound EventService for a different owner (e.g., creating an agent from a tool call).

NOTE: Do not wrap an already owner-bound EventService to bind a different owner. Owner-bound instances must not be layered across different owners.

Defined in

packages/agent-core/src/interfaces/tool.ts:133

Released under the MIT License.