Practical patterns for building and rendering Kida components in your applications.
Components
Typed props, named slots, scoped state, and validation
Framework Integration
Bring Kida components to Python frameworks and static sites
Loading Templates
FileSystemLoader, DictLoader, search paths
Rendering Contexts
Passing variables, globals, nested contexts
Streaming
Chunked rendering, async streaming, framework integration
Escaping
HTML escaping, Markup class, safe filter
Error Handling
Template errors, debugging, stack traces
Agent Message Protocol (AMP)
Structured AI agent output for multi-surface rendering
Agent Templates
Built-in templates for code review, PR summary, deploy preview, and more
Quick Reference
from kida import Environment, FileSystemLoader
# Create environment
env = Environment(
loader=FileSystemLoader("templates/"),
autoescape=True,
)
# Load and render
template = env.get_template("page.html")
html = template.render(title="Hello", items=[1, 2, 3])
# Compile from string (not cached)
template = env.from_string("{{ name }}")
html = template.render(name="World")