examples · everything below ships in the repo · most are CI-tested

Don't start from zero.
Start from working.

Each card names its repo path and how to run it. The agent examples use a deterministic mock LLM provider where possible, so they run in CI with no keys — the parts that need a real key say so.

[ai]

The full-stack AI app

A React chat UI, a Bun API running a real server-side agent loop (model → tool_calls → execute → final answer) through the gateway, and the whole app exposed as an MCP tool — one binary, one origin.

  • riz init ai-chat && cd ai-chat && riz --dev
  • Boots offline first try — the mock provider drives the full tool loop
  • Anthropic / OpenAI / Ollama = a riz.toml edit; the handler never changes
  • Same loop, no code: an [agent] block makes the binary a delegable A2A agent
CI: ai_chat_agent_loop_works_end_to_end
examples/ai-chat →
[mcp]

Agent tools, zero glue

Three plain functions — lookup_order, list_inventory, create_ticket — that auto-become typed MCP tools, including a typed JSON-Schema body.

  • riz --config examples/riz.agent.toml run
  • Order 1042 is seeded delayed — the canonical demo path
CI: agent_tools_are_mcp_tools_and_callable_over_riz_mcp
examples/lambdas/agent-tools →
[sdk]

Claude Agent SDK, single task

A Python Agent SDK script that discovers riz tools over MCP and completes a conditional task — look up an order, open a ticket if it's delayed.

  • Needs ANTHROPIC_API_KEY + a running riz
  • The riz side is just the config above — no SDK code
substrate proven in CI; the live run needs a key
examples/agent-sdk →
[loop]

Multi-step loop + token cost

An agent loops over a batch of orders, chaining tool calls — the case where "what did this request cost in tokens?" stops being trivial.

  • Token usage rolls up the OTel span tree per request
  • Same totals live in the --dev Tokens panel
CI: multi_hop_agent_chain_rolls_up_token_usage_across_the_tree
examples/agent-loop →
[wasi]

Real compute in the sandbox

A wasm32-wasip1 handler that validates and prices an order entirely under WASI — deny-by-default, sub-ms cold start, not an echo toy.

  • Integer-cents pricing, deterministic across hosts
  • 422 with a structured error on invalid orders
CI: wasm_orders_prices_a_valid_order
examples/lambdas/orders-wasm →
[par]

The parity set

The same echo handler in Bun, Node, Python, Rust, Go, and WASM — the fixture set behind the cross-runtime parity matrix, and the cleanest "how do I write a handler in X" reference.

  • echo-bun · echo-node · echo-python · echo-rust · echo-go · echo-wasm
  • Plus chat variants for WebSocket runtimes
CI: the runtime_parity_* test family
examples/lambdas →
[cfg]

Config cookbook

Working riz.toml files for every posture — every one parsed and validated by the test suite, so the cookbook can't rot.

  • riz.agent.toml — the MCP/agent demo fleet
  • riz.prod.toml — telemetry, auth, deploy gating
  • riz.workos.toml · riz.clerk.toml · riz.jwt.toml — JWT/JWKS auth recipes
CI: every_example_config_parses_and_validates
examples/*.toml →
the rule If an example stops working, CI fails — the cookbook is part of the suite, not documentation that rots. Browse all examples ↗