AI Labs

Reference patterns

Examples

Worked patterns that back advisory engagements: business case, implementation, architecture, and demos when you have API keys. Not a product you buy off this site.

Patterns, metrics, and runnable demos for architecture reviews and pilots, from The Ops Toolbox.

25

Patterns

Across 4 stacks

Live

Demos

When keys configured

Pattern picker

Pick a profile close to your initiative. See representative examples and guides.

Browse by pattern(Agents, RAG, governance, platform, discovery)

Agents & copilots

Streaming tools, escalation, and human oversight.

Grounded Q&A

Retrieval, citations, and knowledge-bound answers.

Governance & safety

Safety scoring, orchestration, and policy gates.

Platform & routing

Gateways, evals, workflows, and intent routing.

Discovery & structure

Workshop extraction and initiative shaping.

Batch & routing

Classify and route many items without a chat UI.

15 examples

Streaming agent on Vercel AI SDK with tool calling for CRM lookup and ticket creation.

Browser streams UI messages with sessionId to the route handler

AgentsStreamingHuman escalation
View case study & demo →

Compare latency and responses across models through a single gateway endpoint.

Same prompt POSTed once to the compare route

Model routingStreaming
View case study & demo →

A pay-per-invocation durable workflow that orchestrates a multi-step transformation intake pipeline.

POST starts a workflow run with start()

OrchestrationEnterprise
View case study & demo →

Keyword retrieval over in-app policy seeds, then grounded answers via the Vercel AI SDK.

Question triggers keyword search over SEED_DOCUMENTS

RAGGovernance
View case study & demo →

Compare two system prompts on the same user message, then score with a schema-constrained evaluator.

Same user message run against prompt A and prompt B in parallel

Prompt evaluationGovernance
View case study & demo →

Classify multiple support snippets into category and priority with one structured model call.

Client sends array of ticket or comment strings

Intent routingGovernanceEnterprise
View case study & demo →

Agent proposes CRM writes and refunds; supervisors approve or reject before anything executes.

Scenario analysed with generateObject for action proposal

AgentsGovernanceHuman escalation
View case study & demo →

Structured telemetry on every request: trace id, latency breakdown, tokens, retrieval hits, and cost estimate.

Optional seed retrieval timed separately from model call

GovernancePrompt evaluationRAG
View case study & demo →

Turn messy source text into stable chunks and citation ids you can carry into RAG prompts and audits.

Client posts raw text

RAGGovernanceEnterprise
View case study & demo →

Deterministic rules block or route risky actions before an agent can write to systems of record.

User proposes an action type and context (tier, amount)

GovernanceAgentsEnterprise
View case study & demo →

Redact obvious PII locally before prompts hit external model APIs.

Client posts text

GovernanceEnterprise
View case study & demo →

Store golden conversations and score prompt changes before they ship.

User supplies a system prompt

Prompt evaluationGovernanceEnterprise
View case study & demo →

A multi-step incident helper using seed runbooks: classify severity, pick runbook, draft first comms.

Incident text posted to server

OrchestrationGovernanceEnterprise
View case study & demo →

Group dozens of feedback lines into themes you can route to teams, without building a data platform.

Lines submitted as batch items

Batch processingIntent routingEnterprise
View case study & demo →

Hard caps per session to prevent pilot spend surprises, block after budget is exhausted.

Request includes sessionId and prompt

GovernanceEnterprise
View case study & demo →