Python Decorator
Basic usage
from kyvvu import Kyvvu, StepType, Verb
kv = Kyvvu(api_url="https://platform.kyvvu.com", api_key="KvKey-...", agent_key="my-bot")
kv.register_agent(name="My Bot", purpose="Customer support triage and response")
@kv.step(StepType.step_model, Verb.POST)
def chat(prompt: str) -> str:
return llm.complete(prompt)
@kv.step(StepType.step_resource, Verb.GET)
def read_ticket(ticket_id: str) -> dict:
return db.get_ticket(ticket_id)Task lifecycle
Decorator arguments
Argument
Type
Default
Description
Properties example
Async support
Concurrent tasks in web servers
Handling blocks
How the decorator uses templates
Next steps
Last updated
