Skip to main content

Model Fallback & Circuit Breaker

A 3-provider fallback chain that automatically cascades through OpenAI, Anthropic, and Google when failures occur.

Full Example

examples/models/fallback-chain.ts

Smart Model Router

Route requests to the cheapest capable model based on query complexity:

Full Example

examples/models/smart-router.ts

Agent Reflection & Self-Correction

Enable agents to critique their own outputs and detect tool call loops:

Full Example

examples/agents/reflection.ts

Multi-Tenant Isolation

Transparent tenant-scoped storage:

Full Example

examples/multi-tenant/isolation.ts

Token-Aware Rate Limiting

Sliding-window rate limiting with per-tenant scoping:

Full Example

examples/rate-limiting/token-aware.ts

Conversational Testing

Multi-turn conversation testing with synthetic users:

Full Example

examples/eval/conversational-test.ts

Keeping the Prompt Small

Summarize old turns and cap oversized tool output instead of letting the prompt grow until it breaks:
See Context Compaction for the strategies and when each fires.

Streaming Progress Protocol

Rich progress events for real-time UI updates:

Full Example

examples/agents/progress-stream.ts