web-chat

command
v1.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 7, 2026 License: Apache-2.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

web-chat exposes an Agent over AG-UI Server-Sent Events with a single bridge call. Drivers without token deltas still surface their final Result.Text as one assistant message before the AG-UI terminal event.

The bridge takes an adaptor.Runner, the interface both *Agent and *Thread satisfy. Hand it the Agent and it binds each request to agent.Thread(<key derived from the inbound threadId>); hand it a Thread and the conversation is pinned by the host instead.

Usage:

go run ./examples/web-chat
# In another terminal:
curl -N -X POST http://localhost:8080/v1/chat \
    -H 'Content-Type: application/json' \
    -d '{"threadId":"demo","messages":[{"id":"1","role":"user","content":"write a haiku"}]}'

Or open http://localhost:8080/ in a browser for a tiny JS chat page.

The server requires the selected local CLI in PATH and existing authentication.

Directories

Path Synopsis
web-chat/aguiclient is the minimal-middleware AG-UI demo:
web-chat/aguiclient is the minimal-middleware AG-UI demo:
web-chat/copilotkit combines the SDK's unified Event stream with CopilotKit's React UI through the AG-UI protocol.
web-chat/copilotkit combines the SDK's unified Event stream with CopilotKit's React UI through the AG-UI protocol.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL