Urgent.News

What's breaking now, across thousands of outlets.

AI

One Event Stream, Two UI Protocols: Wiring Solon AI to Any Frontend

Your Java agent streams tokens. Your frontend speaks a protocol. Between them sits a translation layer that nobody wants to write — and that everybody writes badly. It is the same story every time: text deltas, reasoning deltas, tool-call arguments, tool results, citations, errors, aborts. Six or seven channels, all multiplexed onto one SSE connection, all needing stable IDs so the UI can stitch…

Solon AI provides a module called solon-ai-ui that allows streaming its internal Flux ChatEvent into a frontend-facing event stream. This translation layer is necessary because the two systems use different event protocols. Two adapters, Vercel AI SDK and AG-UI, are included in the solon-ai-ui module to facilitate this conversion.

The Vercel AI SDK adapter converts the chatModel.prompt(prompt).stream() call into a Flux SseEvent compatible with the Vercel AI SDK. It follows a parts model with roughly twenty part types, each represented as a small JSON frame. The adapter emits these frames in a fixed order, including start, message-metadata, step, reasoning, tool-input, source-url, text, file, and finish frames.

The AG-UI adapter, on the other hand, targets a different event vocabulary. It uses RUN_STARTED, TEXT_MESSAGE_CONTENT, TOOL_CALL_ARGS, REASONING_MESSAGE_CONTENT, and STEP_FINISHED events, among others. The adapter ensures stable IDs across deltas by keying the ID map on responseId + step + itemId. It also handles interruption, closing any open content block and emitting a RUN_FINISHED event with an interrupt outcome when the core emits ABORT.

Both adapters are thin wrappers that depend only on solon-ai-core, ensuring they don't drag the entire agent stack into every app using them. This modular design makes it easier to integrate Solon AI with various frontends without the need for complex translation layers.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in AI

The AI buildout has a power problem

The first piece in this series argued the AI buildout is a financing story: $700-730 billion in 2026 hyperscaler capex, up 70-80% from last year, and money is not the constraint.

  • AI buildout requires significant power expansion.
  • US data centers could consume 649 TWh by 2030.
  • Major tech firms contract for new nuclear power.

More from Tuesday 6 October →