AI Recipes

Practical step-by-step guides for solving real tasks with AI. Focus on problem-solving logic, not just tools.

Agent Memory: Context That Survives a Restart
AdvancedAI Agents25 minMem0, JSON file storage, Claude API

Humans have working, long-term, and procedural memory — an agent needs the same. In 2026 memory stopped being an optimization and became an architectural requirement: without it every session starts from scratch, and the user explains the same thing for the third time in a row.

View Recipe
Reflection: The Agent That Critiques Itself
IntermediateAI Agents20 minClaude API, Any LLM, Prompt chaining

Agents trust their first answer too much — and fail exactly where a human would reread and fix. Reflection forces the model to draft first, then critique, then revise — and quality jumps significantly.

View Recipe
Human-in-the-Loop: Where to Stop the Agent Before It Breaks Things
IntermediateAI Agents20 minLangGraph, State checkpointer, Any agent framework

In 2026 only 22% of people trust autonomous agents — and the EU AI Act explicitly requires human oversight for high-risk systems. An agent that knows when to pause and ask for approval at critical points is not a bug — it is a mandatory part of production architecture.

View Recipe
LLM Router: Use the Expensive Model Only Where It Earns Its Keep
IntermediateAI DevOps20 minClaude Haiku/Sonnet/Opus, OpenAI o3/gpt-4o/gpt-4o-mini, Classifier model

Most teams run one premium LLM on everything — from classification to architectural decisions. A smart router classifies the request first, then dispatches to a cheap/mid/premium model — cutting cost 30-80% without a quality drop.

View Recipe
Guardrails: Layered Defense for LLM Apps in Production
IntermediateAI DevOps25 minNeMo Guardrails, Guardrails AI, Any validator library

87% of top models remain vulnerable to jailbreaks, EU AI Act fines reach €35M, and layered guardrails catch 95% of incidents collectively. We break down how to build defense at every seam of the pipeline: a single guardrail is no guardrail — just a feeling of one.

View Recipe
Evals for AI Agents: How to Know Your Agent Actually Works
IntermediateAI DevOps35 minDeepEval, Langfuse, Claude API

Everyone builds agents, almost nobody measures them. We break down why classical tests don't work here, how to assemble your first eval dataset in an hour, the difference between end-to-end and trajectory evaluation, and how not to fool yourself with LLM-as-judge.

View Recipe
Prompt Caching: How to Cut 80% Off Your LLM Bill
IntermediateAI DevOps25 minAnthropic API, OpenAI API

The cheapest LLM optimization isn't a smaller model or a smarter RAG — it's a properly structured prefix cache. We break down how caching actually works, where to place cache points, why segment order matters more than content, and how to measure hit-rate so you don't fool yourself.

View Recipe
LLM-Wiki Second Brain: The Alternative to RAG for Personal Knowledge
IntermediateContent30 minObsidian, Claude, Markdown

Classic RAG isn't the only way to build a personal knowledge base. We unpack Andrej Karpathy's idea: an LLM acting as a librarian that maintains a topical wiki from your raw notes. When it beats RAG, how the structure works, and what to do when it breaks.

View Recipe
Voice AI Agent: Why 800 ms Is the Most Important Number in the Architecture
AdvancedExperimental40 minLiveKit Agents, Deepgram, ElevenLabs, Claude Haiku

A voice agent isn't 'a text bot plus TTS'. It's an STT → LLM → TTS chain that has to respond before the human starts talking again. We break down the latency budget, turn-taking, interruption handling, and three typical streaming-pipeline breakdowns.

View Recipe
Browser Agent: When You Need One, How to Think About Reliability, Why It's Dangerous
IntermediateExperimental35 minbrowser-use, Playwright, Claude Vision

Vision agents clicking through websites are the hottest automation trend of 2026. We break down when you actually need one (not always), the difference between DOM and vision approaches, why 'click and wait 2 seconds' almost always breaks, and which boundaries are mandatory before you ship to production.

View Recipe
AI Bot for Customer Review Responses
IntermediateAutomation25 minn8n, Claude API, Google Sheets

Automatically analyzes review sentiment and generates a personalized response. We break down the core principle: one complex prompt is a trap, a chain of simple ones is power. We build a workflow with branching for cases when the AI needs to call a human.

View Recipe
Build Your Own MCP Server: Give Claude Access to Any API
IntermediateMCP30 minTypeScript, MCP SDK, Claude Desktop

MCP (Model Context Protocol) is like a USB interface for AI: a standard connector through which Claude plugs into any tool. We break down how to design and run your own MCP server — from choosing what tools to expose to making the first call from Claude Desktop.

