GitHub – contextablemark/clawg-ui: AG-UI Channel for OpenClaw

AG-UI Channel for OpenClaw. Contribute to contextablemark/clawg-ui development by creating an account on GitHub.

**Connecting AG-UI Clients to OpenClaw, the Simple Way**

If you’ve ever tried wiring different AI tools together, you know the feeling. Everything *almost* talks to each other, but not quite. You tweak headers, adjust tokens, restart services… and hope it works this time.

That’s exactly where the clawg-ui plugin comes in.

The project, available here: https://github.com/contextablemark/clawg-ui, adds an AG-UI protocol-compatible HTTP endpoint to OpenClaw. In plain English, it lets AG-UI clients, like CopilotKit UIs or @ag-ui/client HttpAgent instances, connect directly to your OpenClaw gateway and receive streamed responses.

And yes, streaming matters. Instead of waiting for a full response, you see events coming in live via SSE. It feels responsive, more like a conversation than a transaction.

Once installed, the plugin auto-registers a new route at /v1/clawg-ui. Clients send a POST request using the AG-UI RunAgentInput schema, with roles like user, assistant, system, or tool. From there, OpenClaw handles routing through its standard agent system. Want a specific agent? Just pass the X-OpenClaw-Agent-Id header. Simple.

What I personally appreciate is the shift to device pairing authentication. Earlier versions allowed using the gateway’s master token directly. Convenient? Maybe. Safe? Not really. Now, clients pair per device. You request access, receive a pairing code, the gateway owner approves it, and you use your own Bearer token going forward. Clean. Secure. No exposed master keys floating around.

Errors are handled clearly too. Non-streaming issues return JSON, streaming problems emit a RUN_ERROR event and close the connection. Predictable behavior, which is honestly underrated when you’re building systems on top of this.

If you’re experimenting with OpenClaw and AG-UI, this plugin feels less like an add-on and more like a missing bridge. And as these ecosystems continue to mature, tools like clawg-ui quietly make the whole experience more connected, and a lot more practical.

Kommentar abschicken