Skip to main content

Overview

The ICRL TypeScript package includes demo-ready examples that run with real API calls. These demonstrate the Agent, custom environments, and storage adapters. Run them from the icrl-ts directory.

Prerequisites

From the monorepo root:
Required environment variables depend on the demo:

Run All Core Demos

Runs: OpenAI, Anthropic, Support Triage, Incident Response.

Run Individual Demos

Run All (Including Web)

Includes the web-convex demo, which requires NEXT_PUBLIC_CONVEX_URL from a running Convex backend (e.g., web-example).

Demo Index

OpenAI Demo

Minimal Agent run with OpenAI:
Uses MathEnvironment (trivial add-two-numbers task), OpenAIProvider, OpenAIEmbedder, and FileSystemAdapter for storage.

Anthropic Demo

Same structure with Claude:
Uses AnthropicProvider and FileSystemAdapter.

Support Triage Demo

Customer support ticket routing and reply generation:
  • Environment: SupportTicketEnvironment — routes to billing/shipping/technical based on content
  • Success: Requires priority, team, and reply (≥ 40 chars) in the action
  • Use case: Automating support triage with learned routing patterns

Incident Response Demo

On-call incident first-response playbook:
  • Environment: IncidentEnvironment — assigns owner (payments/backend/data) based on incident type
  • Success: Requires severity, owner, and first_action in the action
  • Use case: Standardizing incident response with learned playbooks

Web/Convex Demo

Integrates with the web-example Convex backend:
  • Storage: ConvexAdapter — trajectories live in Convex, same as the Next.js web demo
  • Setup: Run web-example and set NEXT_PUBLIC_CONVEX_URL, or use a standalone Convex deployment
  • Optional: ICRL_CONVEX_DATABASE_ID — if omitted, a demo database is created automatically