Skip to main content

kapa.ai developer tools

Kapa offers multiple ways to integrate its AI capabilities into your applications. This section covers the various tools and APIs available to developers.

Integration options

Integration MethodBest ForComplexityFeatures
Agent SDKIn-product agents with tool callingLow-MediumStreaming, custom tools, human-in-the-loop approval, full chat UI or headless
Chat SDKChat interfaces in React appsLow-MediumFull control over UI, built-in support for streaming, state management
HTTP APIAny platform or languageMediumMaximum flexibility, custom implementations

Agent SDK

The Kapa Agent SDK lets you embed an AI agent in your product that can answer questions from your knowledge base and take actions through custom tools. The agent runs a multi-turn loop: it streams responses, calls tools (with optional user approval), and continues until it has a final answer. Available as two packages:

  • @kapaai/agent-core: Pure TypeScript, works with any framework or none
  • @kapaai/agent-react: React components and hooks with a ready-made chat UI
import { AgentProvider, AgentChat } from "@kapaai/agent-react";

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

Get started with the Agent SDK →

Chat SDK

The Kapa Chat SDK (@kapaai/react-sdk) provides React components and hooks for integrating Kapa's conversational AI capabilities into your React applications. It's especially useful because it is designed to work without having to wire up a custom backend/proxy. It can run fully client-side, simplifying implementation. It's ideal for developers who want to:

  • Create custom chat interfaces with their own UI/UX
  • Manage conversation state with React hooks
  • Collect user feedback on AI responses
  • Stream AI responses in real-time
import { KapaProvider, useChat } from "@kapaai/react-sdk";

function ChatComponent() {
const { submitQuery, conversation } = useChat();
// Build your custom chat interface
}

Get started with the Chat SDK →

HTTP API

The Kapa HTTP API provides direct access to Kapa's AI capabilities through RESTful endpoints. It's ideal for:

  • Integration with any programming language or platform
  • Backend integrations or middleware
  • Custom implementations requiring flexible API interactions
curl -X POST "https://api.kapa.ai/query" \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"integration_id": "<INTEGRATION_ID>",
"query": "How to get started?"
}'

Get started with the HTTP API →

Which integration method should I choose?

  • Choose the Agent SDK if you're building an in-product agent with custom tools, approval flows, or need the agent to take actions on behalf of users.

  • Choose the Chat SDK if you're building a React chat interface for Q&A and want streamlined integration with built-in state management.

  • Choose the HTTP API if you need maximum flexibility, are using a different frontend framework, or are integrating Kapa on the backend.