Blueprints for building with AI agents

Practical, copy-ready blueprints for AI agents, automation, model routing and MCP. Every blueprint has concrete steps plus a config, code or prompt you can copy.

28 blueprints
AI Agent Workflows

Agent Tracing and Evaluation Setup

Capture structured traces of every LLM and tool call and run a small regression eval suite on each change.

observabilitytracingevalsopentelemetry
AI Agent Workflows

Evaluator-Optimizer Refinement Loop

One model generates, another grades against a rubric, and the loop repeats until the rubric passes or a limit is hit.

reflectioncritiquequality
AI Agent Workflows

Human-in-the-Loop Approval Gate

Let agents draft freely but require explicit human approval before any irreversible or external action.

safetyapprovalside-effects
AI Agent Workflows

Planner-Executor Agent

Split a task into an explicit plan, execute steps one at a time, and re-plan only when a step fails.

planningdecompositionmulti-step
AI Agent Workflows

RAG Agent with Grounded Citations

Retrieval-augmented answering that cites source chunks and refuses when the context does not support an answer.

ragretrievalcitationsembeddings
AI Agent Workflows

ReAct Tool-Calling Agent Loop

A minimal, provider-agnostic reason-act-observe loop with a step budget, tool registry, and safe termination.

reacttool-uselooppython
AI Agent Workflows

Supervisor Multi-Agent Router

A supervisor agent delegates sub-tasks to specialist agents with narrow tools and merges their outputs.

multi-agentsupervisorrouting
n8n Automation Blueprints

n8n Form Lead Enrichment and CRM Sync

Capture a lead via n8n Form Trigger, research the company website with an LLM, and upsert into a sheet or CRM.

n8nformscrmenrichment
n8n Automation Blueprints

n8n Global Error Alerting Workflow

A dedicated error workflow that alerts you with the failing workflow, node, and execution link whenever any workflow fails.

n8nmonitoringerrorsops
n8n Automation Blueprints

n8n Inbox Triage with LLM Classification

Classify incoming email into categories with structured output, then label, route, or draft replies.

n8nemailclassificationgmail
n8n Automation Blueprints

n8n RSS to AI Summary Digest

Daily schedule pulls RSS feeds, summarizes new items with an LLM, and posts a digest to Slack or email.

n8nrsssummarizationschedule
n8n Automation Blueprints

n8n Webhook-Triggered AI Agent

Expose an n8n AI Agent (with memory and tools) behind a webhook that returns the answer synchronously.

n8nwebhookai-agentapi
Multi-Model Routing

Complexity-Based Cheap/Strong Model Router

Route easy requests to a cheap model and hard ones to a strong model using a lightweight classifier plus escalation.

routingcostclassifier
Multi-Model Routing

LiteLLM Proxy with Fallbacks and Load Balancing

An OpenAI-compatible gateway that load-balances deployments and falls back across providers on errors.

litellmproxyfallbacksopenai-compatible
Multi-Model Routing

Local-First Routing with Ollama and Cloud Fallback

Serve requests from a local Ollama model, falling back to a cloud model only when local fails or the task needs it.

ollamalocalprivacyfallback
Multi-Model Routing

OpenRouter Model Fallback and Provider Ordering

Use OpenRouter's request-level models array and provider preferences for automatic failover.

openrouterfallbacksprovider-routing
Multi-Model Routing

Semantic Response Cache in Front of LLM Calls

Reuse prior answers for near-duplicate prompts using embedding similarity with a strict threshold and TTL.

cachingembeddingscostlatency
Prompt & Agent Patterns

Chain-of-Verification Fact Check Prompt

Draft an answer, generate verification questions, answer them independently, then revise, reducing factual errors.

verificationhallucinationaccuracy
Prompt & Agent Patterns

Few-Shot Classification Prompt

A compact few-shot prompt for labeling text with balanced examples, an explicit label set, and an escape label.

few-shotclassificationexamples
Prompt & Agent Patterns

Production Agent System Prompt Template

A sectioned system prompt template covering role, context, tools, rules, and output format for tool-using agents.

system-prompttemplateagents
Prompt & Agent Patterns

Prompt Injection Defense for Tool-Using Agents

Layered mitigations for agents that read untrusted content such as web pages, emails, and documents.

securityprompt-injectionguardrails
Prompt & Agent Patterns

Reliable Structured JSON Output Pattern

Get valid, schema-conforming JSON from any model using native structured outputs where available, and validate-and-repair otherwise.

jsonschemavalidationextraction
MCP & Tool Use

Build a Custom MCP Server in Python (MCPServer, formerly FastMCP)

Expose your own functions as MCP tools and resources using the official Python SDK in about 20 lines.

mcppythonserversdk
MCP & Tool Use

Build a Custom MCP Server in TypeScript

A minimal stdio MCP server using @modelcontextprotocol/sdk with a zod-validated tool.

mcptypescriptnodesdk
MCP & Tool Use

GitHub MCP Server with a Scoped Token

Run GitHub's official MCP server in Docker with a fine-grained, least-privilege personal access token.

mcpgithubdockersecurity
MCP & Tool Use

MCP Starter Config for Claude Desktop

A claude_desktop_config.json wiring up filesystem, fetch, and git MCP servers with scoped access.

mcpclaude-desktopfilesystemconfig
MCP & Tool Use

Read-Only Database Access for Agents via MCP

Give an agent safe SQL querying through an MCP server connected with a read-only database role.

mcppostgressqlsecurity
MCP & Tool Use

Tool Design Checklist for Agents and MCP

How to name, describe, and shape tools so models call them correctly and safely.

tool-designmcpschemasbest-practices

No blueprints match. Try another term.

Get one fully built blueprint a week

A weekly email: one blueprint with config, cost, setup time and failure modes, plus a vote on what we build next.