Skip to content

Chat UI

Cognipeer Chat UI ​

Ship polished chat surfaces for AI agents. A production-ready React chat UI with streaming, tool-call rendering, approvals and questions, runs that outlive the page, usage limits, uploads, history, an opt-in workplace experience and an embeddable mode — without stitching one together from low-level primitives.

  • Package @cognipeer/chat-ui
  • Version 0.4.0
  • Framework React 18+
  • Surfaces Full workspace chat · ChatMinimal · EmbedChat · composable hooks
  • Backends @cognipeer/agent-server · agent-sdk · Chat Completions · Responses · A2A

Use the full Chat surface for a sidebar-based, multi-session workspace, drop in ChatMinimal for a single-thread widget, run EmbedChat inside an iframe on someone else's page, or compose lower-level hooks when your product needs more control than any surface gives out of the box.

bash
npm install @cognipeer/chat-ui
bash
yarn add @cognipeer/chat-ui
bash
pnpm add @cognipeer/chat-ui
tsx
import { Chat } from "@cognipeer/chat-ui";
import "@cognipeer/chat-ui/styles.css";

function App() {
  return (
    <div className="h-screen">
      <Chat
        baseUrl="http://localhost:3000/api/agents"
        agentId="my-agent"
        theme="dark"
      />
    </div>
  );
}

An approval card under an assistant message: Allow echo_note? with Deny and Approve, and the composer waiting for the answer


What it handles for you ​

Streaming that feels product-ready

Render partial assistant output, tool-call steps, and follow-up UI without assembling a chat surface from scratch.

Agents that pause

Approval and question cards with deadlines, remembered choices and argument editing checked against the tool's JSON Schema.

Runs that outlive the page

Reload mid-turn and the chat picks the turn up again; Stop really stops the run; a notice says why an answer ended.

Usage you can see and limit

A meter and a "limit reached" notice for conversations with a spend limit, with raise-and-continue where you allow it.

Uploads done properly

Pick, drag and drop or paste; thumbnails, progress, retry and per-conversation limits read from the agent; unsafe URLs never drawn.

History, sessions, and workspace chat

From a minimal single-thread chat to a sidebar with status badges, keyboard navigation, rename, pin and bulk delete.

A workplace assistant, opt-in

Feedback with reasons, regenerate and edit, starters and a welcome, an AI label with legal links, announcements, a terms gate, export and background alerts.

Embeddable and multilingual

An iframe mode with strict origin checks and host-page tools; English and Turkish built in, any language with your strings; accessible by design.

Where to go next ​

Studio · Pulse · Console · Agent SDK and more — the Cognipeer documentation hub