Skip to content

Constants

Constants for ToolNode package.

This module defines constants used throughout the ToolNode implementation, particularly parameter names that are automatically injected by the PyAgenity framework during tool execution. These parameters are excluded from tool schema generation since they are provided by the execution context.

The constants are separated into their own module to avoid circular imports and maintain a clean public API.

Parameter names that are automatically injected during tool execution.

These parameters are provided by the PyAgenity framework and should be excluded from tool schema generation. They represent execution context and framework services that are available to tool functions but not provided by the user.

Parameters:

Name Type Description Default

tool_call_id

Unique identifier for the current tool execution.

required

state

Current AgentState instance for context-aware execution.

required

config

Configuration dictionary with execution settings.

required

generated_id

Framework-generated identifier for various purposes.

required

context_manager

BaseContextManager instance for cross-node operations.

required

publisher

BasePublisher instance for event publishing.

required

checkpointer

BaseCheckpointer instance for state persistence.

required

store

BaseStore instance for data storage operations.

required
Note

Tool functions can declare these parameters in their signatures to receive the corresponding services, but they should not be included in the tool schema since they're not user-provided arguments.

Attributes:

Name Type Description
INJECTABLE_PARAMS

Attributes

INJECTABLE_PARAMS module-attribute

INJECTABLE_PARAMS = {'tool_call_id', 'state', 'config', 'generated_id', 'context_manager', 'publisher', 'checkpointer', 'store'}