View Recipe
Agentic RAG — Let the Agent Decide What to Retrieve
IntermediateRAG & Data30 minLangGraph, Python, ChromaDB

Classic RAG is a brainless conveyor: query, retrieve, answer. Agentic RAG is when the agent decides whether to search, what to search for, and whether the results are good enough. We break down how to turn a linear pipeline into a decision loop — using LangGraph and ChromaDB.

View Recipe
Code Review Agent with Claude Agent SDK
AdvancedAI Agents35 minClaude Agent SDK, Python, GitHub API

Code review is a perfect task for an AI agent: it requires reading context, finding related files, and applying different criteria to different parts of code. We break down how to build an agent that reviews code like an experienced engineer — prioritizing findings, searching for context, and posting a structured report directly to GitHub.

View Recipe
AI Document Processing Pipeline: Classify → Extract → Route
BeginnerAutomation20 minClaude API, n8n, Google Sheets

Every company drowns in documents: invoices, contracts, requests, letters. AI can read them — but for this to work reliably, you need not one magic button, but a pipeline: first understand what the document is, then extract the needed data, then decide what to do with it. We break down how to build such a pipeline in n8n with the Claude API.

View Recipe
Multi-Agent Research Team with CrewAI
IntermediateAI Agents25 minCrewAI, Python, SerperDev API

CrewAI is a framework where multiple AI agents work as a real team: each with a dedicated role, tools, and area of responsibility. We break down how to build a research crew with a coordinator and specialists — from role design to debugging your first real scenario.

View Recipe
Four modes of developing with AI: A / B / B+ / C
IntermediateAI DevOps15 minCursor, Claude Code, Copilot, ExecPlan, ADR

The front door to the harness series: four development modes — Classic (A), AI-Assisted (B), Agent-Driven (B+), Agent-First (C). It's not a ladder but four distinct bets: one mode is optimal for one team and catastrophic for another on the same project. This recipe helps you pick a mode and answers the meta-question of how much AI a project even needs. For B+/C a harness is mandatory (it leads on to the Harness Engineering recipe); for A/B it's barely needed.

View Recipe
Harness Engineering: an environment for an autonomous agent
AdvancedAI DevOps30 minClaude Code, AGENTS.md, ExecPlan, pre-commit, CI

A harness-engineering hub: a five-layer environment, the four-phase route a task travels, barriers vs conventions, and the lessons-ledger as the autonomy core. With an interactive explorer and a series map — how to set up any project so a coding agent runs a task from framing to push with almost no supervision.

View Recipe
Auditing a brownfield project before the harness (Phase 0)
IntermediateAI DevOps20 minbaseline.md, environment.md, ADR, Claude Code

Phase 0 of the Harness Engineering series — entering an existing (brownfield) project. Before any AGENTS.md or linters, you audit: baseline.md inventories what already exists (structure, boundaries, conventions, test and CI state as a descriptive baseline), and environment.md pins down the stack and a tool-selection table (role → concrete tool) that every later phase consumes. With copyable audit-bootstrap prompts — stack-agnostic, for JS/TS, Python, Go, Java/Kotlin and any other stack.

View Recipe
AGENTS.md and ADR: the agent contract for every session
IntermediateAI DevOps25 minAGENTS.md, CLAUDE.md, ADR, Claude Code

Phase 1 of the Harness Engineering series — context engineering. A deep dive into the four sources of truth the agent reads at start: AGENTS.md (working rules + Definition of Done + the retrieve rule), a per-agent addendum (CLAUDE.md / .cursorrules / system prompt), architecture.md (the layer & boundary map), and the ADR catalog (one decision = one markdown). Minimal templates and ready-to-copy bootstrap prompts — stack-agnostic, for any language and any agent.

View Recipe
ExecPlan: an agent on 7–25-hour tasks (Phase 2)
IntermediateAI DevOps20 minExecPlan, Claude Code, Plan mode

Phase 2 of the Harness Engineering series: ExecPlan is a living plan in the repo that keeps an agent on a long autonomous task (7–25 hours, dozens of files) without losing context. When to use it and when to skip, which sections the human writes before the start (Context, Goal, Out of scope, Approach) and which the agent fills as it goes (Progress, Decisions, Surprises). A copyable ExecPlan template, a 30-minute readiness diagnostic, and the live-update discipline. Stack-agnostic.

View Recipe
Architectural barriers for the agent (Phase 3)
AdvancedAI DevOps25 minpre-commit, CI, dependency-cruiser, import-linter, eslint

