PRODUCT AGENT SDK
Skip the agent infrastructure. Ship the product copilot.
Build a product agent on your existing APIs without rebuilding retrieval, tool calling, approvals, or analytics.

how it works
Launch a product agent in days
Drop in the agent SDK
Use ready-made components or headless TypeScript inside your product.
Ingest product knowledge
Search docs, APIs, code, tickets, and conversations through Kapa.
Expose useful tools
Give the agent tools to query data, run workflows, and create resources.
Built for product-specific agents and copilots


“Kapa started as an agent on our documentation. Now it's the interface layer between Port and everyone - customers, internal teams, even AI agents calling our API.”

Matan Grady, Product Director
Try Kapa with your technical content
Test and evaluate Kapa for free
Go live in less than 7 days
SOC 2 Type II & GDPR compliant
What does the Product Agent SDK let me build, and who is it for?
The Agent SDK lets you embed an AI agent directly into your own product, typically as a sidebar, panel, or full-page chat, rather than relying on a hosted widget. It is built for product and engineering teams who want a copilot that can answer "how do I" questions from your documentation, run queries against your APIs, walk users through workflows, and take actions on their behalf. Kapa provides the agent layer, including orchestration, streaming, knowledge retrieval, and a ready-made chat UI, so you connect your product workflows instead of rebuilding agent infrastructure. This means you skip building ingestion, indexing, chunking, tool-calling loops, approvals, and analytics yourself. It is well suited to companies with complex technical products that want a branded, product-specific agent experience.
What languages and frameworks does the SDK support, and how do I integrate it?
The SDK ships as two layered packages. @kapaai/agent-react provides React components and hooks, including a full chat UI with theming and a slide-in panel, while @kapaai/agent-core is pure TypeScript that works in any JavaScript environment, so you can use Vue, Svelte, Angular, vanilla JS, or no framework at all. The SDK is frontend-first, meaning orchestration, tool execution, and the UI all run in your application code with no agent backend to deploy or operate. Integration involves installing the package, minting a short-lived session token from your server, and passing your project and integration IDs to the agent. React users can drop in a prebuilt component or go headless and bring their own UI. Runnable example apps are published on GitHub to help you get started quickly.
How much can I customize the agent's look, behavior, and tools?
You have substantial control over both UX and capabilities. On the UI side, you can theme accent colors, dark and light mode, font, and border radius, use the prebuilt AgentChat and AgentPanel components, or go fully headless with hooks and render everything yourself. You define custom tools using Zod schemas for type-safe arguments, and each tool can have a display name, icon, and a custom render function that replaces the default tool card with your own JSX. Tools execute client-side using the context object you provide, so they can call your existing API clients and user session. You can also relabel the built-in knowledge base search tool so it fits your product's language.
How does Kapa keep answers accurate, and what guardrails exist for actions?
Accuracy comes from a built-in search_knowledge_base tool that runs server-side on Kapa's retrieval pipeline, using the same sources you configure in the dashboard, such as documentation, GitHub repos, and API references. This gives the agent a grounded product knowledge layer without you rebuilding ingestion, indexing, or answer grounding. For actions, the SDK includes a human-in-the-loop approval flow: any tool marked with needsApproval will not execute until the user clicks Allow, with the request shown clearly in the chat. Because tool execution happens in your application code, it reuses your existing permissions and access controls rather than running with elevated agent privileges. After launch, analytics capture what users ask, which tools get called, and where answers fall short so you can iterate.
How does the SDK handle security and data privacy?
The SDK is designed so your API key never reaches the browser. Instead, your server mints a short-lived session token from your API key, and the SDK uses that token, valid for one hour, for all calls to Kapa, with automatic caching, refresh, and retry handling. Because tools run in your frontend, they reuse your existing user session, API clients, permissions, and RBAC, so there is no separate authorization layer to build for the agent. Conversation history is scoped per user through an external_owner_id that only your trusted backend can set, which means one user's session cannot access another user's threads and the value cannot be forged from the browser. At the company level, Kapa is SOC 2 Type II certified and GDPR compliant. This combination keeps both your credentials and your users' data under your control.



