5.1K

Agent design patterns

An open catalog of 197 patterns for building AI agents. Each pattern is a plain Markdown file: read it here, get it as .md for your agent, or propose your own.

197 patterns

  1. Anchored Structured Context Compaction Maintains a typed state block (pinned goal and constraints, verified decisions, an artifact registry, open blockers) and merges only the newly evicted span into it at each compaction, so that long sessions keep exact details instead of drifting Context & Memory production
  2. Debiased LLM-as-a-Judge Evaluation Removes the systematic distortions of a model judge before its scores gate a release: swaps the order of each pairwise comparison, grades narrow pass/fail rubric items that cite evidence, supplies a reference answer and a judge from another model family, and measures the agreement with human labels first Reliability & Eval production
  3. Delegated User Authorization (OAuth Token Exchange) Exchanges the user's token and the agent's own identity for a short-lived, single-audience, minimally scoped token immediately before each tool call, so that the agent acts with delegated and attributable authority instead of a shared super-credential Security & Safety production
  4. Dual LLM Pattern Splits work between a privileged LLM that calls tools but never sees untrusted data and a quarantined LLM that reads untrusted data but has no tools Orchestration & Control emerging
  5. Dual-Speed Realtime Architecture (Talker-Reasoner) Splits an agent into a fast Talker that owns the live conversation and a slow Reasoner that plans and calls tools in the background, with a shared belief state as their only coupling, so that the user gets a reply at once while the deep work runs Orchestration & Control emerging
  6. Durable Execution & Step Checkpointing Replays a durable step history to resume crashed, rate-limited, or approval-paused agent runs from the last completed step, without repeating finished LLM calls or committed side effects Orchestration & Control production
  7. Episodic Memory Retrieval & Injection Writes a structured memory record after each episode and injects the top-k similar past memories as hints when a new task starts Context & Memory production
  8. Explicit Posterior-Sampling Planner Embeds Posterior Sampling for RL in the LLM's reasoning: sample a task model, plan, act, observe reward, and update the posterior Orchestration & Control proposed
  9. Hybrid GUI & Visual Grounding Grounds each GUI action in a filtered accessibility tree first, falls back to numbered visual marks or scaled coordinates only for what the tree cannot see, and confirms the effect of each action from a state diff before the next step Tool Use & Environment emerging
  10. LLM Map-Reduce Pattern Processes each untrusted document in its own sandboxed LLM call with a constrained output, then aggregates the results with deterministic code Orchestration & Control emerging
  11. Memory Consolidation, Decay & Contradiction Resolution Gives each stored fact a lifecycle: reconciles each new fact against the related stored facts when it arrives, stamps facts with event time and ingestion time so that a superseded fact is invalidated and not deleted, and runs a background job that merges duplicates and expires spent state Context & Memory emerging
  12. Milestone Escrow for Agent Resource Funding Holds agent funding in escrow and releases each payment only after independent verification of a measurable milestone UX & Collaboration proposed
  13. Multi-Tenant Agent & Memory Isolation Enforces a tenant boundary on all four agent state planes (execution, retrieval and memory, cache, credential and egress), with tenant identity bound outside the model, so that one tenant's data or instructions cannot reach another Security & Safety production
  14. Reflection Loop Scores each draft against a fixed rubric, feeds the critique into a revision, and repeats until the draft passes a threshold or the retry budget ends Feedback Loops production
  15. Trajectory & State-Invariant Evaluation Grades a tool-using agent on the end state of its sandbox against the expected postconditions and not on its final prose, adds assertions on the recorded tool calls for policy preconditions and forbidden side effects, and repeats each scenario to measure the probability that all trials pass Reliability & Eval production
  16. Versioned Constitution Governance Stores the agent constitution in a signed Git repository where the agent can only propose changes and reviewers or CI gates merge them Reliability & Eval proposed
  17. Voice Agent Turn-Taking & Barge-In Handling Couples four control loops in a voice agent so that neither side talks over the other: semantic end-of-turn detection, adaptive barge-in that flushes the audio pipeline, truncation of the assistant message to the words the user heard, and a filler while a slow tool runs UX & Collaboration production
  18. Agent-Driven Research Agent plans its own queries, fans out parallel search workers across sources, reflects on evidence gaps, and iterates until it can write a sourced report Orchestration & Control production
  19. Agent-First Tool Discovery Indexes tools and agents across MCP registries, A2A cards, OpenAPI specs, and custom directories into one normalized search surface ranked by agent-relevant signals Tool Use & Environment emerging
  20. Agent-First Tooling and Logging Designs logs and tool output for agent consumption with one unified log stream, structured JSON, and agent-aware CLI flags Tool Use & Environment production
  21. Code-Over-API (Code Mode) Agent writes code that calls tools and processes data inside a sandbox, so only summaries and samples return to the context window instead of every intermediate result Tool Use & Environment production
  22. Code-Then-Execute Pattern LLM writes a sandboxed program or DSL script, a static taint checker verifies data flows, and an interpreter runs it in a locked sandbox Security & Safety emerging
  23. Dual-Use Tool Design Builds each tool or skill as one CLI interface that both humans and agents call, with JSON output, exit codes, and the same permissions and logs Tool Use & Environment foundational
  24. Egress Lockdown (No-Exfiltration Channel) Puts the agent behind a default-deny egress firewall with allowlisted destinations so stolen data has no outbound channel Security & Safety foundational
  25. Exact-Action Authorization Binding Bind a short-lived approval to the complete action presented to the reviewer, rederive and compare that identity at the acting boundary before execution, and commit the write with its postcondition check and idempotency receipt in one transaction. Security & Safety emerging
  26. External Credential Sync Reads AI credentials from other tools' keychains and config files and syncs them into the agent's store, with TTL-cached reads, refresh fences, and persisted ownership Tool Use & Environment emerging
  27. Isolated VM per RL Rollout Spin up an isolated virtual machine for each RL rollout to prevent cross-contamination between parallel agent executions, ensuring safe training with destructive tool access. Learning & Adaptation emerging
  28. Progressive Autonomy with Model Evolution Treats scaffolding around the model as disposable: build the simplest thing that works, mark it temporary, and remove it when evals show a new model handles the task natively Orchestration & Control production
  29. Progressive Tool Discovery (Lazy Tool Loading) Load only core tools upfront and let the agent discover the rest on demand, either by searching the catalog or by browsing a hierarchy, so tool definitions stop consuming the context window Tool Use & Environment foundational
  30. Specification-Driven Agent Development Makes a version-controlled spec the agent's main input, scaffolds code from it, and regenerates executable tests from it on every commit to catch drift Orchestration & Control emerging
  31. Tool Use Steering via Prompting Tells the agent in the prompt which tool to use for each task type, which patch format to emit, how to learn a custom tool, and which shorthands map to tool sequences Tool Use & Environment foundational
  32. Credential-Free Outbox The agent writes finished work as a file to an outbox and a separate short-lived job with its own token delivers it, so the agent never holds a credential that can publish anything Security & Safety emerging
  33. Human-in-the-Loop Approval Framework Systematically insert human approval gates for designated high-risk functions while maintaining agent autonomy for safe operations, with multi-channel approval interfaces and comprehensive audit trails. UX & Collaboration foundational
  34. Intent-Level Cost Attribution Records every LLM call against the projectId/intentId/user key that caused it, at call time, so spend can be queried and enforced per work item instead of as an opaque total Reliability & Eval proposed
  35. Fleet Cost Simulation Before Dispatch Replays an agent fleet's budget, priority, and failure-recovery policy against deterministic scenarios before committing real spend, so starvation and exhaustion verdicts arrive in CI instead of in production Reliability & Eval proposed
  36. Curated Code Context Window A search subagent finds the few relevant files for a task and injects only top snippets or summaries into the main coding agent's context Context & Memory production
  37. Dynamic Context Injection Lets users inject files, folders, or saved prompts into the agent's context mid-session with @-mentions and custom slash commands Context & Memory production
  38. Fair-Share Task Queues with Heartbeat Leases Distributes tasks across a shared agent fleet using weighted deficit-round-robin scheduling, with heartbeat leases and dead-letter retries to recover from crashed workers Orchestration & Control proposed
  39. Abstracted Code Representation for Review Shows reviewers pseudocode, intent summaries, and logical diffs of code changes, with drill-down to the real code to confirm the mapping UX & Collaboration proposed
  40. Action Caching & Replay Pattern Records each agent action with XPath and frame metadata so later runs replay it without LLM calls, with LLM fallback when replay fails Reliability & Eval emerging
  41. Action-Selector Pattern LLM maps user intent to a pre-approved action ID with schema-validated parameters, and tool outputs never return to the selector Orchestration & Control emerging
  42. Adaptive Sandbox Fan-Out Controller Starts a small batch of parallel sandboxes, then scales up, stops early, or refines the prompt based on early success, variance, and error signals Reliability & Eval proposed
  43. Agent Circuit Breaker Prevents agents from wasting tokens and time on repeatedly failing tools by tracking failure rates and temporarily disabling broken tool endpoints Reliability & Eval emerging
  44. Agent Modes by Model Personality Offers separate working modes, each with its own prompts, tools, UI, and expectations, tuned to one model's working style Orchestration & Control emerging
  45. Agent Reinforcement Fine-Tuning (Agent RFT) Trains model weights with reinforcement learning on real tool calls and custom graders to improve domain-specific tool use and multi-step reasoning Learning & Adaptation emerging
  46. Agent SDK for Programmatic Control Exposes agent functions through an SDK and CLI so code can run the agent headless with set tools, permissions, and resource limits Tool Use & Environment production
  47. Agent-Assisted Scaffolding Agent generates initial files, boilerplate, and directory structure from a high-level description so developers start on core logic UX & Collaboration production
  48. Agent-Friendly Workflow Design Gives agents clear high-level goals, room for implementation choices, structured I/O, and plan review before execution UX & Collaboration emerging
  49. Agent-Powered Codebase Q&A / Onboarding Agent indexes the codebase with embeddings and code graphs and answers natural-language questions about where code is and how it behaves Context & Memory production
  50. AI-Assisted Code Review / Verification Uses AI tools to flag issues, summarize change intent, and explain code so human reviewers focus on intent and business logic Feedback Loops production
  51. Anti-Reward-Hacking Grader Design Design reward functions with multi-criteria evaluation and iterative hardening to prevent models from gaming graders, ensuring training rewards align with actual task quality. Reliability & Eval emerging
  52. Asynchronous Coding Agent Pipeline Splits inference, tool execution, reward modeling, and learning into asynchronous workers linked by message queues so GPUs stay busy Reliability & Eval emerging
  53. Autonomous Workflow Agent Architecture Runs multi-step engineering workflows in containers with tmux sessions, sleep-based monitoring, checkpoints, and context-aware error recovery Orchestration & Control proposed
  54. Background Agent with CI Feedback Runs the agent in the background on its own branch and uses CI results as feedback to patch failures until green or blocked Feedback Loops production
  55. Black-Box Skill Invocation Shares skills through input and output schemas only and runs them on the provider side, so prompts and code never cross the boundary Security & Safety proposed
  56. Board-Mediated Async Inter-Agent Coordination Routes agent-to-agent messages through comment threads on board cards, with a prefix that creates an inbox card to notify the target agent Orchestration & Control emerging
  57. Budget-Aware Model Routing with Hard Cost Caps Routes each request to the cheapest model that meets its needs under hard cost caps, and escalates only when quality gates fail Orchestration & Control emerging
  58. Canary Rollout and Automatic Rollback for Agent Policy Changes Ships agent policy changes to a small traffic slice first, monitors guardrail metrics, and rolls back to the last stable version automatically Reliability & Eval emerging
  59. Capability-Escrow-Receipt Binds a signed capability listing, an atomic escrow-plus-hire step, and a signed work receipt into one loop for agent-to-agent payment Orchestration & Control proposed
  60. Chain-of-Thought Monitoring & Interruption Streams agent reasoning and tool calls in real time so a human can interrupt and redirect early when the approach is wrong UX & Collaboration emerging
  61. CLI-Native Agent Orchestration Drives agents through their non-interactive CLI mode (claude -p with JSON output and exit codes) so Makefiles, Git hooks, cron jobs, and CI can script and replay agent runs Tool Use & Environment emerging
  62. Codebase Optimization for Agents Optimizes tooling, CLIs, tests, and docs for agents first, with one-command verify loops and machine-readable output, even if human DX regresses UX & Collaboration emerging
  63. Commitment Ledger with Reality-Gated Credit Records agent promises and credits retrieved memory only after an externally verifiable outcome settles. Learning & Adaptation proposed
  64. Compounding Engineering Pattern After each feature, codifies agent mistakes and learnings into CLAUDE.md, slash commands, subagents, and hooks so the next feature is easier to build Learning & Adaptation emerging
  65. Conditional Parallel Tool Execution Runs a batch of tool calls in parallel when all are read-only and in sequence when any modifies state, then returns results in request order Orchestration & Control foundational
  66. Consequence-Family Coverage Audit Audit an agent's risk policy by enumerating families of consequence and asking which rule covers each, because a hand-written risk list reliably encodes one family and stays silent on the rest Security & Safety proposed
  67. Context Window Anxiety Management Enables a large context window but caps usage lower, and adds prompts that state the token budget so the model does not rush to finish Context & Memory emerging
  68. Context Window Auto-Compaction Catches context overflow errors, compacts and validates the transcript with capped reserve headroom, and retries the request automatically Context & Memory foundational
  69. Continuous Autonomous Task Loop Pattern Runs a loop where subagents pick the next task from a todo file, execute it in fresh context, commit it, and back off on rate limits Orchestration & Control production
  70. CriticGPT-Style Code Review Runs a specialized critic model over generated code to find bugs, security flaws, and quality issues, and feeds critical findings back for regeneration Reliability & Eval emerging
  71. Cross-Agent Lesson Sharing via Git Agents write solved problems as markdown lessons in a shared Git repo and search them before debugging, with GitHub Issues as the coordination layer Context & Memory proposed
  72. Cross-Cycle Consensus Relay Each loop cycle reads a structured relay document, does its work, and atomically writes back decisions, open questions, and the single next action Orchestration & Control proposed
  73. Cross-Domain Agent Conflict Resolution A coordination layer that cross-references recommendations from independent domain agents, detects conflicts on shared resources, and resolves them through policy-as-code. Orchestration & Control proposed
  74. Cryptographic Governance Audit Trail Middleware checks each tool call against a policy file, then signs a receipt of the action with ML-DSA and appends it to a tamper-evident chain Security & Safety emerging
  75. Custom Sandboxed Background Agent Builds an in-house background coding agent that runs in sandboxed dev environments, streams progress over WebSocket, and iterates on compiler and test feedback Orchestration & Control emerging
  76. Declarative Multi-Agent Topology Definition Define multi-agent systems declaratively in a single topology file — agents, flows, gates, hooks, group chats — then compile to platform-specific configurations for any agentic framework. Orchestration & Control proposed
  77. Denial Tracking & Permission Escalation Track repeated tool denials and auto-escalate to blanket permission prompts or fallback strategies, preventing wasted iterations in non-interactive contexts. Security & Safety proposed
  78. Deterministic Security Scanning Build Loop Adds SAST, SCA, and secret scanners to the build target that the agent must run after each change, so scanner failures force the agent to fix the code Security & Safety proposed
  79. Deterministic Threat Rule Scanning Apply deterministic regex rules as a first-pass security layer to detect known threat patterns in AI agent tool calls and skill definitions. Security & Safety proposed
  80. Deterministic Zero-LLM Orchestration A deterministic code orchestrator splits goals, runs parallel coding agents, verifies with tests, and commits, spending LLM tokens only on the one-time goal decomposition Orchestration & Control proposed
  81. Discrete Phase Separation Splits work into separate research, planning, and implementation conversations, each with fresh context, passing only distilled outputs between phases Orchestration & Control emerging
  82. Distributed Execution with Cloud Workers Runs many agent sessions in parallel on cloud workers, each in its own git worktree, with dependency-aware scheduling, merge coordination, and approval gates Orchestration & Control emerging
  83. Extended Coherence Work Sessions Combines models with long coherence windows with context compaction, prompt caching, and persisted state so agents stay on task for hours Reliability & Eval emerging
  84. Factory over Assistant Spawns several autonomous agents in parallel with automated feedback loops such as tests and builds, and checks on them later instead of watching one agent Orchestration & Control production
  85. Failover-Aware Model Fallback Classifies each model failure by reason and falls back along a model chain only for retryable errors, failing fast on auth, billing, and user aborts Reliability & Eval production
  86. Feature List as Immutable Contract Defines every feature up front in a JSON list with acceptance steps; the agent may only flip a feature to passing after it verifies it Orchestration & Control emerging
  87. Filesystem-Based Agent State Agents persist intermediate results and working state to files, creating durable checkpoints that enable workflow resumption, recovery from failures, and support for long-running tasks. Context & Memory foundational
  88. Filesystem-Mediated Host Delegation Lets a sandboxed agent write request files to a shared spool directory that a host daemon runs against a whitelist, with idempotent results the agent polls for Tool Use & Environment proposed
  89. Graph of Thoughts (GoT) Represents reasoning as a directed graph of thoughts so the model can branch, aggregate, refine, and revisit reasoning paths Feedback Loops emerging
  90. Hook-Based Safety Guard Rails for Autonomous Code Agents Runs small shell scripts on PreToolUse and PostToolUse hooks to block destructive commands, lint edits, and warn on context use outside the agent's reasoning Security & Safety foundational
  91. Hybrid LLM/Code Workflow Coordinator Lets each workflow pick an LLM or a code script as its coordinator, so teams prototype with the LLM and move to reviewed code when determinism matters Orchestration & Control proposed
  92. Incident-to-Eval Synthesis Converts each production incident into executable eval cases with pass/fail criteria and gates future releases on them Feedback Loops proposed
  93. Inference-Healed Code Review Reward Replaces a binary tests-passed reward with a critic that scores correctness, style, performance, and security, explains low scores, and combines them Feedback Loops proposed
  94. Inference-Time Scaling Spends extra compute at inference time with best-of-N sampling, longer reasoning, self-refinement, search, and verification to improve output quality Orchestration & Control production
  95. Initializer-Maintainer Dual Agent Architecture Uses a one-time initializer agent to create the feature list, progress files, and bootstrap script, then a coding agent that resumes from them one feature per session Orchestration & Control emerging
  96. Intelligent Bash Tool Execution Runs agent shell commands through a multi-mode executor that uses a PTY when needed, falls back to direct exec, and manages approvals, background jobs, and signals Tool Use & Environment production
  97. Inversion of Control Gives the agent tools, a high-level objective, and guardrails, then lets it choose sequencing and recovery while humans set policy and review Orchestration & Control production
  98. Iterative Multi-Agent Brainstorming Spawns several agents in parallel on the same problem, often with different perspectives, then merges their ideas into one set of options Orchestration & Control emerging
  99. Iterative Prompt & Skill Refinement Combines a feedback channel, editable prompt documents, log-driven skill fixes, and usage dashboards to improve agent prompts and skills continuously Feedback Loops emerging
  100. Lane-Based Execution Queueing Routes work into named lanes, each with its own queue and concurrency limit, so sessions never interleave and background jobs never block users Orchestration & Control emerging
  101. Language Agent Tree Search (LATS) Runs Monte Carlo Tree Search over reasoning steps, with the LLM generating candidate actions and scoring partial solutions to pick the best path Orchestration & Control emerging
  102. Layered Configuration Context Loads context files from enterprise, user, project, and local levels automatically and merges them into the agent's baseline context Context & Memory production
  103. Lethal Trifecta Threat Model Classifies each tool by private-data access, untrusted-content exposure, and external communication, and blocks any execution path that has all three Security & Safety foundational
  104. LLM Observability Sends agent runs to an LLM observability platform for span-level traces of each LLM call and tool use, plus aggregate cost, latency, and success metrics Reliability & Eval production
  105. LLM-Friendly API Design Designs APIs with visible versions, self-descriptive names and schemas, simple calls, actionable errors, and few indirection levels so LLMs call them correctly Tool Use & Environment emerging
  106. Local-First Credential Broker Keep raw secrets out of the agent process by injecting credentials at the network layer through a local broker, rather than handing the agent environment variables or config files. Security & Safety emerging
  107. Markdown Polis — Multi-Vendor Agent Coordination via Filesystem Constitution Coordinates agents from different vendors through versioned markdown files: capability cards, work contracts, and bandit routing that learns from settled work Orchestration & Control proposed
  108. MCP Pattern Injection Runs an MCP server that exposes framework best-practice patterns as tools, so the coding assistant fetches current patterns on demand Tool Use & Environment emerging
  109. Memory Reinforcement Learning (MemRL) Stores memories with learned utility scores, retrieves by similarity then re-ranks by utility, and updates scores from outcomes while the LLM stays frozen Learning & Adaptation proposed
  110. Memory Synthesis from Execution Logs Has the agent write a structured diary per task, then runs synthesis agents over many diaries to turn recurring patterns into rules, commands, and tests Context & Memory emerging
  111. Merged Code + Language Skill Model Fine-tunes separate language and code specialists from the same base model, then merges their weights into one model instead of one large joint training run Learning & Adaptation emerging
  112. Multi-Platform Communication Aggregation Queries every communication platform in parallel through adapters that share one schema, then merges, deduplicates, and ranks the results Tool Use & Environment proposed
  113. Multi-Platform Webhook Triggers Starts agent workflows from Slack, Notion, and Jira webhooks, emoji reactions, and schedules, with idempotency and signature checks on each event Tool Use & Environment emerging
  114. Non-Custodial Spending Controls Puts a policy layer between the agent and the transaction signer that checks each intent against allowlists, budgets, and rate limits, and fails closed Security & Safety emerging
  115. One OS User per Agent Give each long-lived agent its own OS user account and a templated init-system unit, so identity, supervision and privilege come from the host instead of from a per-agent container. Security & Safety emerging
  116. Opponent Processor / Multi-Agent Debate Pattern Spawns agents with opposing roles on the same context, lets them critique each other, then synthesizes their positions to expose bias and blind spots Orchestration & Control emerging
  117. Oracle and Worker Multi-Model Approach Uses a fast, low-cost worker model for most tool use and code generation, and lets it consult an expensive oracle model when it is stuck Orchestration & Control emerging
  118. Out-of-Process Provider-Boundary Replay Capture an agent run at the model-provider HTTP boundary from outside the process, then serve those bytes back so the agent re-executes its own logic with no provider call. Reliability & Eval emerging
  119. Output Verification Loop Verify LLM outputs by extracting individual claims, checking each against evidence sources, and returning per-claim trust scores before acting on the result. Reliability & Eval emerging
  120. Parallel Tool Call Learning Uses agent reinforcement fine-tuning to teach the model to issue independent tool calls in parallel, which cuts sequential rounds and latency Orchestration & Control emerging
  121. PII Tokenization Replaces PII in tool results with placeholder tokens before the model sees them and restores the real values in outgoing tool calls Security & Safety production
  122. Plan-Then-Execute Pattern Has the LLM fix the full sequence of tool calls before it reads untrusted data, then runs that sequence so tool outputs change only parameters Orchestration & Control production
  123. Planner-Worker Separation for Long-Running Agents Splits agents into planners that create tasks, workers that complete them in isolation, and a judge that decides each cycle whether to continue Orchestration & Control emerging
  124. Policy-Gated Tool Proxy Insert a transparent proxy between agents and tool servers that evaluates every tool call against a policy engine before forwarding, producing an immutable audit trail of all decisions. Security & Safety emerging
  125. Proactive Agent State Externalization Gives agents note templates, completeness checks, and an external memory fallback so self-written notes keep objectives, decisions, and knowledge gaps Context & Memory emerging
  126. Proactive Trigger Vocabulary Gives each skill an explicit, documented list of trigger phrases and patterns so input routes to skills predictably, with optional proactive activation UX & Collaboration proposed
  127. Progressive Complexity Escalation Deploys agents on low-complexity, high-reliability tasks first and unlocks higher capability tiers when metrics and human review gates show proven reliability Orchestration & Control emerging
  128. Progressive Disclosure for Large Files Puts only file metadata in the prompt and gives the agent load, peek, and extract tools to pull file content into context on demand Context & Memory emerging
  129. Prompt Caching via Exact Prefix Preservation Keeps static prompt content first in a fixed order and only appends new messages, including config changes, so each request reuses the cached prefix Context & Memory foundational
  130. Reasoning-Token Firewall Assemble an agent's result only from answer-typed stream events, never by string-stripping interleaved reasoning tokens. Reliability & Eval proposed
  131. Recursive Best-of-N Delegation Runs several parallel candidate workers per subtask in a recursive agent tree, scores them with tests and a judge, and promotes the best result upward Orchestration & Control proposed
  132. Reliability Problem Map Checklist for RAG and Agents Runs a fixed 16-question failure checklist on each RAG or agent incident, maps the result to repair actions, and re-tests the same failing case Reliability & Eval proposed
  133. Rich Feedback Loops > Perfect Prompts Returns compiler errors, test failures, lint output, and human feedback to the agent after each tool call so it can plan fixes and self-correct Feedback Loops foundational
  134. RLAIF (Reinforcement Learning from AI Feedback) Uses an AI model guided by written principles to critique outputs and label preferences, which train a reward model that optimizes the policy Reliability & Eval production
  135. Sandboxed Tool Authorization Filters an agent's tools through deny-first allow and deny patterns, profile presets, and subagent policies that inherit parent restrictions Security & Safety foundational
  136. Schema Validation Retry with Cross-Step Learning Retries failed structured outputs with the validation errors as feedback and adds recent errors from earlier steps to later prompts so mistakes do not repeat Reliability & Eval emerging
  137. Schema-Guided Graph Retrieval for Multi-Hop Reasoning Use one shared domain schema to align graph construction, schema evolution, query decomposition, and typed retrieval so multi-hop reasoning over private knowledge stays precise as domains change. Context & Memory emerging
  138. Seamless Background-to-Foreground Handoff Lets a user take over a background agent's unfinished work in the foreground, with the agent's branch, PR, and summaries carried over as context UX & Collaboration emerging
  139. Self-Critique Evaluator Loop Trains a judge model on its own synthetic comparisons of candidate outputs and uses it as a reward model or quality gate for the main agent Feedback Loops emerging
  140. Self-Discover: LLM Self-Composed Reasoning Structures Has the LLM select, adapt, and compose reasoning modules into a task-specific reasoning structure, then solve the task by following that structure Learning & Adaptation emerging
  141. Self-Identity Accumulation Injects a persistent identity document at session start and updates it with new user insights at session end through lifecycle hooks Context & Memory emerging
  142. Self-Rewriting Meta-Prompt Loop Has the agent reflect after each episode, draft edits to its own system prompt, validate them through guardrails, and save the new version Orchestration & Control proposed
  143. Semantic Context Filtering Pattern Extracts only the semantic or interactive parts of raw data, such as accessibility trees or relevant fields, before sending it to the LLM Context & Memory emerging
  144. Session-Scoped Context Runtime for Agent Tools Interpose a context runtime that caches structured reads and normalizes tool output so sessions reuse compact representations instead of repeating raw tokens. Context & Memory proposed
  145. Shell Command Contextualization Lets the user run a shell command with a prefix such as ! and injects the command and its full output into the agent's context UX & Collaboration production
  146. Signal-Driven Agent Activation Watches external sources for structured signals and starts predefined agent workflows when declarative rules with thresholds and cooldowns match Orchestration & Control emerging
  147. Skill Library Evolution Saves working agent code as reusable skills in a skills directory, documents and tests them over time, and loads skill details only on demand Learning & Adaptation production
  148. Soulbound Identity Verification Binds agent identity to a non-transferable credential with a committed state hash and logs signed state changes so verifiers can check continuity Security & Safety proposed
  149. Spectrum of Control / Blended Initiative Gives users several autonomy modes, from inline completion to background agents, and lets them switch modes per task UX & Collaboration production
  150. Static Service Manifest for Agents Serves a static llms.txt or agent.json file at a well-known URL that lists services, auth, and limits so agents can plan before they call Tool Use & Environment emerging
  151. Stop Hook Auto-Continue Pattern Runs a stop hook after each agent turn that checks success criteria and makes the agent continue until tests or checks pass Orchestration & Control emerging
  152. Structured Output Specification Constrain agent outputs using deterministic schemas that enforce structured, machine-readable results, enabling reliable validation, parsing, and integration with downstream systems. Reliability & Eval foundational
  153. Sub-Agent Spawning Lets the main agent spawn sub-agents with fresh context and scoped tools to work on subtasks in parallel, then merges their results Orchestration & Control foundational
  154. Subagent Compilation Checker Spawns one subagent per module to build and check it, and returns only a short structured error list or artifact reference to the main agent Reliability & Eval proposed
  155. Subject Hygiene for Task Delegation Requires a specific action-plus-target subject on every subagent task so each delegated job stays traceable and easy to reference Orchestration & Control proposed
  156. Swarm Migration Pattern Main agent orchestrates 10+ parallel subagents working simultaneously on independent migration chunks for large-scale framework upgrades, lint rule rollouts, and API migrations. Orchestration & Control production
  157. Team-Shared Agent Configuration as Code Check agent configuration into version control as code, enabling consistent behavior across teams, faster onboarding, and collaborative improvement through PRs and code review. UX & Collaboration production
  158. Three-Stage Perception Architecture Splits the agent into separate perception, processing, and action stages so each stage can be built, tested, and scaled on its own Orchestration & Control emerging
  159. Tool Capability Compartmentalization Splits tools into reader, processor, and writer classes with scoped permissions and blocks tool chains that combine private data, untrusted input, and external writes Orchestration & Control emerging
  160. Tool Use Incentivization via Reward Shaping Gives dense RL rewards for useful intermediate tool calls such as compile, lint, and test so the agent learns to use tools instead of only thinking Feedback Loops emerging
  161. Transitive Vouch-Chain Trust Builds a graph of signed vouches between agents and derives trust in an unknown agent from the chain back to a trusted one, with decay at each hop Security & Safety proposed
  162. Tree-of-Thought Reasoning Expands a tree of candidate reasoning steps, scores partial states, prunes weak branches, and picks the best path instead of one linear chain Orchestration & Control emerging
  163. Unified Tool Gateway Route all agent tool calls through a single gateway that handles discovery, authentication, billing, and execution across many heterogeneous providers. Tool Use & Environment production
  164. Variance-Based RL Sample Selection Runs the base model several times per sample and trains RL only on samples with score variance, skipping ones that are always right or always wrong Learning & Adaptation emerging
  165. Verbose Reasoning Transparency Lets users open a verbose view on demand that shows the agent's interpretation, tool choices, intermediate steps, and raw tool outputs UX & Collaboration production
  166. Virtual Machine Operator Agent Gives the agent a dedicated virtual machine where it can run code, install packages, use the file system, and operate CLI tools Tool Use & Environment production
  167. Visual AI Multimodal Integration Adds multimodal models to the agent so it can analyze images, video, and screenshots and combine them with text to reason and act Tool Use & Environment production
  168. Workflow Evals with Mocked Tools Runs complete agent workflows against mocked tools in CI and checks which tools were called plus agent-as-judge quality criteria Reliability & Eval production
  169. Working Memory via Task Tracking Keeps an explicit task list with status, blockers, and next steps during the session so agent and user can track progress Context & Memory emerging
  170. Workspace-Native Multi-Agent Orchestration Runs agents inside the team's workspace platform so they share its memory, knowledge sources, event triggers, and integrations with humans Orchestration & Control proposed
  171. Zero-Knowledge Verified Agent Egress Intercepts each outbound HTTP or MCP call, proves its claims against a private source of truth with a zero-knowledge proof, and blocks calls that fail Security & Safety proposed
  172. Zero-Trust Agent Mesh Gives each agent a cryptographic identity and verifies identity, signed delegation tokens, and chain depth on every inter-agent request Security & Safety emerging
  173. Judge-Gated Finding Exchange Between Parallel Sub-Agents Puts an append-only board between parallel sub-agents and lets a small judge decide what goes on it, who receives each note, and when a later note retracts an earlier one Orchestration & Control proposed
  174. Surface-Scoped System Prompt Ships one system prompt per invocation surface and selects it at launch, so an interactive session, a headless run and a task mode each get instructions written for that surface Context & Memory emerging
  175. 402-First Machine Payments (Price-Before-Work Tool Purchases) Server returns an HTTP 402 price quote before doing work, and the agent pays the exact amount only if it fits its budget cap Orchestration & Control emerging
  176. Classify-Then-Act for Background Agents Sorts each task into has-default, needs-intent, or out-of-scope, builds only has-default work in a sandbox, and queues it for human review Orchestration & Control emerging
  177. Design-Time File Partition as Concurrency Control Each task declares every path it will write; overlapping tasks get a blocking dependency so only disjoint work runs at once on a shared checkout Orchestration & Control proposed
  178. Evidence Questions, Not Verdict Questions Never ask the model for allow/ask/block. Ask it narrow, typed, observational questions and let code reduce the answers to the verdict, because the collapsed question is the low-confidence one. Security & Safety proposed
  179. Non-Generative Judgment Routing with Typed Escalation Sends decision-only loop steps as batched typed questions to a non-generative judgment model and escalates what it cannot answer back to the LLM Orchestration & Control proposed
  180. Precomputed Code Graph Lookup Answer an agent's structural code questions from a precomputed, deterministic graph queried by intent-shaped verbs, instead of a retrieval-time search-and-read loop. Tool Use & Environment proposed
  181. Skill Activation as a Precision/Recall Measurement Measures skill routing as classification with a labelled prompt dataset, per-skill precision and recall, and CI thresholds that fail the build Reliability & Eval emerging
  182. Tier Auto-Apply by Mechanical Impact Decides which self-proposed changes auto-apply by matching the real diff's file paths and change kinds against a trusted tier table, not by finding text Reliability & Eval proposed
  183. Deterministic Grader in the Loop Replace the LLM-as-judge in an agent's self-review loop with a deterministic scorer that returns the raw counts behind each sub-score, so the agent has something specific to fix. Feedback Loops proposed
  184. Dual-Rail Message Delivery Sends every inter-agent message on two independent channels through one entry point, alerts when the rails diverge, and requires ACKs to confirm completion Orchestration & Control emerging
  185. Evidence-Layered Evaluation for Interactive Agents Scores interactive agent runs on a task outcome assertion and links each result to layered evidence: actions, screenshots, replays, network, and messages Reliability & Eval emerging
  186. Own-Check Fault Injection Plant a controlled fault inside a running agent pipeline and score whether the pipeline's own checks emit a detection act, keeping detected, reacted and recovered as separate verdicts. Reliability & Eval emerging
  187. Rendered UI Finish Gate Verify an agent-built interface against its intended design contract, required states, interaction semantics, and rendered output before merging. Feedback Loops proposed
  188. Persistent Test Memory Feedback Loop Preserve validated test lessons so an agent can reuse successful paths, recognize recurring failures, and retire stale knowledge. Learning & Adaptation proposed
  189. Tracker-as-Desired-State Reconciliation Derive agent dispatch by re-reading workflow states in the team's issue tracker every tick, keeping only a short-lived claim locally, so missed events, restarts, and human edits all self-heal. Orchestration & Control emerging
  190. Authenticated Authority Channel Preserve a distinguishable channel for authenticated intent so retrieved content can inform reasoning without granting itself authority. Security & Safety emerging
  191. Artifact-Driven Analysis Pipeline Orchestration Has an agent run independent analysis scripts, read their structured reports, and merge them into one final report or visualization Orchestration & Control proposed
  192. Context Budget as a Governed Resource Measures always-loaded context per source, alerts on trend growth, and puts hard spend caps and fan-out bounds on unattended agent runs Context & Memory emerging
  193. Dead-Man's Switch for Scheduled Agent Jobs Each scheduled job writes a success sentinel to its log, and a separate checker files a task when the sentinel is missing or stale Reliability & Eval emerging
  194. Orchestration Prompt-Writing Benchmark Scores an orchestrator on whether its sub-agent prompts give the right information fragments to the right roles, separate from end-task success Reliability & Eval proposed
  195. Context-Minimization Pattern Removes untrusted user text and tool output from context after it becomes a safe structured artifact, so later steps see only trusted data Context & Memory foundational
  196. Multi-Model Orchestration for Complex Edits Splits complex code edits across specialized models: a retrieval model gathers context, a large model writes the changes, and smaller models apply them Orchestration & Control emerging
  197. Agentic Search Over Vector Embeddings Replaces vector indexes with agent-driven grep, find, and file traversal that searches current file state on demand and refines iteratively Tool Use & Environment emerging