Tool Invocation
1️⃣ Import Dependencies
import asyncio
import json
import logging
from agentopera.engine import EVENT_LOGGER_NAME, AgentId, CancellationToken, FunctionCall, LocalAgentEngine
from agentopera.engine.types.models import FunctionExecutionResult
from agentopera.engine.agent.tool_agent import ToolAgent
from agentopera.engine.function_call import FunctionTool
logging.getLogger(EVENT_LOGGER_NAME).setLevel(logging.INFO)2️⃣ Define the Tool Function
3️⃣ Register ToolAgent and Test
ToolAgent and Test4️⃣ Run the Test
Last updated