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.
Agent Tracing and Evaluation Setup
Capture structured traces of every LLM and tool call and run a small regression eval suite on each change.
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.
Human-in-the-Loop Approval Gate
Let agents draft freely but require explicit human approval before any irreversible or external action.
Planner-Executor Agent
Split a task into an explicit plan, execute steps one at a time, and re-plan only when a step fails.
RAG Agent with Grounded Citations
Retrieval-augmented answering that cites source chunks and refuses when the context does not support an answer.
ReAct Tool-Calling Agent Loop
A minimal, provider-agnostic reason-act-observe loop with a step budget, tool registry, and safe termination.
Supervisor Multi-Agent Router
A supervisor agent delegates sub-tasks to specialist agents with narrow tools and merges their outputs.
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.
n8n Global Error Alerting Workflow
A dedicated error workflow that alerts you with the failing workflow, node, and execution link whenever any workflow fails.
n8n Inbox Triage with LLM Classification
Classify incoming email into categories with structured output, then label, route, or draft replies.
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.
n8n Webhook-Triggered AI Agent
Expose an n8n AI Agent (with memory and tools) behind a webhook that returns the answer synchronously.
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.
LiteLLM Proxy with Fallbacks and Load Balancing
An OpenAI-compatible gateway that load-balances deployments and falls back across providers on errors.
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.
OpenRouter Model Fallback and Provider Ordering
Use OpenRouter's request-level models array and provider preferences for automatic failover.
Semantic Response Cache in Front of LLM Calls
Reuse prior answers for near-duplicate prompts using embedding similarity with a strict threshold and TTL.
Chain-of-Verification Fact Check Prompt
Draft an answer, generate verification questions, answer them independently, then revise, reducing factual errors.
Few-Shot Classification Prompt
A compact few-shot prompt for labeling text with balanced examples, an explicit label set, and an escape label.
Production Agent System Prompt Template
A sectioned system prompt template covering role, context, tools, rules, and output format for tool-using agents.
Prompt Injection Defense for Tool-Using Agents
Layered mitigations for agents that read untrusted content such as web pages, emails, and documents.
Reliable Structured JSON Output Pattern
Get valid, schema-conforming JSON from any model using native structured outputs where available, and validate-and-repair otherwise.
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.
Build a Custom MCP Server in TypeScript
A minimal stdio MCP server using @modelcontextprotocol/sdk with a zod-validated tool.
GitHub MCP Server with a Scoped Token
Run GitHub's official MCP server in Docker with a fine-grained, least-privilege personal access token.
MCP Starter Config for Claude Desktop
A claude_desktop_config.json wiring up filesystem, fetch, and git MCP servers with scoped access.
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.
Tool Design Checklist for Agents and MCP
How to name, describe, and shape tools so models call them correctly and safely.
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.