Execute Tool • AI Agent SDK

execute_tool: Execute a tool dynamically based on the function name and arguments.

execute_tool

Method

</div>

This is a method of the Agent class in the agent module.

Execute a tool dynamically based on the function name and arguments. Injects agent state for tools with Injected[T] parameters.

Diagram

uses

returns

Agent

Tool: execute_tool

Result

Signature

python
def execute_tool(function_name: Any, arguments: Any) -> Any

Parameters

ParamField Any

No description available.

ParamField Any

No description available.

Returns

ResponseField Any

The result of the operation.

Uses

  • logging.debug
  • AgentState

Source

View on GitHub

praisonaiagents/agent/agent.py at line 3842


Related Documentation