Skip to content

Examples

These are runnable applications, not disconnected snippets. Start with a production example when you want to understand how Kuralle's agent, policy, persistence, workspace, skills, transports, and operating boundaries compose. Use a playground when you want to isolate one mechanism.

For a customer-facing web application, start with the Customer Support Agent. Its brand and reviewed help corpus live in one validated config, while the same Pi-backed agent runs with PostgreSQL on Vercel or one SQLite-backed Durable Object per conversation on Cloudflare.

For retrieval-led shopping and approval-gated checkout, follow Build an Agentic Commerce Assistant. It shows the same agent on Node/Bun and Cloudflare while keeping search, commercial truth, durable coordination, and payment authority on separate substrates.

Before running an example, clone the monorepo and install once:

Terminal window
git clone https://github.com/kuralle/kuralle-agents.git
cd kuralle-agents
bun install

Provider-backed examples read credentials from the repository root .env or their local .env.example. Focused deterministic tests do not require a model key.

Reference systems

Production examples

Complete applications with explicit data ownership, durable effects, failure boundaries, tests, and operating notes.

Retrieval to checkout

Agentic Commerce Assistant

Finds products through Samesake, revalidates price and stock in Porulle, and pauses an idempotent Stripe checkout for explicit approval across Node/Postgres and Cloudflare Durable Objects.

Interface
Web + Worker API
Substrate
PostgreSQL · Durable Objects · Workflows
  • Pi
  • commerce
  • retrieval
  • approval
bun run --cwd apps/examples/agentic-commerce-assistant node
Swappable production template

Customer Support Agent

Ships one Pi-backed support core across Vercel/Postgres and Cloudflare Durable Objects, with config-owned knowledge, signed identity, approval-gated writes, grounding validation, and human escalation.

Interface
Next.js web + Worker API
Substrate
PostgreSQL · Durable Object SQLite
  • Pi
  • identity
  • RAG
  • approval
bun run --cwd apps/examples/customer-support-agent dev
Durable edge + web

Pharmacy Workspace Agent

Runs the same safe pharmacy agent on Next.js/Vercel and a Cloudflare Durable Object with per-session workspaces, progressive skills, and hosted CLI access.

Interface
Web + hosted CLI
Substrate
Vercel · Durable Object SQLite
  • cf-agent
  • workspace
  • skills
  • multimodal
bun run --cwd apps/examples/pharmacy-rx-agent dev
Full-stack starter

Postgres Hacker Starter

A Next.js workbench backed by PostgreSQL and pgvector, with signed identity, hybrid retrieval, persistent memory, and approval-gated account operations.

Interface
Next.js web app
Substrate
PostgreSQL · pgvector
  • identity
  • retrieval
  • memory
  • approval
bun run --cwd apps/examples/postgres-hacker-starter db:up && bun run --cwd apps/examples/postgres-hacker-starter dev
File-native workflow

Local Content Desk

Turns local Markdown sources and filesystem skills into revisioned drafts with deterministic style checks, explicit approvals, and conflict-safe publication.

Interface
Terminal TUI
Substrate
Caller-owned Markdown
  • NodeFileSystem
  • skills
  • revisions
  • approval
bun run --cwd apps/examples/content-agent chat
Authenticated workflow

Healthcare Operations

A terminal healthcare operator for appointment, billing, and escalation work with authenticated records, durable SQLite state, and bounded actions.

Interface
Terminal TUI
Substrate
Local SQLite
  • authentication
  • flows
  • billing
  • escalation
bun run --cwd apps/examples/healthcare chat
Policy-grounded service

Hotel Receptionist

Handles verified bookings and hotel operations against a real SQLite service layer and policy handbook, with privacy and emergency boundaries.

Interface
Terminal TUI
Substrate
SQLite · policy Markdown
  • flows
  • policy
  • identity
  • durability
bun run --cwd apps/examples/hotel-receptionist chat

Focused proof

Playgrounds and integration labs

Smaller runnable surfaces for studying one substrate, transport, retrieval strategy, or compatibility boundary.

ACME Support Agent

Three-tier compiled, cached, and hybrid retrieval with multi-hop decomposition, reranking, quality checks, specialist routing, and benchmarks.

  • RAG
  • cache
  • quality
bun run --cwd apps/playground/acme-support-agent ingest && bun run --cwd apps/playground/acme-support-agent cli

Vector RAG

End-to-end ingestion and vector retrieval with interchangeable in-memory, PostgreSQL/pgvector, and Redis Search stores plus Hono SSE/WebSockets.

  • RAG
  • stores
  • Hono
bun run --cwd apps/playground/rag-demo cli

Cache-Augmented Generation

A compact restaurant knowledge agent where the model ranks a bounded corpus directly—useful for comparing CAG with vector retrieval.

  • CAG
  • knowledge
  • Hono
bun run --cwd apps/playground/cag-demo cli

Langfuse Export

A routed support conversation exported through Kuralle OTLP spans and the Langfuse OpenTelemetry processor, with a credential-free smoke lane.

  • traces
  • OTLP
  • Langfuse
bun run --cwd apps/playground/langfuse-demo run

Pi Driver Stress Matrix

Runs every Core flow example plus workspace, skill, OKF, parallel-tool, trace, and latency assertions through both Pi and the AI SDK driver.

  • Pi
  • flows
  • parity
bun run --cwd apps/playground/pi-driver-stress smoke

Filesystem on Cloudflare

A persistent Kuralle workspace inside a real Cloudflare AIChatAgent Durable Object using its own SQLite storage.

  • cf-agent
  • DO SQLite
  • filesystem
bun run --cwd apps/playground/fs-demo-cf dev

Filesystem on Vercel

The same SqlFileSystem contract on a stateless serverless platform, persisted through a fetch-only libSQL/Turso backend.

  • Vercel
  • libSQL
  • filesystem
See the deployment recipe in the README

Multichannel Pharmacy

A focused Cloudflare playground for multimodal prescription intake and durable payment-signal resume across web chat and WhatsApp.

  • WhatsApp
  • multimodal
  • signals
bun run --cwd apps/playground/pharmacy-rx-agent dev

Production examples own a full user journey and document their trust boundary, state substrate, tests, and operating procedure. Playgrounds are intentionally narrower; they prove portability or make one tradeoff measurable. A playground can be deployed, but it should not be mistaken for a production contract without adding identity, authorization, retention, and operational ownership appropriate to your application.

All examples use Kuralle primitives directly. They do not introduce a second agent runtime or bypass Kuralle's tool policy, durable journal, session state, or stream contract.