InkeepEmbeddedChat from @inkeep/agents-ui. Your events, conversation history, and LLM keys never leave your infrastructure.
Who this is for: Teams using or evaluating Inkeep who want chat to react to what users actually do β not just answer generic questions. Assumes comfort with Python, TypeScript/React, and a small FastAPI service.
Stack: Inkeep agents framework (Docker), @inkeep/agents-ui, Next.js 14, Python 3.10+, FastAPI, uv, and Anthropic or OpenAI. https://developers.autoplay.ai/recipes/inkeep
β¨ Final result
- Without real-time context
- With real-time context
π Prerequisites
Before you start, you need:- Node.js 18+ and Python 3.10+ on the host.
uvβ the Python package manager used in this tutorial.pnpmβ the Inkeep agents monorepo uses pnpm workspaces.- Docker Desktop β for running Inkeepβs backing services (PostgreSQL, Doltgres, SpiceDB).
- An Anthropic or OpenAI API key β the Inkeep agents framework calls your LLM directly; no Inkeep cloud key required.
The Inkeep CDN widget (
@inkeep/cxkit-js) requires a paid Inkeep cloud API key. This tutorial uses the open-source Inkeep agents framework (@inkeep/agents-ui) which you self-host with your own LLM key β no per-seat or per-call fee to Inkeep for the chat itself.Architecture
POST /demo/actions), and the bridge pulls the vendorβs blocked status plus missing compliance-document state from the Autoplay connector the moment itβs needed. The bridge owns all context logic; Inkeep stays a clean conversational surface.
The GET /context/{user_id} endpoint calls the Autoplay connectorβs REST live-activity endpoint synchronously β a stateless, on-demand pull keyed by the adminβs stable user_id, not a session β and assembles a human-readable summary of their recent activity and the vendorβs compliance state. When the admin opens chat, this summary becomes the introMessage passed to InkeepEmbeddedChat β so the AIβs first message references the blocked vendor and missing documents, not a generic greeting. Thereβs no persistent connection to manage: the bridge asks the connector for βwhat has this user been doingβ exactly once, right when the frontend needs it.
The tutorial
- Step 1 β Connect real-time events β Build the vendor-management frontend, wire unblock attempts and vendor context into a FastAPI bridge, run the Inkeep agents framework in Docker, and embed
InkeepEmbeddedChat. At the end of this step you have a working AI chat widget on the vendor profile. ~45 minutes. - Step 2 β Define proactive triggers β Add blocked-vendor detection to the bridge, wire the guidance channel to the frontend, and build the proactive handoff that opens Inkeep chat with the vendorβs missing compliance documents pre-loaded. ~45 minutes.