Basic usage
Constructor
- name: Agent identifier (alphanumeric + underscores)
- system_prompt: Instructions for the LLM
- message_debounce_seconds: Wait time before processing rapid messages
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Create and manage conversational agents
from kapso.builder import Agent
from kapso.builder.agent.constants import START_NODE, END_NODE
agent = Agent(
name="support_bot",
system_prompt="You are a helpful support assistant"
)
agent.add_node(START_NODE)
agent.add_node(END_NODE)
agent.add_edge(START_NODE, END_NODE)
agent.validate()
Agent(
name: str,
system_prompt: str = None,
message_debounce_seconds: int = None
)
agent.add_node(node)
agent.add_edge(source, target, condition=None)
agent.add_edge(START_NODE, "greeting")
agent.add_edge("greeting", "help", condition="user needs help")
agent.validate()
from kapso.builder.agent.constants import START_NODE, END_NODE
agent.add_node(START_NODE) # Entry point
agent.add_node(END_NODE) # Exit point
