Key Features of the React + Axum Agent Architecture
mainThe React + Axum Agent example implements several advanced AI patterns:
- Tool Calling with
#[tool]: Uses theaisdk.rsmacro to define callable functions with structured inputs and outputs. - Streaming + Tool Progress: Streams model responses while simultaneously tracking and emitting tool execution events in real time.
- Axum SSE Integration: Utilizes
AxumSseResponseto manage state and stream responses via Server-Sent Events (SSE). - Vercel AI SDK Integration: Uses the
useChathook from the Vercel AI SDK on the frontend to handle text and tool-call streaming seamlessly.