> ## Documentation Index
> Fetch the complete documentation index at: https://kapso-1adbad2d.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Builder SDK

> Introduction to building agents with the Kapso Python SDK

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

```python theme={null}
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

```bash theme={null}
pip install kapso
```

## Getting started

1. **Initialize a project**: `kapso init`
2. **Create your agent**: `kapso agent init <name>`, then edit `agents/<name>/agent.py`
3. **Test with web interface**: `kapso agent snapshot <name>`
4. **Push to cloud**: `kapso agent push <name>`

## Learn more

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