Skip to main content

agents.examples.agentic_chat

Agentic Chat example.

Demonstrates a basic conversational agent with tools. This is the simplest AG-UI example - an agent that can chat and use tools to get real-time information.

Features:

  • Text streaming
  • Tool calling with results
  • Simple conversation flow

current_time

@agent.tool_plain
async def current_time(timezone: str = "UTC") -> str

Get the current time in ISO format.

Arguments:

  • timezone - The timezone to use (e.g., 'UTC', 'America/New_York', 'Europe/London').

Returns:

The current time in ISO format string.