Prerequisites
- The
assistantagent from Create agent. - An API route directory. For a minimal setup, run
mkdir -p app/api/ag-ui. - Access to model inference. Use a direct provider API key, a configured local model, or Veryfront Cloud. See Providers.
Create the route
Createapp/api/ag-ui/route.ts:
assistant agent at POST /api/ag-ui and streams AG-UI
events to the chat UI.
Run it
Start the dev server:Verify it worked
Send a chat message from another terminal:-N flag tells curl to flush each chunk as it arrives.
The curl response should emit data: lines as the answer streams.
If the dev server logs a missing-provider error, configure one inference option
from Providers, then restart veryfront dev.
For non-agent endpoints, see API routes.