INNER CODE UNIT · Python

main

victordibia/designing-multiagent-systems · course/samples/hello_world/autogen_core/app.py:97

async def main() -> None:
    # Create runtime
    runtime = SingleThreadedAgentRuntime()

    # Create the calculator tool
    calculator_tool = FunctionTool(
        calculator,
        description="A calculator that can perform basic arithmetic operations"
    )
    tools: List[Tool] = [calculator_tool]

    # Create model client
    model_client = OpenAIChatCompletionClient(model="gpt-4o-2024-11-20")

    # Register the tool agent
    await ToolAgent.register(
        runtime,
        "calculator_tool_agent",

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…