Quick Start
Let's bind <chat> from @threadplane/chat to an AG-UI backend in 5 minutes.
Angular 20+ project with Node.js 22+. If you need setup help, see the Installation guide.
Want to see the finished result before you build? Open the live AG-UI demo.
Add provideAgent() to your application config with your AG-UI backend URL.
No backend yet? Swap to provideFakeAgent({}) - it serves canned streaming responses so you can build UI offline.
That's it. The <chat> composition handles streaming messages, tool calls, errors, and submit - all bound to the AG-UI backend through the Agent contract.
#What to read next
- Architecture explains how
toAgent(),provideAgent(), andinjectAgent()fit together. - Event Mapping is the backend compatibility checklist for emitted AG-UI events.
- Fake Agent covers offline demos and frontend tests.
- Troubleshooting is the fastest place to start when a stream does not render.
- The
@threadplane/chatComponents reference covers the primitives the<chat>composition uses internally - handy if you want to compose your own layout. - Looking for LangGraph instead of AG-UI? See
@threadplane/langgraph.
#Switching backends without changing UI
For me, the runtime-neutral Agent contract is the whole payoff: your component never learns which protocol it's talking to. The cost is a thin translation layer per adapter, but you pay it once and your UI code stops caring.
So swapping backends is a one-line change in app.config.ts, and the component code stays the same:
These are two different provideAgent functions from two different packages — the import source changes along with the config key (apiUrl for LangGraph, url for AG-UI). It's not one symbol that accepts both.