Quick example
Installation
Getting started
- Initialize a project:
kapso init - Create your agent:
kapso agent init <name>, then editagents/<name>/agent.py - Test with web interface:
kapso agent snapshot <name> - Push to cloud:
kapso agent push <name>
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Introduction to building agents with the Kapso Python SDK
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()
pip install kapso
kapso initkapso agent init <name>, then edit agents/<name>/agent.pykapso agent snapshot <name>kapso agent push <name>