Skip to main content

Module processor

Module processor 

Source
Expand description

Agent Processor - Routes frontend messages to agent for processing.

This module provides the AgentProcessor which consumes messages from the frontend (via WebSocket/POST) and processes them through the LLM, emitting AG-UI events for the response.

§Architecture

Frontend → WebSocket/POST → message channel → AgentProcessor
                                                    ↓
                                             LLM (multi_turn with tools)
                                                    ↓
                                             EventBridge → SSE/WS → Frontend

Structs§

AgUiHook
AG-UI Hook for streaming tool call events and state updates to frontends.
AgentProcessor
Processes frontend messages through the LLM agent.
AgentStep
A step in the agent’s execution for generative UI.
AgentUiState
Agent state for generative UI rendering.
ProcessorConfig
Configuration for the agent processor.
ThreadSession
Per-thread session state for conversation isolation.
ToolResult
Result of a tool call for rich UI rendering.

Enums§

ProcessorError
Errors that can occur during message processing.
StepStatus
Step status for generative UI progress display.