The Kapso Builder is a Python library that enables you to programmatically create sophisticated conversational AI agents using Python’s type-safe, IDE-friendly environment.

Quick example

from kapso.builder import Agent
from kapso.builder.nodes import SubagentNode, WarmEndNode, HandoffNode
from kapso.builder.nodes.subagent import WebhookTool, KnowledgeBaseTool
from kapso.builder.agent.constants import START_NODE, END_NODE

# Create an agent
agent = Agent(
    name="customer_support",
    system_prompt="You are a helpful customer support assistant"
)

# Create a SubagentNode with tools
subagent = SubagentNode(
    name="assistant",
    prompt="Help customers with their inquiries using available tools"
)

# Add tools
subagent.add_tool(WebhookTool(
    name="check_order",
    url="https://api.example.com/orders/{{order_id}}",
    description="Check order status"
))

subagent.add_tool(KnowledgeBaseTool(
    name="policies",
    knowledge_base_text="Return policy: 30 days...",
    description="Company policies"
))

# Add nodes and create flow
agent.add_node(START_NODE)
agent.add_node(subagent)
agent.add_node(END_NODE)

agent.add_edge(START_NODE, "assistant")
agent.add_edge("assistant", END_NODE)

# Validate and deploy
agent.validate()

Installation

pip install kapso

Getting started

  1. Initialize a project: kapso init
  2. Create your agent: Write Python code using the Builder SDK
  3. Test locally: kapso run
  4. Deploy to cloud: kapso deploy

Learn more

For comprehensive documentation on all Builder SDK features, node types, and advanced patterns, see the Builder Reference section in the top navigation.