> ## Documentation Index
> Fetch the complete documentation index at: https://developers.autoplay.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Inkeep skill

> Connects a self-hosted Inkeep agents framework chat widget to Autoplay live activity via a small FastAPI bridge that pulls a user's activity on demand over REST and exposes it as a /context/{user_id} endpoint. Covers building the introMessage from that context and matching the widget's userId to the activity source. Use when the customer already uses Inkeep, the Inkeep agents framework, or InkeepEmbeddedChat.

# AI Support Agent — Inkeep

> Read `autoplay-core` first for install and credentials (`product_id`, `mcp_url`, `mcp_key`).
> This skill covers the self-hosted, open-source Inkeep agents framework
> (`@inkeep/agents-ui`) — not the paid Inkeep CDN widget, which needs no
> bridge at all.
>
> **Who does this: Mixed.** Standing up the Inkeep agents framework itself
> (Docker backing services, the `pnpm` dev server, creating the
> project/agent/sub-agent via the management API) is a user task — there's
> no reason for you to invent the customer's agent prompt or bot behavior.
> The FastAPI bridge and the frontend's `introMessage` wiring are code you
> write yourself.
>
> **Stay inside this project's directory tree.** Every file this skill
> touches lives inside the current project root. Never search, list, or read
> outside it.
>
> **Wait for the real `mcp_key` before starting the bridge.** Run
> `onboard_product` yourself first if it hasn't been run yet — never
> hardcode the literal `YOUR_MCP_KEY` placeholder in `bridge/.env`.

## Scoping pattern for Inkeep

This integration has no native MCP call, so a small FastAPI bridge pulls a
user's live activity on demand over REST
(`GET /users/{product_id}/{user_id}/live-activity`) and exposes it over its
own `/context/{user_id}` endpoint. The frontend calls that endpoint before
mounting `InkeepEmbeddedChat`, then passes the result as the widget's
`introMessage` — no webhook, no stream, no local event store to keep in
sync. The read is keyed by `product_id` + `user_id` only.

`user_id` must exactly equal the id your activity source identifies the user
with (e.g. `posthog.get_distinct_id()`) — pass it as the `userId` prop into
the widget component so it fetches the right user's context. Use the `key`
prop on `InkeepEmbeddedChat` to force a remount when the `introMessage`
changes; the component ignores prop updates after mount.

## Reference

* Full tutorial: [https://developers.autoplay.ai/recipes/inkeep/step-1-connect-real-time-events](https://developers.autoplay.ai/recipes/inkeep/step-1-connect-real-time-events)
