Build an in-product copilot without code
Copy page
Build a logged-in, account-aware copilot that diagnoses live account, integration, and usage state and resolves issues in-product — without escalating to a human.
Overview
Who this is for: product teams adding a copilot for logged-in end users, embedded inside your application. (For a copilot your support agents run inside the Zendesk ticket sidebar, see Support Copilot.)
In this tutorial, you'll build an in-product copilot using the Inkeep Visual Builder. It's embedded in your application, acts on behalf of the signed-in user, and — instead of handing problems to a human — diagnoses and fixes them in product.
When a user says "My Slack integration stopped working and we can't add new users", the copilot will:
- Pull live account state in one turn — the account, the integration's health, current usage and seats
- Render what it found as cards, then act: rotate the broken credential, recommend the right plan
- Answer "how do I…" questions from your docs when the user needs guidance rather than a fix
It knows who the user is because your application forwards the signed-in user's credentials to your MCP server on every tool call.
Prerequisites
- An existing Inkeep Visual Builder instance running (follow the quick start guide to get started)
- Or access to Inkeep Enterprise
- A deployed MCP server that exposes your product's account operations and accepts per-user auth tokens (see Build Custom MCP Servers if you need to create one). For this copilot it should expose:
- Reads — look up the account, its usage metrics, and an integration's status
- Writes — rotate an integration credential, change the plan
- Recommendation — suggest the right plan from current usage
- (Optional) Inkeep Unified Search configured, so the copilot can also answer conceptual "how do I…" questions from your docs
Set up the agent
Create the copilot agent
Go to the Agents tab in the left sidebar, then select Create Agent. Provide the following details:
- Name:
Product copilot - Description:
An in-product copilot that diagnoses and resolves account, integration, and usage issues
Define the headers schema
The headers schema tells Inkeep which headers to expect and validate on every incoming request. These values come from your host application at runtime and identify the signed-in user.
On the agent settings pane, scroll down to Headers schema and enter the following:
Click Save to apply the schema.
Header keys are normalized to lowercase before validation. Always define schema properties in lowercase (e.g., auth-token, not authToken).
Configure the sub agent
Click on the Default Sub Agent to configure it. Provide the following details:
- Name:
Product copilot - Description:
Diagnose account, integration, and usage state and resolve issues in product - Prompt: Copy the prompt below
Prompt:
The {{headers.user-id}} template is resolved at runtime from the validated request headers. You can reference any key defined in the headers schema. Replace [Your Product] with your product name.
Register and connect your MCP servers
Register the Product MCP server
Because each user has their own token, you don't store a single static credential. Instead, credentials are forwarded dynamically from the incoming request headers.
Go to the MCP Servers tab in the left sidebar, then select + New MCP Server. Fill in the server details:
- Name:
Product API - URL: The URL of your deployed MCP server (e.g.,
https://api.yourproduct.com/mcp) - Credential: Select No Authentication
Click Create to register the server.
Leaving the credential blank is intentional. Auth will be injected per-request via header forwarding in the next step.
Connect it with header forwarding
Navigate to the agent canvas: Agents → Product copilot. Drag and drop an MCP block from the top left toolbar onto the canvas, then select the Product API MCP server and connect it to the Product copilot sub agent.
Click on the connection line between the MCP server and the sub agent. In the Headers field, enter:
Click Save Changes in the top right corner.
The {{headers.*}} templates are resolved at runtime from the validated incoming request headers. On every tool call to the MCP server, Inkeep replaces the template with the actual header value from the current request — so the copilot always acts as the signed-in user.
(Optional) Add knowledge base search
To let the copilot answer "how do I…" and conceptual questions from your docs, also connect Inkeep Unified Search as an MCP server and attach it to the same sub agent. The copilot will reach for it on knowledge questions and stay on the account tools for diagnosis and fixes.
Add structured cards
The copilot's diagnosis and fixes land as rich cards, not walls of text. You define these as data components: name each one and give it a JSON schema, and the agent fills it in with real tool results. Create them in the Data Components tab, then attach them to the sub agent — see Data Components for the full walkthrough.
This copilot uses four:
- Account Overview — plan, seats, usage, and renewal date, rendered after looking up the account.
- Integration Health Check — the status of one integration (healthy, degraded, down) and the recommended action.
- Action Result — a confirmation card after a write, e.g. "Slack credential rotated" — the "we fixed it" moment.
- Plan Recommendation — the right plan with reasons and new limits, which the user can accept to trigger an upgrade.
Embed the copilot in your application
Pass the signed-in user's credentials as custom headers from your chat component. The chat component sends these headers with every request to the agent API.
Replace YOUR_APP_ID with the App ID from your project's Apps settings. See App Credentials for setup details.
Test the copilot
Test in the Visual Builder playground
Click Try it in the top right corner to open the chat interface. Click the Custom headers button and enter test values:
Click Apply, then send a message like "My Slack integration stopped working and we can't add new users — can you fix it?"
The copilot should chain its read tools (account, integration status, usage), render the Account Overview and Integration Health Check cards, rotate the Slack credential, confirm with an Action Result, and — if seats are maxed — render a Plan Recommendation. Verify in your MCP server logs that the Authorization and X-User-Id headers arrive populated from the values you entered.
Test in your application
After embedding the chat component, sign in as a test user and interact with the copilot. Confirm that:
- The agent responds with data scoped to the signed-in user
- Your MCP server logs show the correct auth token and user ID on each tool call
- Switching users changes the data the copilot returns and acts on
Meeting Prep Agent
Step-by-step tutorial to build a meeting prep agent using the Visual Builder with Google Calendar and web search tools.
AI SDR Chatbot
Step-by-step tutorial to build a public chatbot that answers product and pricing questions from your knowledge base, then books a meeting in-chat the moment a visitor shows sales intent.