Phase 3 of the harness series: 'machine over text'. Turn architectural rules from text in docs/architecture.md into deterministic checks — import boundaries, dead code, cycles, strict types. A cross-stack 'role → tool' table (dependency-cruiser / import-linter, knip / ts-prune / vulture, madge, tsc / mypy), a test-integrity tripwire instead of a coverage mandate (Goodhart), pre-commit + CI as the enforcement points, and your own check scripts for whatever isn't covered. With copyable prompts and configs.

View Recipe
Harness garbage collection: drift checks (Phase 5)
AdvancedAI DevOps20 minCI, quality.md, knip, dependency-cruiser

Phase 5 of the Harness Engineering series: small continuous payments against entropy. Scheduled drift checks — dead code, outdated dependencies, doc/code desync — that don't just alert but PRODUCE an artifact: a PR, an issue, an updated quality.md. A semi-automated quality.md (a script gathers the numbers, a human writes the interpretation ~15 min/week), a doc-freshness gate, scheduling in CI, and honesty about metrics (Goodhart). Stack-agnostic, with copyable prompts.

View Recipe
Lessons-ledger: Corrections as Code (Phase 5.5)
AdvancedAI DevOps25 minClaude Code, .claude/commands, AGENTS.md, git, boundary-linter

Phase 5.5 of the Harness Engineering series: your "wrong" becomes code, not a forgotten chat. A /wrong command captures the correction, normalize splits the fork: a computational lesson (machine-catchable) goes into the rails as a sensor edit, an inferential lesson (judgement needed) becomes a markdown file in lessons/<boundary>/ that the agent reads before the task (the retrieve rule). maintain dedups and promotes matured inferential lessons into sensors. The health metric is how many lessons graduated into sensors, not the size of the notebook. Stack-agnostic, with copyable prompts and an interactive.

View Recipe
Skills library: SKILL.md for the agent (Phase 6)
IntermediateAI DevOps20 minClaude Code, SKILL.md, CLAUDE.md, git

Phase 6 of the Harness Engineering series: a skill is a SKILL.md encoding a repeatable procedure ('how to do a recurring task') that the agent auto-loads via the trigger in its description field. You learn to tell a skill apart from the lessons-ledger (which stores 'what NOT to repeat'), to mine skill candidates from commit history, to write the make-or-break description field with trigger phrases, to structure SKILL.md (When to use / Steps / DoD / Anti-patterns / Examples), and to wire the library into the agent's context file. Stack-agnostic, with a copyable template.

View Recipe
Agent workflow: worktrees and subagents (Phase 7)
IntermediateAI DevOps20 mingit worktree, CONTRIBUTING.md, Claude Code, subagents, ExecPlan

Phase 7 of the Harness Engineering series: the process of working with coding agents, not the harness itself. The cornerstone is one thread per one task (not per project): otherwise context gets polluted, the task "completes" prematurely on overflow, and the history turns unreadable. The worktree workflow (create a worktree → run the agent inside → finish → delete), Plan mode for non-trivial work, the ExecPlan threshold for long tasks (cross-link, not a re-teach), subagents as the delegation boundary, and the "3 stumbles → the next task fixes the environment" rule. The artifact is a "Working with coding agents" section in CONTRIBUTING.md. Stack-agnostic.

View Recipe
Golden path: a harness template repo (Phase 8)
AdvancedAI DevOps20 mintemplate repo, git, AGENTS.md, ADR, CI

The final phase of the Harness Engineering series: package everything built across phases 0–5.5 into a forkable template repo. The harness stops being an artisanal per-project build and becomes a golden path. What goes in the template with project-specific cleanup (AGENTS.md / CLAUDE.md with stubs, the ExecPlan template, an ADR _template, environment.md with an EMPTY tool-selection table, deterministic-check configs as TODO templates, GC jobs as tool-agnostic contracts, only the universal .claude/skills/), the migration capsule (the portable mechanism + a curated _core vs project-bound noise), HOW_TO_FORK.md with a 2–3 day estimate, and the "living fork" horizon — a shared harness-kit. Stack- and infra-agnostic, with a copyable fork skeleton.

View Recipe
Harness Configurator: stack → tools and DoD
IntermediateAI DevOps15 minAGENTS.md, pre-commit, ExecPlan, ADR, CI

An interactive tool of the Harness Engineering series: pick a stack (JS/TS, Python, Java/Kotlin, Go, PHP) and get a personal setup. A role → tool table (boundary linter, dead code, strict types, cycles, security, pre-commit), a Definition of Done checklist across all rollout phases (0→8), and ready copy/download artifacts for your stack: an AGENTS.md skeleton, a pre-commit config and an ExecPlan template. The role is universal, the tool is an example to choose and pin once in an ADR. Stack-agnostic.

View Recipe