Skip to main content

In-Product Agents

In-product agents are AI assistants embedded directly in your application, typically as a sidebar, panel, or full-page chat. Unlike simple Q&A chatbots, they can execute tools, take actions, and reason through multi-step tasks on behalf of your users.

Common patterns include:

  • Product help: Answer "How do I...?" questions using your documentation
  • Data and operations: Run queries, inspect entities, or pull recent activity using your APIs
  • Guided workflows: Walk users through configuration, setup, or debugging steps
  • Actions with approval: Create resources, update settings, or trigger jobs with user confirmation

Kapa Agent SDK

The recommended way to build an in-product agent is with the Kapa Agent SDK. It provides everything out of the box:

  • Streaming chat UI: Ready-made React components (AgentChat, AgentPanel) or headless hooks for a fully custom UI
  • Custom tools: Define tools with Zod schemas for type-safe argument inference. Tools execute client-side using the user's auth context.
  • Human-in-the-loop: Tools can require user approval before execution
  • Knowledge base search: Built-in access to your Kapa knowledge sources, no extra setup needed
  • Theming: Accent color, dark/light mode, font, and border radius customization
  • Framework-agnostic core: @kapaai/agent-core works with any JS framework or none at all
import { AgentProvider, AgentChat } from "@kapaai/agent-react";

<AgentProvider
getSessionToken={async () => {
const res = await fetch("/api/session", { method: "POST" });
return res.json();
}}
projectId="your-project-id"
integrationId="your-integration-id"
tools={myTools}
>
<AgentChat branding={{ title: "AI Assistant" }} />
</AgentProvider>

See the Agent SDK documentation to get started, or explore the example apps.

Alternative: bring your own agent framework

If you're building your own agent with a framework like LangGraph, OpenAI Agents, or a custom orchestration layer, you can still give it access to your Kapa knowledge base via a Hosted MCP server. In this setup, Kapa provides a retrieval tool that your agent calls alongside your other tools.

See Connect your agent to your docs with MCP for a walkthrough.