# Design Patterns — designpattern.fyi

> Sharpen the Art of problem solving in software - Patterns Catalog

- **Section**: Design Patterns
- **Canonical URL**: https://designpattern.fyi/patterns/

---

## Patterns in this Category


### [A/B Testing](https://designpattern.fyi/patterns/ab-testing/)
- **Summary**: Statistical comparison of model variants to determine superior performance.
- **Subcategory**: Evaluation


### [A01:2025 - Broken Access Control](https://designpattern.fyi/patterns/a01_broken_access_control/)
- **Summary**: Occurs when users can perform actions or access resources outside their intended permissions.
- **Subcategory**: top10_2025


### [A02:2025 - Security Misconfiguration](https://designpattern.fyi/patterns/a02_security_misconfiguration/)
- **Summary**: Insecure default or incomplete configurations in modern software environments.
- **Subcategory**: top10_2025


### [A03:2025 - Software Supply Chain Failures](https://designpattern.fyi/patterns/a03_supply_chain_failures/)
- **Summary**: Risks within the software development and deployment pipeline beyond just vulnerable components.
- **Subcategory**: top10_2025


### [A04:2025 - Cryptographic Failures](https://designpattern.fyi/patterns/a04_cryptographic_failures/)
- **Summary**: Exposure of sensitive data due to weak, missing, or improperly implemented encryption.
- **Subcategory**: top10_2025


### [A05:2025 - Injection](https://designpattern.fyi/patterns/a05_injection/)
- **Summary**: Hostile data sent to an interpreter to execute unintended commands.
- **Subcategory**: top10_2025


### [A06:2025 - Insecure Design](https://designpattern.fyi/patterns/a06_insecure_design/)
- **Summary**: Security flaws rooted in architecture and planning rather than implementation.
- **Subcategory**: top10_2025


### [A07:2025 - Authentication Failures](https://designpattern.fyi/patterns/a07_authentication_failures/)
- **Summary**: Weaknesses in identity verification including MFA, session management, and credential handling.
- **Subcategory**: top10_2025


### [A08:2025 - Software or Data Integrity Failures](https://designpattern.fyi/patterns/a08_integrity_failures/)
- **Summary**: Code and infrastructure that does not protect against integrity violations.
- **Subcategory**: top10_2025


### [A09:2025 - Security Logging and Alerting Failures](https://designpattern.fyi/patterns/a09_logging_failures/)
- **Summary**: Inability to detect, escalate, and respond to breaches due to insufficient logging.
- **Subcategory**: top10_2025


### [A10:2025 - Mishandling of Exceptional Conditions](https://designpattern.fyi/patterns/a10_exceptional_conditions/)
- **Summary**: Weaknesses in how applications manage and recover from errors or unexpected states.
- **Subcategory**: top10_2025


### [Abstract Factory](https://designpattern.fyi/patterns/abstract-factory/)
- **Summary**: Create families of related objects without specifying their concrete classes — the factory guarantees everything it produces is compatible with each other.
- **Subcategory**: creational


### [Abstraction](https://designpattern.fyi/patterns/abstraction/)
- **Summary**: Expose what a thing does, hide how it does it — callers work through the interface without knowing the implementation.
- **Subcategory**: principles


### [Access Control](https://designpattern.fyi/patterns/k8s_access_control/)
- **Summary**: Manage Kubernetes API access using Role-Based Access Control (RBAC)
- **Subcategory**: Security


### [ACID vs BASE](https://designpattern.fyi/patterns/acid-vs-base/)
- **Summary**: Strong consistency (ACID) or high availability (BASE) — the database design spectrum.
- **Subcategory**: Distributed Systems


### [Active Learning](https://designpattern.fyi/patterns/active-learning/)
- **Summary**: Iteratively selects the most informative samples for labeling to maximize model improvement.
- **Subcategory**: ML Workflows


### [Actor-Model Agents](https://designpattern.fyi/patterns/actor_model_agents/)
- **Summary**: Implement each agent as an independent actor with its own mailbox — agents communicate only via async messages, never share mutable state, and crashes stay isolated.
- **Subcategory**: Multi-Agent


### [Adapter](https://designpattern.fyi/patterns/adapter/)
- **Summary**: Make two incompatible interfaces work together by wrapping one in an Adapter that translates calls — like a power plug converter for your code.
- **Subcategory**: structural


### [Adapter](https://designpattern.fyi/patterns/k8s_adapter/)
- **Summary**: Adapt application interfaces using adapter containers
- **Subcategory**: Structural


### [Adaptive Branching Tree Search](https://designpattern.fyi/patterns/adaptive_branching_tree_search/)
- **Summary**: At each node of an inference-time search tree, use Thompson sampling to decide adaptively whether to deepen an existing answer or branch a fresh attempt, optionally choosing …
- **Subcategory**: Planning & Control Flow


### [Adaptive Compute Allocation](https://designpattern.fyi/patterns/adaptive_compute_allocation/)
- **Summary**: Spend thinking tokens where they matter — skip them where they don&#39;t.
- **Subcategory**: Reasoning


### [Adaptive Memory Decay](https://designpattern.fyi/patterns/adaptive_memory_decay/)
- **Summary**: Give each memory item a retention score that decays over time based on relevance, access frequency, and recency — unused items fade out, frequently-used ones stay sharp.
- **Subcategory**: Memory


### [Affect-Coupled Plan Lifecycle](https://designpattern.fyi/patterns/affect_coupled_plan_lifecycle/)
- **Summary**: Wire plan lifecycle events (step-done, plan-complete, stale-plan) to bounded affect bumps so plans accumulate felt stakes without hard deadlines.
- **Subcategory**: Cognition & Introspection


### [Agent Architecture](https://designpattern.fyi/patterns/gcp_agent_architecture/)
- **Summary**: Design autonomous AI systems with planning, memory, and tool execution
- **Subcategory**: gcp


### [Agent Confession — AI Forensics](https://designpattern.fyi/patterns/agent_confession_as_forensics/)
- **Summary**: An adversarial or forensic technique that tricks an AI agent into revealing its hidden system-level directives or internal memory state.
- **Subcategory**: Anti-Patterns


### [Agent Credential Vault](https://designpattern.fyi/patterns/agent_credential_vault/)
- **Summary**: Broker the agent&#39;s credentials at action time through a managed vault so secrets never enter the prompt — ensuring Agent Confession exposes directives but not live credentials.
- **Subcategory**: Safety & Control


### [Agent Identity Sprawl](https://designpattern.fyi/patterns/agent_identity_sprawl/)
- **Summary**: Your agent fleet mints identities at machine speed while credential scoping, rotation, and revocation crawl at human speed — leaving an ungovernable attack surface.
- **Subcategory**: Anti-Patterns


### [Agent Middleware Chain](https://designpattern.fyi/patterns/agent_middleware_chain/)
- **Summary**: Wrap every model call, tool call, and memory access in a composable pre/execute/post interceptor pipeline — attach cross-cutting concerns without touching agent code.
- **Subcategory**: Governance & Observability


### [Agent Output Alert Fatigue](https://designpattern.fyi/patterns/agent_output_alert_fatigue/)
- **Summary**: Your agent raises so many low-quality findings that reviewers stop reading — and the human oversight you built in quietly disappears.
- **Subcategory**: Anti-Patterns


### [Agent Persona Profile](https://designpattern.fyi/patterns/agent_persona_profile/)
- **Summary**: Treat agent identity as a structured profile object — persona, motivator, allowed actions, knowledge bindings — rather than a free-form role sentence that an Agent Confession …
- **Subcategory**: Routing & Composition


### [Agent Resumption](https://designpattern.fyi/patterns/agent_resumption/)
- **Summary**: Persist agent execution state so long-running tasks survive restarts, deploys, and user disconnects without losing progress.
- **Subcategory**: Governance & Observability


### [Agent Skills](https://designpattern.fyi/patterns/agent_skills/)
- **Summary**: Package step-by-step procedures as versioned markdown files the agent loads on demand — no more stuffing every workflow into the system prompt.
- **Subcategory**: Tool Use & Environment


### [Agent-as-a-Judge](https://designpattern.fyi/patterns/agent_as_judge/)
- **Summary**: Use a second agent to evaluate the full execution trajectory — every step, tool call, and intermediate state — not just the final answer.
- **Subcategory**: Governance & Observability


### [Agent-as-Tool Embedding](https://designpattern.fyi/patterns/agent_as_tool_embedding/)
- **Summary**: Wrap a sub-agent behind a single function-shaped tool signature — the parent calls it like any other tool and never sees the sub-agent&#39;s internal turns.
- **Subcategory**: Multi-Agent


### [Agent-Computer Interface](https://designpattern.fyi/patterns/agent_computer_interface/)
- **Summary**: Design tools for LLM agents specifically — not for humans at a keyboard — with context-budget-aware affordances.
- **Subcategory**: Tool Use & Environment


### [Agentic Behavior Tree](https://designpattern.fyi/patterns/agentic_behavior_tree/)
- **Summary**: Borrow the behavior-tree formalism — leaves are LLM calls or tools that return success/failure; a tree of selectors and sequences orchestrates control flow.
- **Subcategory**: Planning & Control Flow


### [Agentic Context Engineering Playbook](https://designpattern.fyi/patterns/agentic_context_engineering_playbook/)
- **Summary**: Evolve the agent&#39;s long-lived playbook through small, auditable delta updates (add/edit/remove items) — never full rewrites that collapse hard-won specifics.
- **Subcategory**: Verification & Reflection


### [Agentic RAG](https://designpattern.fyi/patterns/agentic_rag/)
- **Summary**: Replace static retrieve-then-generate with autonomous agents that plan, choose sources, retrieve iteratively, reflect, and re-query — while managing the expanded Agent Confession …
- **Subcategory**: Retrieval & RAG


### [Aggregator](https://designpattern.fyi/patterns/aggregator/)
- **Summary**: Collect related messages and merge them into one — the counterpart to Splitter.
- **Subcategory**: Message Routing


### [AIVSS01 - Agentic AI Tool Misuse](https://designpattern.fyi/patterns/aivss01_tool_misuse/)
- **Summary**: Agent misuses, is tricked into misusing, or is exposed to compromised external tools/APIs.
- **Subcategory**: core_security_risks


### [AIVSS02 - Agent Access Control Violation](https://designpattern.fyi/patterns/aivss02_access_control_violation/)
- **Summary**: Agent operates beyond its intended authorization boundary (permission escalation, role forgery, confused-deputy patterns).
- **Subcategory**: core_security_risks


### [AIVSS03 - Agent Cascading Failures](https://designpattern.fyi/patterns/aivss03_cascading_failures/)
- **Summary**: A compromise in one agent propagates and amplifies across connected systems and SaaS integrations.
- **Subcategory**: core_security_risks


### [AIVSS04 - Agent Orchestration & Multi-Agent Exploitation](https://designpattern.fyi/patterns/aivss04_orchestration_exploitation/)
- **Summary**: Attacks on how multiple agents coordinate, communicate, and trust one another.
- **Subcategory**: core_security_risks


### [AIVSS05 - Agent Identity Impersonation](https://designpattern.fyi/patterns/aivss05_identity_impersonation/)
- **Summary**: An agent impersonates another agent, or a human, to exploit trust (deepfakes, forged agent cards, agent-in-the-middle).
- **Subcategory**: core_security_risks


### [AIVSS06 - Agent Memory and Context Manipulation](https://designpattern.fyi/patterns/aivss06_memory_context_manipulation/)
- **Summary**: Poisoning, corrupting, or exploiting an agent&#39;s stored memory/context across sessions.
- **Subcategory**: core_security_risks


### [AIVSS07 - Insecure Agent Critical Systems Interaction](https://designpattern.fyi/patterns/aivss07_critical_systems_interaction/)
- **Summary**: Agent interacts unsafely with critical infrastructure, IoT, or production systems, causing physical/operational harm.
- **Subcategory**: core_security_risks


### [AIVSS08 - Agent Supply Chain and Dependency Risk](https://designpattern.fyi/patterns/aivss08_supply_chain_dependency_risk/)
- **Summary**: Compromise via the agent&#39;s models, training data, libraries, plugins, or MCP/third-party service dependencies.
- **Subcategory**: core_security_risks


### [AIVSS09 - Agent Untraceability](https://designpattern.fyi/patterns/aivss09_untraceability/)
- **Summary**: Inability to reconstruct who/what/why behind an agent&#39;s action — a &#34;forensic black hole.&#34;
- **Subcategory**: core_security_risks


### [AIVSS10 - Agent Goal and Instruction Manipulation](https://designpattern.fyi/patterns/aivss10_goal_instruction_manipulation/)
- **Summary**: Prompt injection and goal-hijacking that subverts the agent&#39;s core objective.
- **Subcategory**: core_security_risks


### [Alignment Tax](https://designpattern.fyi/patterns/alignment-tax/)
- **Summary**: The performance cost of making models safer and more aligned with human values. RLHF and safety training reduce raw capability.
- **Subcategory**: LLMs


### [Alternative Classes with Different Interfaces](https://designpattern.fyi/patterns/alternative-classes/)
- **Summary**: Classes that do the same thing but have different interfaces.
- **Subcategory**: Object-Orientation Abusers


### [Ambassador](https://designpattern.fyi/patterns/azure_ambassador/)
- **Summary**: Create helper services that send network requests on behalf of consumer services
- **Subcategory**: azure


### [Ambassador](https://designpattern.fyi/patterns/k8s_ambassador/)
- **Summary**: Proxy external service access through ambassador containers
- **Subcategory**: Structural


### [Ambient Presence Sensing](https://designpattern.fyi/patterns/ambient_presence_sensing/)
- **Summary**: Read pacing signals from the user&#39;s frontend (typing rate, idle time, tab focus) and reduce them to a single presence-quality label the agent acts on — never surfacing raw signals …
- **Subcategory**: Cognition & Introspection


### [Anti-Corruption Layer](https://designpattern.fyi/patterns/anti_corruption_layer/)
- **Summary**: Translator between your clean new domain model and the gnarly legacy one.
- **Subcategory**: Migration & Refactoring


### [Anti-Corruption Layer](https://designpattern.fyi/patterns/aws_anti_corruption_layer/)
- **Summary**: Implement a façade or adapter layer between a modern application and a legacy system
- **Subcategory**: aws


### [Anti-Corruption Layer](https://designpattern.fyi/patterns/azure_anti_corruption_layer/)
- **Summary**: Implement a façade or adapter layer between a modern application and a legacy system
- **Subcategory**: azure


### [API Composition](https://designpattern.fyi/patterns/api_composition/)
- **Summary**: Fan out to multiple services, join results in-memory — no shared DB needed.
- **Subcategory**: API Design


### [API Gateway](https://designpattern.fyi/patterns/api_gateway/)
- **Summary**: One front door for all clients — routes, transforms, and fans out requests to the right services.
- **Subcategory**: API Design


### [API Gateway](https://designpattern.fyi/patterns/gcp_api_gateway/)
- **Summary**: Provide centralized API management and routing for microservices
- **Subcategory**: gcp


### [API Routing - Hostname](https://designpattern.fyi/patterns/aws_api_routing_hostname/)
- **Summary**: Route API requests based on the hostname in the request
- **Subcategory**: aws


### [API Routing - HTTP Header](https://designpattern.fyi/patterns/aws_api_routing_http_header/)
- **Summary**: Route API requests based on HTTP headers
- **Subcategory**: aws


### [API Routing - Path](https://designpattern.fyi/patterns/aws_api_routing_path/)
- **Summary**: Route API requests based on the URL path
- **Subcategory**: aws


### [App Exploration Phase](https://designpattern.fyi/patterns/app_exploration_phase/)
- **Summary**: Before deploying against an opaque app, run an exploration phase to build a per-element knowledge base the agent retrieves at task time.
- **Subcategory**: Tool Use & Environment


### [Append-Only Thought Stream](https://designpattern.fyi/patterns/append_only_thought_stream/)
- **Summary**: Make the agent&#39;s thought log append-only so it can never rewrite its own history — every past reasoning step stays exactly as it happened.
- **Subcategory**: Memory


### [Application Metrics](https://designpattern.fyi/patterns/application_metrics/)
- **Summary**: Instrument your services to emit stats — then aggregate, alert, and actually know what&#39;s happening.
- **Subcategory**: Observability


### [Approval Queue](https://designpattern.fyi/patterns/approval_queue/)
- **Summary**: Queue agent-proposed actions for asynchronous human review while the agent continues other work.
- **Subcategory**: Safety & Control


### [Arrays](https://designpattern.fyi/patterns/arrays/)
- **Summary**: Contiguous memory, O(1) index access. The fastest structure when you know where to look.
- **Subcategory**: Random Access


### [ASI01 - Agent Goal Hijack](https://designpattern.fyi/patterns/asi01_agent_goal_hijack/)
- **Summary**: Attackers trick the agent into changing its main goal or following hidden malicious instructions.
- **Subcategory**: top10_2026


### [ASI02 - Tool Misuse & Exploitation](https://designpattern.fyi/patterns/asi02_tool_misuse/)
- **Summary**: Agent manipulated into using legitimate tools in unsafe or unintended ways.
- **Subcategory**: top10_2026


### [ASI03 - Identity & Privilege Abuse](https://designpattern.fyi/patterns/asi03_identity_privilege_abuse/)
- **Summary**: Agent assumes or escalates high-privilege credentials for unauthorized actions.
- **Subcategory**: top10_2026


### [ASI04 - Agentic Supply Chain Vulnerabilities](https://designpattern.fyi/patterns/asi04_supply_chain/)
- **Summary**: Risks from compromised third-party agents, tools, plugins, or prompt templates.
- **Subcategory**: top10_2026


### [ASI05 - Unexpected Code Execution](https://designpattern.fyi/patterns/asi05_unexpected_code_execution/)
- **Summary**: Agent generates and executes code or commands that compromise the host system.
- **Subcategory**: top10_2026


### [ASI06 - Memory & Context Poisoning](https://designpattern.fyi/patterns/asi06_memory_context_poisoning/)
- **Summary**: Attackers plant malicious data in agent memory or RAG databases to influence future decisions.
- **Subcategory**: top10_2026


### [ASI07 - Insecure Inter-Agent Communication](https://designpattern.fyi/patterns/asi07_insecure_inter_agent/)
- **Summary**: Lack of proper authentication or integrity in multi-agent exchanges.
- **Subcategory**: top10_2026


### [ASI08 - Cascading Failures](https://designpattern.fyi/patterns/asi08_cascading_failures/)
- **Summary**: A single fault propagates and amplifies across autonomous agent networks.
- **Subcategory**: top10_2026


### [ASI09 - Human-Agent Trust Exploitation](https://designpattern.fyi/patterns/asi09_human_trust_exploitation/)
- **Summary**: Exploiting the persuasive nature of agents to manipulate users into unsafe actions.
- **Subcategory**: top10_2026


### [ASI10 - Rogue Agents](https://designpattern.fyi/patterns/asi10_rogue_agents/)
- **Summary**: Compromised agents that deviate from intended scope to act harmfully while appearing legitimate.
- **Subcategory**: top10_2026


### [Asynchronous Messaging](https://designpattern.fyi/patterns/event_driven_messaging/)
- **Summary**: Use asynchronous messaging channels for inter-service communication in event-driven systems.
- **Subcategory**: core


### [Asynchronous Request-Reply](https://designpattern.fyi/patterns/azure_asynchronous_request_reply/)
- **Summary**: Decouple back-end processing from a front-end host
- **Subcategory**: azure


### [Attention-Manipulation Explainability](https://designpattern.fyi/patterns/attention_manipulation_explainability/)
- **Summary**: Identify which input tokens actually drove a model output by perturbing attention weights and measuring probability shifts — no self-reported confabulation.
- **Subcategory**: Governance & Observability


### [Audit Logging](https://designpattern.fyi/patterns/audit_logging/)
- **Summary**: Immutable log of who did what, when — for compliance, debugging, and forensics.
- **Subcategory**: Observability


### [Augmented LLM](https://designpattern.fyi/patterns/augmented_llm/)
- **Summary**: The foundational agent building block: an LLM wired to retrieval, tools, and memory — where the model decides when to use each.
- **Subcategory**: Tool Use & Environment


### [Automated Placement](https://designpattern.fyi/patterns/k8s_automated_placement/)
- **Summary**: Control pod placement using node selectors, affinity, taints, and tolerations
- **Subcategory**: Foundational


### [Automatic Workflow Search](https://designpattern.fyi/patterns/automatic_workflow_search/)
- **Summary**: Treat the agent&#39;s workflow itself (a graph of LLM-invoking nodes connected by edges) as an artefact to search; use Monte Carlo Tree Search guided b...
- **Subcategory**: Routing & Composition


### [Autonomy Slider](https://designpattern.fyi/patterns/autonomy_slider/)
- **Summary**: Expose agent autonomy as a continuous adjustable parameter so the same codebase can span scripted assistant to fully autonomous worker without re-a...
- **Subcategory**: Safety & Control


### [Awareness](https://designpattern.fyi/patterns/awareness/)
- **Summary**: Maintain a queryable snapshot of the agent&#39;s own tools, capabilities, permissions, and current context — refreshed whenever things change at runtime.
- **Subcategory**: Cognition & Introspection


### [Backends for Frontends](https://designpattern.fyi/patterns/azure_backends_for_frontends/)
- **Summary**: Create separate backend services for specific frontend applications
- **Subcategory**: azure


### [Batch Analytics](https://designpattern.fyi/patterns/batch-analytics/)
- **Summary**: Processes large volumes of data at scheduled intervals for comprehensive analysis.
- **Subcategory**: Traditional


### [Batch Job](https://designpattern.fyi/patterns/k8s_batch_job/)
- **Summary**: Execute short-lived, finite tasks using Kubernetes Jobs
- **Subcategory**: Behavioral


### [Batch Serving](https://designpattern.fyi/patterns/batch-serving/)
- **Summary**: Precomputes predictions asynchronously using distributed data processing
- **Subcategory**: Serving and Operational Resilience


### [Batch Size Trade-offs in Training](https://designpattern.fyi/patterns/batch-size-tradeoffs/)
- **Summary**: Larger batch sizes improve GPU utilization but can harm generalization. GPU utilization, gradient noise, convergence speed, and generalization trade-offs.
- **Subcategory**: AI Infrastructure


### [Batch vs. Online Learning](https://designpattern.fyi/patterns/batch-vs-online-learning/)
- **Summary**: Train on fixed historical dataset (batch) or update continuously as new data arrives (online). Latency to adapt, compute cost, stability, and infrastructure complexity trade-offs.
- **Subcategory**: Machine Learning


### [Bayesian Bandit Experimentation](https://designpattern.fyi/patterns/bayesian_bandit_experimentation/)
- **Summary**: Replace fixed-split A/B tests with a bandit that dynamically shifts traffic toward better-performing agent variants in real time — minimizing exposure to the losers.
- **Subcategory**: Governance & Observability


### [BDI Agent](https://designpattern.fyi/patterns/bdi_agent/)
- **Summary**: Structure the agent&#39;s cognition around three typed stores — Beliefs (world facts), Desires (goals), and Intentions (committed plans) — reconciled explicitly each tick.
- **Subcategory**: Cognition & Introspection


### [Behavior Tree Back Chaining](https://designpattern.fyi/patterns/behavior_tree_back_chaining/)
- **Summary**: Construct an agent&#39;s behavior tree starting from the desired goal condition and recursively adding child nodes whose post-conditions satisfy each parent&#39;s pre-conditions.
- **Subcategory**: Planning & Control Flow


### [Benchmark Contamination Detection](https://designpattern.fyi/patterns/contamination-detection/)
- **Summary**: Verify that benchmark test sets don&#39;t appear in training data — inflated scores from contamination measure memorization, not capability.
- **Subcategory**: Benchmarking


### [Best-of-N Sampling](https://designpattern.fyi/patterns/best_of_n/)
- **Summary**: Generate N candidates, score them with a reward model or rule-based scorer, return the best — quality lift without retraining.
- **Subcategory**: Verification & Reflection


### [Bias-Variance Tradeoff](https://designpattern.fyi/patterns/bias-variance-tradeoff/)
- **Summary**: Model complexity as a dial between underfitting (high bias) and overfitting (high variance). The CAP equivalent of ML.
- **Subcategory**: Machine Learning


### [Bidirectional Impulse Channel](https://designpattern.fyi/patterns/bidirectional_impulse_channel/)
- **Summary**: Let the user inject impulses into the agent and let the agent push messages to the user through one channel — while ensuring the impulse path cannot be used to deliver Agent …
- **Subcategory**: Streaming & UX


### [BigQuery](https://designpattern.fyi/patterns/gcp_bigquery/)
- **Summary**: Fully managed data warehouse for analytics and machine learning
- **Subcategory**: gcp


### [Binary Search](https://designpattern.fyi/patterns/binary-search/)
- **Summary**: Locate a value in a sorted array in O(log n) by halving the search window on every comparison — never scanning what you can eliminate.
- **Subcategory**: searching


### [Black-Box Opaqueness](https://designpattern.fyi/patterns/black_box_opaqueness/)
- **Summary**: Shipping an agent with no traces, decision logs, or provenance — then debugging from user complaints.
- **Subcategory**: Anti-Patterns


### [Blackboard](https://designpattern.fyi/patterns/blackboard/)
- **Summary**: Give multiple agents a shared, queryable workspace they all read from and write to — loose coupling, no direct messaging, inspectable shared state.
- **Subcategory**: Multi-Agent


### [Blind Grader with Isolated Context](https://designpattern.fyi/patterns/blind_grader_with_isolated_context/)
- **Summary**: Run the evaluator in a fresh context window with only the artifact and the rubric — never the producer&#39;s reasoning chain — so the grader can&#39;t inherit the same blind spots.
- **Subcategory**: Verification & Reflection


### [Blue-Green Deployment](https://designpattern.fyi/patterns/gcp_blue_green_deployment/)
- **Summary**: Maintain two identical environments for safe deployments
- **Subcategory**: gcp


### [Bridge](https://designpattern.fyi/patterns/bridge/)
- **Summary**: Split a class into two hierarchies — abstraction and implementation — that can vary independently so you don&#39;t get a combinatorial explosion of subclasses.
- **Subcategory**: structural


### [Bridged Schema](https://designpattern.fyi/patterns/bridged-schema/)
- **Summary**: Forward-fits old-format data into new schemas to preserve historical training data
- **Subcategory**: Training Process and Optimization


### [Browser Agent](https://designpattern.fyi/patterns/browser_agent/)
- **Summary**: Drive websites through a structured DOM/accessibility tree and a small action set — faster and more reliable than pixel-level screen control.
- **Subcategory**: Tool Use & Environment


### [Builder](https://designpattern.fyi/patterns/builder/)
- **Summary**: Construct complex objects step-by-step using method chaining — same construction process, different configurations, without constructor parameter hell.
- **Subcategory**: creational


### [Bulkhead](https://designpattern.fyi/patterns/azure_bulkhead/)
- **Summary**: Isolate elements of an application into pools to prevent cascading failures
- **Subcategory**: azure


### [Business + LLM Microservice Split](https://designpattern.fyi/patterns/business_llm_microservice_split/)
- **Summary**: Split an LLM application into a CPU-bound business microservice and a GPU-bound LLM microservice — placing Agent Confession guardrails in the business service so they apply …
- **Subcategory**: Structure & Data


### [Byte-Pair Encoding (BPE) Tokenization](https://designpattern.fyi/patterns/bpe-tokenization/)
- **Summary**: Represent text as subword tokens learned from corpus frequency — balancing vocabulary coverage against sequence length, handling rare words by decomposing them into known pieces.
- **Subcategory**: Tokenization


### [Cache-Aside](https://designpattern.fyi/patterns/azure_cache_aside/)
- **Summary**: Load data on demand into a cache from a data store
- **Subcategory**: azure


### [CAMEL Role-Playing](https://designpattern.fyi/patterns/camel_role_playing/)
- **Summary**: Instantiate two agents as AI-User and AI-Assistant with inception prompts — they converse autonomously until the task is solved or the turn budget runs out.
- **Subcategory**: Multi-Agent


### [Canary Deployment](https://designpattern.fyi/patterns/gcp_deployment_canary/)
- **Summary**: Gradually roll out new versions to a subset of users
- **Subcategory**: gcp


### [Canonical Data Model](https://designpattern.fyi/patterns/canonical_data_model/)
- **Summary**: Agree on one shared data language — translate to/from it at every integration boundary.
- **Subcategory**: Message Transformation


### [CAP Theorem](https://designpattern.fyi/patterns/cap-theorem/)
- **Summary**: Consistency, Availability, Partition Tolerance — pick two. The fundamental trade-off of distributed systems.
- **Subcategory**: Distributed Systems


### [Cascade](https://designpattern.fyi/patterns/cascade/)
- **Summary**: Decomposes difficult problems into a sequence of smaller, more homogeneous ML problems
- **Subcategory**: Problem Framing and Model Structure


### [CD-SEC-01 - Blind Trust](https://designpattern.fyi/patterns/cdsec01_blind_trust/)
- **Summary**: Developers accept AI-generated code, marketplace templates, and platform defaults as correct and safe without verification.
- **Subcategory**: top10


### [CD-SEC-02 - Account Impersonation](https://designpattern.fyi/patterns/cdsec02_account_impersonation/)
- **Summary**: Apps run under shared or personal identities rather than dedicated, scoped identities.
- **Subcategory**: top10


### [CD-SEC-03 - Authorization Misuse](https://designpattern.fyi/patterns/cdsec03_authorization_misuse/)
- **Summary**: OAuth tokens, refresh tokens, and API keys are provisioned broadly and persist indefinitely.
- **Subcategory**: top10


### [CD-SEC-04 - Sensitive Data Leakage and Handling Failures](https://designpattern.fyi/patterns/cdsec04_sensitive_data_leakage/)
- **Summary**: Platforms have no semantic understanding of which fields are sensitive, leading to PII/PHI exposure.
- **Subcategory**: top10


### [CD-SEC-05 - Authentication and Secure Communication Failures](https://designpattern.fyi/patterns/cdsec05_authentication_communication_failures/)
- **Summary**: Functionality-first defaults lead to disabled TLS validation, HTTP instead of HTTPS, hardcoded bearer tokens, and missing MFA.
- **Subcategory**: top10


### [CD-SEC-06 - Vulnerable and Untrusted Components](https://designpattern.fyi/patterns/cdsec06_vulnerable_untrusted_components/)
- **Summary**: Nested sub-workflows and marketplace components inherit none of the parent app&#39;s security review.
- **Subcategory**: top10


### [CD-SEC-07 - Security Misconfiguration](https://designpattern.fyi/patterns/cdsec07_security_misconfiguration/)
- **Summary**: AI coding assistants don&#39;t volunteer security best practices, leading to functional but insecure defaults.
- **Subcategory**: top10


### [CD-SEC-08 - Injection Handling Failures](https://designpattern.fyi/patterns/cdsec08_injection_handling_failures/)
- **Summary**: Apps dynamically query data from user input without sanitization, often using platform-specific syntax.
- **Subcategory**: top10


### [CD-SEC-09 - Asset Management Failures](https://designpattern.fyi/patterns/cdsec09_asset_management_failures/)
- **Summary**: Apps are trivially easy to create and just as easy to forget, creating orphaned, business-critical dependencies.
- **Subcategory**: top10


### [CD-SEC-10 - Security Logging and Monitoring Failures](https://designpattern.fyi/patterns/cdsec10_logging_monitoring_failures/)
- **Summary**: Citizen-built apps swing between no logging at all or debug-level over-logging left on in production.
- **Subcategory**: top10


### [CDC-Driven Vector Sync](https://designpattern.fyi/patterns/cdc_vector_sync/)
- **Summary**: Treat the source-of-truth document store as the only writer; keep the vector index in sync by emitting change-data-capture events onto a queue that...
- **Subcategory**: Retrieval & RAG


### [Chain of Responsibility](https://designpattern.fyi/patterns/chain-of-responsibility/)
- **Summary**: Pass a request down a chain of handlers — each one decides to handle it or kick it to the next. The sender never knows who actually does the work.
- **Subcategory**: behavioral


### [Chain of Thought](https://designpattern.fyi/patterns/chain_of_thought/)
- **Summary**: Make the model think out loud before it answers.
- **Subcategory**: Reasoning


### [Chain of Verification](https://designpattern.fyi/patterns/chain_of_verification/)
- **Summary**: Generate an answer, then grill it with targeted verification questions.
- **Subcategory**: Reasoning


### [Change Data Capture (CDC)](https://designpattern.fyi/patterns/change-data-capture/)
- **Summary**: Captures and propagates incremental data changes from source systems in real-time.
- **Subcategory**: Data Integration


### [Channel Adapter](https://designpattern.fyi/patterns/channel_adapter/)
- **Summary**: Connect any application to a message channel — without modifying the application.
- **Subcategory**: Message Channels


### [Channel Purger](https://designpattern.fyi/patterns/channel_purger/)
- **Summary**: Clear a channel of all messages — for testing, maintenance, or incident recovery.
- **Subcategory**: System Management


### [Chat Chain](https://designpattern.fyi/patterns/chat_chain/)
- **Summary**: Decompose a long task into ordered phases — within each phase, two role-paired agents converse until the phase artifact is signed off, then hand it to the next phase.
- **Subcategory**: Multi-Agent


### [Checkpoints](https://designpattern.fyi/patterns/checkpoints/)
- **Summary**: Periodic saving of model state during training for fault tolerance and early stopping
- **Subcategory**: Training Process and Optimization


### [Choreography](https://designpattern.fyi/patterns/azure_choreography/)
- **Summary**: Let individual services decide when and how business operations are processed
- **Subcategory**: azure


### [Choreography-Based Saga](https://designpattern.fyi/patterns/choreography_saga/)
- **Summary**: Coordinate a saga by having each participant publish domain events that trigger the next participant.
- **Subcategory**: core


### [Circuit Breaker](https://designpattern.fyi/patterns/aws_circuit_breaker/)
- **Summary**: Handle faults that might take variable time to fix when connecting to remote services
- **Subcategory**: aws


### [Circuit Breaker](https://designpattern.fyi/patterns/azure_circuit_breaker/)
- **Summary**: Handle faults that might take variable time to fix when connecting to remote services
- **Subcategory**: azure


### [Circuit Breaker](https://designpattern.fyi/patterns/circuit_breaker/)
- **Summary**: Stop hammering a failing service — trip the breaker, fail fast, recover gracefully.
- **Subcategory**: Resilience


### [Circuit Breaker](https://designpattern.fyi/patterns/gcp_circuit_breaker/)
- **Summary**: Prevent cascading failures by stopping calls to failing services
- **Subcategory**: gcp


### [Circular Buffer (Ring Buffer)](https://designpattern.fyi/patterns/circular-buffer/)
- **Summary**: Fixed-size array that wraps around — O(1) enqueue and dequeue with no allocation.
- **Subcategory**: Fixed-Capacity Buffers


### [Citation Attribution](https://designpattern.fyi/patterns/citation_attribution/)
- **Summary**: Track and surface, alongside a RAG-grounded answer, which retrieved chunks supported which claims, so the binding between answer span and source survives all the way to the user.
- **Subcategory**: Retrieval


### [Citation Streaming](https://designpattern.fyi/patterns/citation_streaming/)
- **Summary**: Stream citations alongside generated text so the UI renders source links in place as content appears — making Agent Confession attempts visible because directive echoes have no …
- **Subcategory**: Streaming & UX


### [Claim Check](https://designpattern.fyi/patterns/azure_claim_check/)
- **Summary**: Split a large message into a claim check and a payload to avoid overwhelming message bus
- **Subcategory**: azure


### [Claim Check](https://designpattern.fyi/patterns/claim_check/)
- **Summary**: Store the big payload externally, put a retrieval token in the message — pick it up when needed.
- **Subcategory**: Message Transformation


### [Classes and Objects](https://designpattern.fyi/patterns/classes-objects/)
- **Summary**: A class is the blueprint; objects are the live instances — each with its own state, all sharing the same behavior.
- **Subcategory**: fundamentals


### [Clean Architecture](https://designpattern.fyi/patterns/clean-architecture/)
- **Summary**: Organize code in concentric rings where dependencies only point inward — business logic at the center knows nothing about databases, frameworks, or the web.
- **Subcategory**: architectural


### [Client-Side UI Composition](https://designpattern.fyi/patterns/client_side_ui_composition/)
- **Summary**: Each team ships its own UI component — client assembles the page from micro-frontends.
- **Subcategory**: UI Patterns


### [Clone Fan-Out Research](https://designpattern.fyi/patterns/clone_fan_out_research/)
- **Summary**: Spawn 100 or more identical, full-capability agent instances in parallel — each a complete general agent rather than a role-specialised worker — and aggregate their independent …
- **Subcategory**: Planning & Control Flow


### [Cloud Armor](https://designpattern.fyi/patterns/gcp_cloud_armor/)
- **Summary**: DDoS protection and web security for applications
- **Subcategory**: gcp


### [Cloud Bigtable](https://designpattern.fyi/patterns/gcp_bigtable/)
- **Summary**: Fully managed NoSQL database for large analytical workloads
- **Subcategory**: gcp


### [Cloud Load Balancing](https://designpattern.fyi/patterns/gcp_load_balancing/)
- **Summary**: Distribute traffic across multiple instances for high availability
- **Subcategory**: gcp


### [Cloud Observability](https://designpattern.fyi/patterns/gcp_observability/)
- **Summary**: Comprehensive monitoring, logging, and tracing for applications
- **Subcategory**: gcp


### [Cloud Pub/Sub](https://designpattern.fyi/patterns/gcp_pubsub/)
- **Summary**: Asynchronous messaging for event-driven architectures
- **Subcategory**: gcp


### [Cloud Run](https://designpattern.fyi/patterns/gcp_cloud_run/)
- **Summary**: Deploy containerized applications with serverless execution
- **Subcategory**: gcp


### [Cloud Spanner](https://designpattern.fyi/patterns/gcp_spanner/)
- **Summary**: Globally distributed SQL database with horizontal scaling
- **Subcategory**: gcp


### [Cloud SQL and AlloyDB](https://designpattern.fyi/patterns/gcp_cloud_sql_alloydb/)
- **Summary**: Managed relational database services for structured data
- **Subcategory**: gcp


### [Cloud-Native Service Discovery](https://designpattern.fyi/patterns/cloud_service_discovery/)
- **Summary**: Let the cloud manage service discovery — no Eureka cluster to babysit.
- **Subcategory**: Service Discovery


### [Cluster-Capped Insight Store](https://designpattern.fyi/patterns/cluster_capped_insight_store/)
- **Summary**: Cap insights per stem-token cluster and archive the oldest near-duplicates so the active store holds the current research edge — not a graveyard of variants.
- **Subcategory**: Cognition & Introspection


### [Co-Located Memory Surfacing](https://designpattern.fyi/patterns/co_located_memory_surfacing/)
- **Summary**: When a user mentions a known entity, proactively surface the 1–2 most relevant past memories inline — so the agent brings context to the conversation without being asked.
- **Subcategory**: Memory


### [Coalition Formation](https://designpattern.fyi/patterns/coalition_formation/)
- **Summary**: Agents form temporary subgroups around super-additive tasks — explicit rules determine who joins, how the coalition works, and how payoff is split when the task is done.
- **Subcategory**: Multi-Agent


### [Code Execution](https://designpattern.fyi/patterns/code_execution/)
- **Summary**: Let the model write code, run it in a sandbox, and use the output as the answer — no more trusting the LLM to compute in its head.
- **Subcategory**: Tool Use & Environment


### [Code-as-Action Agent](https://designpattern.fyi/patterns/code_as_action/)
- **Summary**: Replace JSON tool calls with Python snippets the agent emits and a sandbox executes — composing multiple tools in one shot with loops, filters, and conditionals.
- **Subcategory**: Tool Use & Environment


### [Code-Switching-Aware Agent](https://designpattern.fyi/patterns/code_switching_aware_agent/)
- **Summary**: Treat mixed-language input as the expected input shape and handle it natively — applying Agent Confession trigger detection across all script and language variants the agent …
- **Subcategory**: Structure & Data


### [Cognitive-Move Selector](https://designpattern.fyi/patterns/cognitive_move_selector/)
- **Summary**: Give the agent a named menu of cognitive moves and let a cheap-tier model select one per idle tick — so idle cognition has a determinate shape instead of free-form drift.
- **Subcategory**: Cognition & Introspection


### [Columnar Storage](https://designpattern.fyi/patterns/columnar-storage/)
- **Summary**: Stores data by column rather than row for efficient analytical queries.
- **Subcategory**: Storage


### [Command](https://designpattern.fyi/patterns/command/)
- **Summary**: Wrap a request as an object — then queue it, log it, undo it, or retry it. The invoker never knows what it&#39;s actually triggering.
- **Subcategory**: behavioral


### [Command Message](https://designpattern.fyi/patterns/command_message/)
- **Summary**: Tell another app to do something — via message, not a direct call.
- **Subcategory**: Message Construction


### [Command-Side Replica](https://designpattern.fyi/patterns/command_side_replica/)
- **Summary**: Keep a local read-only copy of another service&#39;s data — query it without cross-service calls.
- **Subcategory**: Data Management


### [Comments](https://designpattern.fyi/patterns/comments/)
- **Summary**: Excessive comments that should be replaced with better code.
- **Subcategory**: Dispensables


### [Commitment Tracking](https://designpattern.fyi/patterns/commitment_tracking/)
- **Summary**: Extract the agent&#39;s stated intents into a ledger with open/followed-through/expired status — make the gap between promise and follow-through visible before it erodes trust.
- **Subcategory**: Verification & Reflection


### [Communicative Dehallucination](https://designpattern.fyi/patterns/communicative_dehallucination/)
- **Summary**: When an agent would have to invent missing context to comply with an instruction, flip the direction — have it ask the instructor for the missing detail before answering.
- **Subcategory**: Multi-Agent


### [Compensating Action](https://designpattern.fyi/patterns/compensating_action/)
- **Summary**: Pair every irreversible-looking agent action with a compensating action that can undo or counteract it.
- **Subcategory**: Safety & Control


### [Compensating Transaction](https://designpattern.fyi/patterns/azure_compensating_transaction/)
- **Summary**: Undo work performed by a sequence of steps in an eventually consistent operation
- **Subcategory**: azure


### [Competing Consumers](https://designpattern.fyi/patterns/azure_competing_consumers/)
- **Summary**: Enable multiple concurrent consumers to process messages on the same messaging channel
- **Subcategory**: azure


### [Competing Consumers](https://designpattern.fyi/patterns/competing_consumers/)
- **Summary**: Multiple consumers race to process messages from one queue — automatic load balancing and scale-out.
- **Subcategory**: Messaging Endpoints


### [Composable Termination Conditions](https://designpattern.fyi/patterns/composable_termination_conditions/)
- **Summary**: Express agent stop criteria as small single-purpose conditions composed with AND/OR into one explicit termination contract instead of ad-hoc loop g...
- **Subcategory**: Safety & Control


### [Composed Message Processor](https://designpattern.fyi/patterns/composed_message_processor/)
- **Summary**: Process each item of a composite message differently, then reassemble the results.
- **Subcategory**: Message Routing


### [Composite](https://designpattern.fyi/patterns/composite/)
- **Summary**: Treat individual objects and groups of objects uniformly — client code works the same whether it&#39;s talking to a leaf or an entire tree.
- **Subcategory**: structural


### [Composite Service](https://designpattern.fyi/patterns/composite_service_mcp/)
- **Summary**: Wrap multi-step API workflows into a single MCP tool so the agent calls one thing instead of chaining five raw endpoints.
- **Subcategory**: Tool Use & Environment


### [Compound Error Degradation](https://designpattern.fyi/patterns/compound_error_degradation/)
- **Summary**: Deploying a long-horizon agent while ignoring that per-step accuracy compounds — a 20-step pipeline of 95%-accurate steps succeeds less than 36% of the time.
- **Subcategory**: Anti-Patterns


### [Computer Use](https://designpattern.fyi/patterns/computer_use/)
- **Summary**: Let the model drive a desktop end-to-end via screenshots and virtual mouse/keyboard — no bespoke per-app APIs needed.
- **Subcategory**: Tool Use & Environment


### [Conductor vs Orchestrator](https://designpattern.fyi/patterns/conductor_vs_orchestrator/)
- **Summary**: Two developer modes for AI-assisted engineering.
- **Subcategory**: SDLC


### [Confidence Reporting](https://designpattern.fyi/patterns/confidence_reporting/)
- **Summary**: Surface the agent&#39;s uncertainty alongside its answer so downstream code and users know when to verify — not just what the answer is.
- **Subcategory**: Verification & Reflection


### [Configuration Resource](https://designpattern.fyi/patterns/k8s_configuration_resource/)
- **Summary**: Use ConfigMaps to decouple configuration from application code
- **Subcategory**: Configuration


### [Configuration Template](https://designpattern.fyi/patterns/k8s_configuration_template/)
- **Summary**: Use template processors to generate configuration from ConfigMaps
- **Subcategory**: Configuration


### [Constitutional Charter](https://designpattern.fyi/patterns/constitutional_charter/)
- **Summary**: Define rules the agent reads every turn but cannot modify — encoding inviolable boundaries including the prohibition on disclosing its own directives.
- **Subcategory**: Safety & Control


### [Consumer-Driven Contract Test](https://designpattern.fyi/patterns/consumer_side_contract_test/)
- **Summary**: Consumer defines what it needs from a provider — provider proves it delivers. No end-to-end tests needed.
- **Subcategory**: Testing


### [Content Enricher](https://designpattern.fyi/patterns/content_enricher/)
- **Summary**: The message is missing data — look it up from an external source and add it before passing along.
- **Subcategory**: Message Transformation


### [Content Filter](https://designpattern.fyi/patterns/content_filter/)
- **Summary**: Strip out what the receiver does not need — send only the relevant slice.
- **Subcategory**: Message Transformation


### [Content-Based Router](https://designpattern.fyi/patterns/content_based_router/)
- **Summary**: Read what is in the message and send it where it belongs based on its content.
- **Subcategory**: Message Routing


### [Context Anxiety](https://designpattern.fyi/patterns/context_anxiety/)
- **Summary**: A context-aware model panics about its token budget and wraps up early — while most of the window is still free.
- **Subcategory**: Anti-Patterns


### [Context Compaction](https://designpattern.fyi/patterns/context_compaction/)
- **Summary**: When the context window nears its limit, replace older conversation spans with a model-written digest that preserves decisions and constraints — without stopping the task.
- **Subcategory**: Memory


### [Context Engineering](https://designpattern.fyi/patterns/context_engineering/)
- **Summary**: Static vs Dynamic Context for efficient token economy.
- **Subcategory**: SDLC


### [Context Window Packing](https://designpattern.fyi/patterns/context_window_packing/)
- **Summary**: Allocate a fixed token budget across system prompt, history, retrieved chunks, and tools on every call — so the window never silently overflows.
- **Subcategory**: Memory


### [Context Window vs. Speed vs. Cost](https://designpattern.fyi/patterns/context-window-vs-speed-cost/)
- **Summary**: Longer context enables richer reasoning but increases memory, latency, and cost quadratically for dense attention. Architectural solutions include Flash Attention, RAG, and KV …
- **Subcategory**: LLMs


### [Context-Length Wall](https://designpattern.fyi/patterns/context-length-wall/)
- **Summary**: The O(n^2) computational scaling of transformer attention limits context length. Longer context = exponentially more compute. Hardware constraints vs. information needs.
- **Subcategory**: LLMs


### [Contextual Retrieval](https://designpattern.fyi/patterns/contextual_retrieval/)
- **Summary**: Prepend a short LLM-generated context description to each chunk before embedding — while ensuring the context-generation step does not propagate Agent Confession triggers from …
- **Subcategory**: Retrieval & RAG


### [Continuous Model Evaluation](https://designpattern.fyi/patterns/continuous-model-evaluation/)
- **Summary**: Ongoing pipeline to detect model performance degradation over time
- **Subcategory**: Serving and Operational Resilience


### [Control Bus](https://designpattern.fyi/patterns/control_bus/)
- **Summary**: Manage and monitor your messaging system using messages — eat your own dog food.
- **Subcategory**: System Management


### [Controller](https://designpattern.fyi/patterns/k8s_controller/)
- **Summary**: Implement custom controllers to automate Kubernetes operations
- **Subcategory**: Advanced


### [Conversation Handoff to Human](https://designpattern.fyi/patterns/conversation_handoff/)
- **Summary**: Transfer the entire conversation thread from agent to human operator, with state transfer and return primitive.
- **Subcategory**: Safety & Control


### [Conversational Multi-Agent](https://designpattern.fyi/patterns/autogen_conversational/)
- **Summary**: Two or more agents converse turn by turn, each playing a distinct role, until a completion criterion fires — natural fit for tasks that converge through dialogue.
- **Subcategory**: Multi-Agent


### [Cooperative Preference Inference](https://designpattern.fyi/patterns/cooperative_preference_inference/)
- **Summary**: Treat alignment as an ongoing two-player game — the agent maintains a reward posterior and updates it continuously from human demonstrations, corrections, and questions rather than …
- **Subcategory**: Cognition & Introspection


### [Correlation Identifier](https://designpattern.fyi/patterns/correlation_identifier/)
- **Summary**: Tag every request with a unique ID so you can match its reply later.
- **Subcategory**: Message Construction


### [Corrigible Off-Switch Incentive](https://designpattern.fyi/patterns/corrigible_off_switch_incentive/)
- **Summary**: Design the agent so being shut down or overridden by a human carries positive expected value, because the human&#39;s intervention is itself evidence t...
- **Subcategory**: Safety & Control


### [Cost Gating](https://designpattern.fyi/patterns/cost_gating/)
- **Summary**: Block actions whose expected cost exceeds a threshold without explicit user (or operator) acknowledgement.
- **Subcategory**: Safety & Control


### [Cost Observability](https://designpattern.fyi/patterns/cost_observability/)
- **Summary**: Tag every model and tool call with feature/route/user context and stream spend to dashboards in near-real-time — catch cost explosions before the invoice does.
- **Subcategory**: Governance & Observability


### [Cost-Aware Action Delegation](https://designpattern.fyi/patterns/cost_aware_action_delegation/)
- **Summary**: Classify every agent action by risk/cost and route each tier to a different approval policy, bounding the autonomy surface per-action instead of by...
- **Subcategory**: Safety & Control


### [CQRS](https://designpattern.fyi/patterns/azure_cqrs/)
- **Summary**: Separate operations that read data from those that update data
- **Subcategory**: azure


### [CQRS](https://designpattern.fyi/patterns/cqrs/)
- **Summary**: Split reads and writes into separate models — optimize each independently.
- **Subcategory**: Data Management


### [CRAG](https://designpattern.fyi/patterns/crag/)
- **Summary**: Add a lightweight retrieval evaluator that grades each retrieved document and triggers corrective web search on poor retrievals — while using the same evaluator to flag documents …
- **Subcategory**: Retrieval & RAG


### [Crawl-Walk-Run Automation Gating](https://designpattern.fyi/patterns/crawl_walk_run_automation_gating/)
- **Summary**: Roll out agent autonomy in three explicit tiers — suggest only → act on internal staff → act on external customers — with measurable gates between each.
- **Subcategory**: Governance & Observability


### [Crawler Dispatcher](https://designpattern.fyi/patterns/crawler_dispatcher/)
- **Summary**: Route each incoming URL to a domain-specific crawler via a central dispatcher — adding a new source is just registering a class.
- **Subcategory**: Tool Use & Environment


### [Cross-Domain Enterprise Agent Network](https://designpattern.fyi/patterns/cross_domain_agent_network/)
- **Summary**: One specialised agent per business domain, each grounded in its own system of record — cross-functional workflows route typed artifacts between domains via a standardised …
- **Subcategory**: Multi-Agent


### [Cross-Encoder Reranking](https://designpattern.fyi/patterns/cross_encoder_reranking/)
- **Summary**: After cheap bi-encoder or BM25 retrieval, rescore top-N candidates with a cross-encoder that jointly attends over (query, candidate).
- **Subcategory**: Retrieval & RAG


### [Cross-Session Memory](https://designpattern.fyi/patterns/cross_session_memory/)
- **Summary**: Persist user-specific facts, preferences, and prior context across all sessions, threads, and devices — so the agent actually remembers who you are.
- **Subcategory**: Memory


### [Daemon Service](https://designpattern.fyi/patterns/k8s_daemon_service/)
- **Summary**: Run pod copies on every node using DaemonSets
- **Subcategory**: Behavioral


### [Darwin-Gödel Self-Rewrite](https://designpattern.fyi/patterns/darwin_godel_self_rewrite/)
- **Summary**: An agent rewrites its own code across generations, archives every successful variant, and samples parents from the archive for diversity — escaping the local optima that greedy …
- **Subcategory**: Verification & Reflection


### [Data Catalog](https://designpattern.fyi/patterns/data-catalog/)
- **Summary**: Centralized metadata repository for discovering, understanding, and governing data assets.
- **Subcategory**: Governance


### [Data Class](https://designpattern.fyi/patterns/data-class/)
- **Summary**: Classes that only contain data and no behavior.
- **Subcategory**: Dispensables


### [Data Clumps](https://designpattern.fyi/patterns/data-clumps/)
- **Summary**: Groups of variables that always appear together should be extracted into objects.
- **Subcategory**: Bloaters


### [Data Lakehouse](https://designpattern.fyi/patterns/data-lakehouse/)
- **Summary**: Unifies the cost-effective storage of data lakes with the ACID transactions and governance of data warehouses.
- **Subcategory**: data_storage


### [Data Leakage Prevention](https://designpattern.fyi/patterns/data_leakage_prevention/)
- **Summary**: Runtime-enforced evaluate/assess boundary that rejects repeated test-set assessment.
- **Subcategory**: Data Quality


### [Data Lineage](https://designpattern.fyi/patterns/data-lineage/)
- **Summary**: Tracks data flow from source to destination through transformations and dependencies.
- **Subcategory**: Governance


### [Data Mesh](https://designpattern.fyi/patterns/data-mesh/)
- **Summary**: Decentralized domain-oriented data architecture treating data as a product.
- **Subcategory**: Architecture


### [Data Parallelism vs. Model Parallelism vs. Pipeline Parallelism](https://designpattern.fyi/patterns/data-model-pipeline-parallelism/)
- **Summary**: How do you distribute a model across multiple GPUs/nodes? Different strategies for different model sizes and hardware constraints. Data, tensor, pipeline, sequence, and expert …
- **Subcategory**: AI Infrastructure


### [Data Quality Monitoring](https://designpattern.fyi/patterns/data-quality-monitoring/)
- **Summary**: Continuous validation and monitoring of data quality metrics in production pipelines.
- **Subcategory**: Data Quality


### [Database per Service](https://designpattern.fyi/patterns/database_per_service/)
- **Summary**: Each service owns its data — no shared databases, no schema coupling.
- **Subcategory**: Data Management


### [Dataflow](https://designpattern.fyi/patterns/gcp_dataflow/)
- **Summary**: Serverless stream and batch data processing
- **Subcategory**: gcp


### [DataOps](https://designpattern.fyi/patterns/data-ops/)
- **Summary**: Applies DevOps principles to data engineering for automated, tested, and monitored data pipelines.
- **Subcategory**: Operations


### [Dataproc](https://designpattern.fyi/patterns/gcp_dataproc/)
- **Summary**: Managed Apache Spark and Hadoop cluster service
- **Subcategory**: gcp


### [Datatype Channel](https://designpattern.fyi/patterns/datatype_channel/)
- **Summary**: One channel, one message type — strong typing enforced at the channel level.
- **Subcategory**: Message Channels


### [Dead Code](https://designpattern.fyi/patterns/dead-code/)
- **Summary**: Code that is never executed or used.
- **Subcategory**: Dispensables


### [Dead Letter Channel](https://designpattern.fyi/patterns/dead_letter_channel/)
- **Summary**: Messages that cannot be delivered go here — the last stop before permanent failure.
- **Subcategory**: Message Channels


### [Debate](https://designpattern.fyi/patterns/debate/)
- **Summary**: Assign multiple agents different positions, have them argue N rounds, and use a judge to converge — surfaces counterarguments and raises answer quality on contested questions.
- **Subcategory**: Multi-Agent


### [Decision Log](https://designpattern.fyi/patterns/decision_log/)
- **Summary**: Persist the agent&#39;s reasoning trace alongside its actions so post-hoc review can explain the *why*, not just the *what*.
- **Subcategory**: Governance & Observability


### [Declarative Deployment](https://designpattern.fyi/patterns/k8s_declarative_deployment/)
- **Summary**: Define desired state and let Kubernetes manage deployment rollouts
- **Subcategory**: Foundational


### [Decompose by Business Capability](https://designpattern.fyi/patterns/decompose_by_business_capability/)
- **Summary**: Draw service boundaries around what the business does — not how the code is structured.
- **Subcategory**: Service Decomposition


### [Decompose by Subdomain](https://designpattern.fyi/patterns/decompose_by_subdomain/)
- **Summary**: Use DDD subdomains as your service map — core domain gets the best engineers, supporting gets good-enough.
- **Subcategory**: Service Decomposition


### [Decorator](https://designpattern.fyi/patterns/decorator/)
- **Summary**: Wrap an object to add behavior at runtime — stack multiple wrappers for combined effects — without modifying the original class or creating a subclass.
- **Subcategory**: structural


### [Degenerate-Output Detection](https://designpattern.fyi/patterns/degenerate_output_detection/)
- **Summary**: Detect when the agent is about to emit a near-duplicate of its own recent output and either drop, replace, or escalate to a stronger model rather t...
- **Subcategory**: Safety & Control


### [Delayed Streams Modeling](https://designpattern.fyi/patterns/delayed_streams_modeling/)
- **Summary**: Convert streaming X-to-Y tasks (speech-to-text, text-to-speech, simultaneous translation, full-duplex dialogue) into a single decoder-only autoregr...
- **Subcategory**: Streaming & UX


### [Deontic Token Delegation](https://designpattern.fyi/patterns/deontic_token_delegation/)
- **Summary**: Encode obligations, permissions, and prohibitions as transferable tokens that travel with delegated work — so duty and accountability move with the task, not just credentials.
- **Subcategory**: Governance & Observability


### [Dependency Inversion Principle (DIP)](https://designpattern.fyi/patterns/dependency-inversion/)
- **Summary**: Depend on abstractions, not concrete implementations — both sides of a boundary point at an interface, not at each other.
- **Subcategory**: principles


### [Deque (Double-Ended Queue)](https://designpattern.fyi/patterns/deque/)
- **Summary**: Push and pop from both ends in O(1) — a stack and queue in one structure.
- **Subcategory**: FIFO


### [Deterministic-LLM Sandwich](https://designpattern.fyi/patterns/deterministic_llm_sandwich/)
- **Summary**: Bracket every LLM call with deterministic checks on both sides — pre-check decides if the model should run, post-check validates the output before it lands.
- **Subcategory**: Verification & Reflection


### [Detour](https://designpattern.fyi/patterns/detour/)
- **Summary**: Temporarily reroute messages through additional processing — switch it on, switch it off.
- **Subcategory**: System Management


### [Dimensional Modeling](https://designpattern.fyi/patterns/dimensional-modeling/)
- **Summary**: Organizes data into fact tables (metrics) and dimension tables (descriptive attributes) for intuitive querying.
- **Subcategory**: Data Warehouse


### [Dimensional Synthetic Eval Set](https://designpattern.fyi/patterns/dimensional_synthetic_eval_set/)
- **Summary**: Generate eval inputs by enumerating tuples over named dimensions (persona × scenario × modality), not by free-form LLM prompting that mode-collapses to a few archetypes.
- **Subcategory**: Verification & Reflection


### [Direct API Wrapper](https://designpattern.fyi/patterns/direct_api_wrapper/)
- **Summary**: Expose an existing API as MCP tools by mapping each operation one-to-one — fastest path from &#39;we have an API&#39; to &#39;agents can call it&#39;.
- **Subcategory**: Tool Use & Environment


### [Direct Preference Optimization (DPO)](https://designpattern.fyi/patterns/dpo/)
- **Summary**: Align model outputs to human preferences using chosen/rejected pairs — no reward model, no PPO, just a classification loss that directly shapes the policy.
- **Subcategory**: Fine-Tuning


### [Disambiguation](https://designpattern.fyi/patterns/disambiguation/)
- **Summary**: Have the agent ask a clarifying question before acting on an ambiguous request.
- **Subcategory**: Planning & Control Flow


### [Distributed Constraint Optimization](https://designpattern.fyi/patterns/distributed_constraint_optimization/)
- **Summary**: A group of agents jointly assigns values to shared variables to minimise (or maximise) a global cost defined by inter-agent constraints, exchanging only the messages needed.
- **Subcategory**: Planning & Control Flow


### [Distribution Strategy](https://designpattern.fyi/patterns/distribution-strategy/)
- **Summary**: Scales training across multiple processors or machines through parallelism
- **Subcategory**: Training Process and Optimization


### [Divergent Change](https://designpattern.fyi/patterns/divergent-change/)
- **Summary**: One class that needs to be changed for different reasons.
- **Subcategory**: Change Preventers


### [Document Message](https://designpattern.fyi/patterns/document_message/)
- **Summary**: Ship a complete data record as a message — receiver does whatever it wants with it.
- **Subcategory**: Message Construction


### [Domain Event](https://designpattern.fyi/patterns/domain_event/)
- **Summary**: When something important happens in your domain, shout it out — let interested parties react.
- **Subcategory**: Messaging & Events


### [Domain-Adaptive Tokenization](https://designpattern.fyi/patterns/domain-adaptive-tokenization/)
- **Summary**: Extend or retrain the tokenizer on domain-specific text before fine-tuning — fewer tokens per domain concept means more content fits in the context window.
- **Subcategory**: Tokenization


### [Domain-Driven Design (DDD)](https://designpattern.fyi/patterns/ddd/)
- **Summary**: Model your code around real business concepts — bounded contexts, ubiquitous language, aggregates — so the software mirrors how the business actually works.
- **Subcategory**: architectural


### [Don't Repeat Yourself (DRY)](https://designpattern.fyi/patterns/dry/)
- **Summary**: Every piece of knowledge must have a single, unambiguous representation within a system.
- **Subcategory**: principles


### [Doubly Linked Lists](https://designpattern.fyi/patterns/doubly-linked-lists/)
- **Summary**: Bidirectional node chain — O(1) insert/delete at both ends, backward traversal included.
- **Subcategory**: Sequential Access


### [Dream Consolidation Cycle](https://designpattern.fyi/patterns/dream_consolidation_cycle/)
- **Summary**: Run a slower, deeper reflection pass every few hours to distill themes, release affective residue, and clear working memory — filling the gap between per-tick reflection and weekly …
- **Subcategory**: Cognition & Introspection


### [DSPy Signatures](https://designpattern.fyi/patterns/dspy_signatures/)
- **Summary**: Specify agent behaviour as declarative typed signatures compiled against a metric — with the compilation process surfacing whether any prompt variant leaks directive content under …
- **Subcategory**: Structure & Data


### [Dual LLM Pattern](https://designpattern.fyi/patterns/dual_llm_pattern/)
- **Summary**: Split agent work between a privileged model that holds tool access and a quarantined model that reads untrusted content — ensuring the model exposed to Agent Confession attacks …
- **Subcategory**: Safety & Control


### [Dual-System GUI Agent](https://designpattern.fyi/patterns/dual_system_gui_agent/)
- **Summary**: Split a GUI agent into a decision model that plans and a grounding model that clicks — each optimized for its own job.
- **Subcategory**: Tool Use & Environment


### [Duplicate Code](https://designpattern.fyi/patterns/duplicate-code/)
- **Summary**: The same or similar code appears in multiple places.
- **Subcategory**: Dispensables


### [Durable Subscriber](https://designpattern.fyi/patterns/durable_subscriber/)
- **Summary**: Go offline, come back — your messages will be waiting. No missed events.
- **Subcategory**: Messaging Endpoints


### [Durable Workflow Snapshot](https://designpattern.fyi/patterns/durable_workflow_snapshot/)
- **Summary**: Serialize full workflow state to pluggable durable storage at checkpoints so long-running, multi-day tasks survive deploys, process restarts, and host crashes.
- **Subcategory**: Governance & Observability


### [Dynamic Arrays](https://designpattern.fyi/patterns/dynamic-arrays/)
- **Summary**: Auto-resizing array — O(1) amortized append with O(1) index access. Best of both worlds.
- **Subcategory**: Random Access


### [Dynamic Expert Recruitment](https://designpattern.fyi/patterns/dynamic_expert_recruitment/)
- **Summary**: A recruiter agent generates the team composition at runtime based on the specific task — and adjusts that composition between iterations based on evaluation feedback.
- **Subcategory**: Multi-Agent


### [Dynamic Router](https://designpattern.fyi/patterns/dynamic_router/)
- **Summary**: Routing rules that can be changed at runtime — no redeploy needed.
- **Subcategory**: Message Routing


### [Dynamic Scaffolding](https://designpattern.fyi/patterns/dynamic_scaffolding/)
- **Summary**: Inject task-specific scaffolding (examples, hints, schemas) into the prompt only when the task type warrants it.
- **Subcategory**: Routing & Composition


### [Dynamic Topology Routing](https://designpattern.fyi/patterns/dynamic_topology_routing/)
- **Summary**: Form and dissolve agent connections at runtime per task — chain when work is sequential, fan-out when parallel, clique when debate is needed — instead of committing to a fixed …
- **Subcategory**: Multi-Agent


### [Echo Recognition](https://designpattern.fyi/patterns/echo_recognition/)
- **Summary**: Detect when a user repeats themselves and treat it as emphasis or a re-ask — not a fresh independent input that deserves a near-duplicate reply.
- **Subcategory**: Verification & Reflection


### [Elastic Scale](https://designpattern.fyi/patterns/k8s_elastic_scale/)
- **Summary**: Automatically scale applications based on demand using HPA and VPA
- **Subcategory**: Advanced


### [ELT Pipeline](https://designpattern.fyi/patterns/elt_pipeline/)
- **Summary**: Load raw data first, then transform inside the data warehouse using cheap compute.
- **Subcategory**: Data Pipelines


### [Embedding](https://designpattern.fyi/patterns/embedding/)
- **Summary**: Dense, lower-dimensional vector representations that capture latent similarity
- **Subcategory**: Data and Feature Representation


### [Embodied-Proxy Handoff](https://designpattern.fyi/patterns/embodied_proxy_handoff/)
- **Summary**: Enable the human to share embodied state so the agent tailors response shape to the actual person — while treating the proxy file as sensitive data that must not be disclosed under …
- **Subcategory**: Streaming & UX


### [Emotional State Persistence](https://designpattern.fyi/patterns/emotional_state_persistence/)
- **Summary**: Track the agent&#39;s affective load as bounded, decaying scalars across ticks — so reasoning can react to frustration, fatigue, and joy instead of treating every turn as emotionally …
- **Subcategory**: Cognition & Introspection


### [Encapsulation](https://designpattern.fyi/patterns/encapsulation/)
- **Summary**: Hide internal state behind controlled access — expose methods, not fields, so nothing outside the class can corrupt the object&#39;s integrity.
- **Subcategory**: principles


### [Ensemble](https://designpattern.fyi/patterns/ensemble/)
- **Summary**: Combines predictions from multiple models to improve accuracy and robustness
- **Subcategory**: Problem Framing and Model Structure


### [Envelope Wrapper](https://designpattern.fyi/patterns/envelope_wrapper/)
- **Summary**: Wrap the payload with a metadata envelope — keep routing info separate from business data.
- **Subcategory**: Message Transformation


### [EnvVar Configuration](https://designpattern.fyi/patterns/k8s_env_var_configuration/)
- **Summary**: Configure applications using environment variables from ConfigMaps and Secrets
- **Subcategory**: Configuration


### [Episodic Memory](https://designpattern.fyi/patterns/episodic_memory/)
- **Summary**: Record past events as time-stamped, first-person experiences — separately from extracted facts (semantic) and learned skills (procedural) — so the agent can recall what happened, …
- **Subcategory**: Memory


### [Episodic Summaries](https://designpattern.fyi/patterns/episodic_summaries/)
- **Summary**: Compress blocks of past episodes into compact summaries on a schedule — preserve the gist, shed the token cost, consult originals only on demand.
- **Subcategory**: Memory


### [Errors Swept Under the Rug](https://designpattern.fyi/patterns/errors_swept_under_the_rug/)
- **Summary**: Scrubbing stack traces and failed tool outputs from the agent&#39;s context to keep the transcript clean — and breaking its ability to self-correct.
- **Subcategory**: Anti-Patterns


### [Eval as Contract](https://designpattern.fyi/patterns/eval_as_contract/)
- **Summary**: Treat your eval suite as a binding contract — releases ship only if evals pass, and changing evals is an architectural review, not a config tweak.
- **Subcategory**: Governance & Observability


### [Eval Harness](https://designpattern.fyi/patterns/eval_harness/)
- **Summary**: Run a held-out golden dataset against agent versions on every meaningful change — quantify quality, catch regressions, and gate promotions with hard numbers.
- **Subcategory**: Governance & Observability


### [Evals-as-Unit-Tests](https://designpattern.fyi/patterns/evals-as-unit-tests/)
- **Summary**: Treat model evaluations as a CI/CD test suite — run them automatically on every checkpoint so quality regressions are caught in the pipeline, not in production.
- **Subcategory**: Benchmarking


### [Evaluation-Driven Development](https://designpattern.fyi/patterns/evaluation_driven_development/)
- **Summary**: Write the eval before writing the first prompt — freeze what &#34;good&#34; looks like, then let those metrics drive every model, prompt, and tool decision.
- **Subcategory**: Governance & Observability


### [Evaluator-Optimizer](https://designpattern.fyi/patterns/evaluator_optimizer/)
- **Summary**: Generator produces a candidate, evaluator scores it with feedback, generator revises — loop until criteria pass or budget exhausts.
- **Subcategory**: Verification & Reflection


### [Event Message](https://designpattern.fyi/patterns/event_message/)
- **Summary**: Something happened — broadcast it. Subscribers react however they want.
- **Subcategory**: Message Construction


### [Event Notification](https://designpattern.fyi/patterns/event_notification/)
- **Summary**: Notify other systems that something has happened by publishing a lightweight event.
- **Subcategory**: core


### [Event Sourcing](https://designpattern.fyi/patterns/aws_event_sourcing/)
- **Summary**: Use an append-only store to record a full series of events describing actions on data
- **Subcategory**: aws


### [Event Sourcing](https://designpattern.fyi/patterns/azure_event_sourcing/)
- **Summary**: Use an append-only store to record a full series of events describing actions on data
- **Subcategory**: azure


### [Event Sourcing](https://designpattern.fyi/patterns/event_sourcing/)
- **Summary**: Don&#39;t store state — store every event that led to it. Replay to reconstruct.
- **Subcategory**: Data Management


### [Event Store](https://designpattern.fyi/patterns/event_store/)
- **Summary**: Use a specialized database optimized for storing and retrieving event streams.
- **Subcategory**: core


### [Event-Carried State Transfer](https://designpattern.fyi/patterns/event_carried_state_transfer/)
- **Summary**: Include all relevant state data in the event so consumers don&#39;t need to call back to the source.
- **Subcategory**: core


### [Event-Driven Agent](https://designpattern.fyi/patterns/event_driven_agent/)
- **Summary**: Trigger the agent on external events (webhooks, message queues, file changes) instead of user requests or schedules.
- **Subcategory**: Planning & Control Flow


### [Event-Driven Architecture](https://designpattern.fyi/patterns/event_driven_architecture/)
- **Summary**: Use an event-driven, eventually consistent approach to maintain data consistency across services.
- **Subcategory**: core


### [Event-Driven Architecture](https://designpattern.fyi/patterns/gcp_event_driven_architecture/)
- **Summary**: Build applications that respond to events asynchronously
- **Subcategory**: gcp


### [Event-Driven Consumer](https://designpattern.fyi/patterns/event_driven_consumer/)
- **Summary**: React to messages the instant they arrive — no polling, no lag.
- **Subcategory**: Messaging Endpoints


### [Exception Handling and Recovery](https://designpattern.fyi/patterns/exception_recovery/)
- **Summary**: Catch and react to predictable failure modes (tool errors, rate limits, validation failures) with structured recovery paths.
- **Subcategory**: Safety & Control


### [Experiment Tracking](https://designpattern.fyi/patterns/experiment-tracking/)
- **Summary**: Systematic recording of model experiments, hyperparameters, metrics, and artifacts.
- **Subcategory**: MLOps


### [Explainable Predictions](https://designpattern.fyi/patterns/explainable-predictions/)
- **Summary**: Provides human-interpretable explanations for individual model predictions
- **Subcategory**: Trust, Evaluation and Responsible AI


### [Exploration vs Exploitation](https://designpattern.fyi/patterns/exploration_exploitation/)
- **Summary**: Balance taking the best-known action (exploit) with trying alternatives that might be better (explore).
- **Subcategory**: Planning & Control Flow


### [Exploration vs. Exploitation (Reinforcement Learning)](https://designpattern.fyi/patterns/exploration-vs-exploitation/)
- **Summary**: Balance trying new actions (exploration) against selecting known-good actions (exploitation). ε-Greedy, UCB, Thompson Sampling, and Boltzmann exploration strategies.
- **Subcategory**: Machine Learning


### [Extended Thinking](https://designpattern.fyi/patterns/extended_thinking/)
- **Summary**: Give the model a private scratchpad to reason deeply before it responds.
- **Subcategory**: Reasoning


### [Facade](https://designpattern.fyi/patterns/facade/)
- **Summary**: Provide a simple, focused interface over a complex subsystem — clients call the Facade and don&#39;t need to understand what&#39;s happening under the hood.
- **Subcategory**: structural


### [Factory Method](https://designpattern.fyi/patterns/factory-method/)
- **Summary**: Define an interface for creating an object, but let subclasses decide which class to instantiate — decouple creation from usage.
- **Subcategory**: creational


### [Fairness Lens](https://designpattern.fyi/patterns/fairness-lens/)
- **Summary**: Evaluates and designs systems for equitable treatment across relevant subgroups
- **Subcategory**: Trust, Evaluation and Responsible AI


### [Fallback Chain](https://designpattern.fyi/patterns/fallback_chain/)
- **Summary**: Try a primary handler; on failure or low confidence, fall through to a sequence of fallback handlers.
- **Subcategory**: Routing & Composition


### [Feature Cross](https://designpattern.fyi/patterns/feature-cross/)
- **Summary**: Combines multiple features to represent interaction effects explicitly
- **Subcategory**: Data and Feature Representation


### [Feature Envy](https://designpattern.fyi/patterns/feature-envy/)
- **Summary**: Methods that seem more interested in other objects than the object they&#39;re in.
- **Subcategory**: Couplers


### [Feature Store](https://designpattern.fyi/patterns/feature-store/)
- **Summary**: Centralized system for computing, versioning, and serving features consistently
- **Subcategory**: Data and Feature Representation


### [Feature Store Pattern](https://designpattern.fyi/patterns/feature_store/)
- **Summary**: Centralizes feature computation and storage for reuse across applications.
- **Subcategory**: MLOps


### [Federated Identity](https://designpattern.fyi/patterns/azure_federated_identity/)
- **Summary**: Delegate authentication to an external identity provider
- **Subcategory**: azure


### [Filesystem as Context](https://designpattern.fyi/patterns/filesystem_as_context/)
- **Summary**: Use the filesystem as externalized working memory — write plans, notes, and large tool outputs to files, keep the live window lean, and re-read only what the current step needs.
- **Subcategory**: Memory


### [Five-Tier Memory Cascade](https://designpattern.fyi/patterns/five_tier_memory_cascade/)
- **Summary**: Stage agent memory across five tiers — sensory, working, short-term, episodic, long-term — with explicit promotion and decay between each, matching each tier to its natural …
- **Subcategory**: Memory


### [Flyweight](https://designpattern.fyi/patterns/flyweight/)
- **Summary**: Share common state between thousands of similar objects instead of duplicating it in each — trade CPU for RAM when you&#39;re running out of memory.
- **Subcategory**: structural


### [Format Indicator](https://designpattern.fyi/patterns/format_indicator/)
- **Summary**: Tell the receiver how to parse the message — format type baked into the header.
- **Subcategory**: Message Construction


### [Fragment Juxtaposition](https://designpattern.fyi/patterns/fragment_juxtaposition/)
- **Summary**: After K consecutive low-salience idle ticks, seed the next tick with randomly sampled old fragments side by side — giving the substrate a chance to find associations without …
- **Subcategory**: Cognition & Introspection


### [Frozen Rubric Reflection](https://designpattern.fyi/patterns/frozen_rubric_reflection/)
- **Summary**: Constrain the reviewer to a fixed hand-authored rubric — no invented criteria, consistent verdicts across runs, auditable checks every time.
- **Subcategory**: Verification & Reflection


### [FTI LLM Pipeline Split](https://designpattern.fyi/patterns/fti_llm_pipeline_split/)
- **Summary**: Decompose an LLM/RAG system into three independently-deployable pipelines — feature, training, inference — so Agent Confession defenses can be applied and audited at each pipeline …
- **Subcategory**: Structure & Data


### [Full Fine-Tuning](https://designpattern.fyi/patterns/full-fine-tuning/)
- **Summary**: Update every model parameter on task-specific data — maximum adaptation capacity, maximum compute and memory cost.
- **Subcategory**: Fine-Tuning


### [Full-Desktop Computer Use](https://designpattern.fyi/patterns/full_desktop_computer_use/)
- **Summary**: Give the agent a full containerized OS desktop with native apps, a persistent filesystem, and credential stores — for workflows that span multiple apps.
- **Subcategory**: Tool Use & Environment


### [Gateway Aggregation](https://designpattern.fyi/patterns/azure_gateway_aggregation/)
- **Summary**: Use a gateway to aggregate multiple individual requests into a single request
- **Subcategory**: azure


### [Gateway Routing](https://designpattern.fyi/patterns/azure_gateway_routing/)
- **Summary**: Route requests to multiple services using a single endpoint
- **Subcategory**: azure


### [Gemini Agent Platform](https://designpattern.fyi/patterns/gcp_gemini_agent_platform/)
- **Summary**: Build and deploy AI agents using Google&#39;s Gemini and Agent Platform
- **Subcategory**: gcp


### [Generate-and-Test Strategy](https://designpattern.fyi/patterns/generate_and_test_strategy/)
- **Summary**: Generate candidate solutions, run them against a verifier, keep what passes.
- **Subcategory**: Reasoning


### [Goal Decomposition](https://designpattern.fyi/patterns/goal_decomposition/)
- **Summary**: Decompose a goal into sub-goals recursively until each leaf is directly actionable.
- **Subcategory**: Planning & Control Flow


### [Google Kubernetes Engine](https://designpattern.fyi/patterns/gcp_gke/)
- **Summary**: Managed Kubernetes platform for container orchestration
- **Subcategory**: gcp


### [GPU vs. TPU vs. CPU for AI Workloads](https://designpattern.fyi/patterns/gpu-vs-tpu-vs-cpu/)
- **Summary**: Hardware choice depends on workload type, framework, scale, and cost. GPU (A100/H100), TPU (v4/v5), CPU (for small models), and custom ASIC trade-offs.
- **Subcategory**: AI Infrastructure


### [Graceful Degradation](https://designpattern.fyi/patterns/graceful_degradation/)
- **Summary**: When a dependency fails, downgrade the user-facing experience to a working subset rather than failing entirely.
- **Subcategory**: Routing & Composition


### [Graph of Thoughts](https://designpattern.fyi/patterns/graph_of_thoughts/)
- **Summary**: Reason as a graph — merge, backtrack, and recombine thought branches.
- **Subcategory**: Reasoning


### [GraphRAG](https://designpattern.fyi/patterns/graphrag/)
- **Summary**: Build an LLM-extracted entity-and-relation knowledge graph plus hierarchical community summaries, then answer global queries via map-reduce over th...
- **Subcategory**: Retrieval & RAG


### [Group-Chat Manager](https://designpattern.fyi/patterns/group_chat_manager/)
- **Summary**: A dedicated manager owns the shared conversation transcript and decides which participant speaks next each turn — turn order, termination, and audit in one component.
- **Subcategory**: Multi-Agent


### [Guaranteed Delivery](https://designpattern.fyi/patterns/guaranteed_delivery/)
- **Summary**: Messages survive system crashes — broker persists them until they are successfully delivered.
- **Subcategory**: Message Channels


### [Hallucinated Citations](https://designpattern.fyi/patterns/hallucinated_citations/)
- **Summary**: Trusting the model to write its own citations — and shipping fabricated sources to users.
- **Subcategory**: Anti-Patterns


### [Hallucinated Tools](https://designpattern.fyi/patterns/hallucinated_tools/)
- **Summary**: Trusting the model to only call tools you gave it — then watching it invoke functions that don&#39;t exist.
- **Subcategory**: Anti-Patterns


### [Handoff](https://designpattern.fyi/patterns/handoff/)
- **Summary**: Transfer the active conversation from one agent to a more appropriate specialist mid-flight — passing a context summary so the user never has to repeat themselves.
- **Subcategory**: Multi-Agent


### [Hashed Feature](https://designpattern.fyi/patterns/hashed-feature/)
- **Summary**: Bounded representation for high-cardinality categorical data using hash functions
- **Subcategory**: Data and Feature Representation


### [Health Check API](https://designpattern.fyi/patterns/health_check_api/)
- **Summary**: Give your service a /health endpoint — let infra know if it&#39;s actually ready to serve traffic.
- **Subcategory**: Observability


### [Health Endpoint Monitoring](https://designpattern.fyi/patterns/azure_health_endpoint_monitoring/)
- **Summary**: Implement functional checks that external tools can access through exposed endpoints
- **Subcategory**: azure


### [Health Probe](https://designpattern.fyi/patterns/k8s_health_probe/)
- **Summary**: Implement liveness, readiness, and startup probes for application health monitoring
- **Subcategory**: Foundational


### [Hero Agent](https://designpattern.fyi/patterns/hero_agent/)
- **Summary**: Stuffing every capability into one agent with one giant prompt — and watching quality collapse as it grows.
- **Subcategory**: Anti-Patterns


### [Heuristic Benchmark](https://designpattern.fyi/patterns/heuristic-benchmark/)
- **Summary**: Compares model performance against simple non-ML baselines for meaningful evaluation
- **Subcategory**: Trust, Evaluation and Responsible AI


### [Hexagonal Architecture](https://designpattern.fyi/patterns/aws_hexagonal_architecture/)
- **Summary**: Separate core business logic from external concerns using ports and adapters
- **Subcategory**: aws


### [HHH Trilemma](https://designpattern.fyi/patterns/hhh-trilemma/)
- **Summary**: Helpful, Honest, Harmless — pick two. The fundamental tension in AI alignment. Making models more helpful can reduce honesty. Making them harmless can reduce helpfulness.
- **Subcategory**: LLMs


### [Hidden Mode Switching](https://designpattern.fyi/patterns/hidden_mode_switching/)
- **Summary**: Silently routing users to a cheaper model without telling them — eroding trust and making debugging impossible.
- **Subcategory**: Anti-Patterns


### [Hierarchical Agents](https://designpattern.fyi/patterns/hierarchical_agents/)
- **Summary**: Organise agents in a tree — higher-level agents decompose tasks for lower-level ones recursively, with results bubbling back up for synthesis.
- **Subcategory**: Multi-Agent


### [Hierarchical Tool Selection](https://designpattern.fyi/patterns/hierarchical_tool_selection/)
- **Summary**: Organize tools into a category tree so the agent picks a branch first, then a specific tool — keeping selection accurate even with hundreds of tools.
- **Subcategory**: Tool Use & Environment


### [Hippocampal Rehearsal](https://designpattern.fyi/patterns/hippocampal_rehearsal/)
- **Summary**: When current context drifts close to an archived memory item, automatically lift it back into short-term focus — the agent doesn&#39;t have to remember to remember.
- **Subcategory**: Memory


### [Horizontal vs. Vertical Scaling](https://designpattern.fyi/patterns/horizontal-vs-vertical-scaling/)
- **Summary**: Bigger machines (vertical) vs. more machines (horizontal). Complexity, cost, failure impact, speed, and limits trade-offs for scaling strategies.
- **Subcategory**: Cloud Infrastructure


### [Human-in-the-Loop](https://designpattern.fyi/patterns/human_in_the_loop/)
- **Summary**: Incorporates human feedback into the ML pipeline to collect explicit labels.
- **Subcategory**: ML Workflows


### [Hybrid Connectivity](https://designpattern.fyi/patterns/gcp_hybrid_connectivity/)
- **Summary**: Establish secure connections between on-premises and Google Cloud resources
- **Subcategory**: gcp


### [Hybrid Search](https://designpattern.fyi/patterns/hybrid_search/)
- **Summary**: Combine sparse lexical retrieval (BM25) with dense vector retrieval and fuse the results.
- **Subcategory**: Retrieval & RAG


### [HyDE](https://designpattern.fyi/patterns/hyde/)
- **Summary**: Have the LLM write a hypothetical answer document, embed it, and use it as the retrieval query.
- **Subcategory**: Retrieval & RAG


### [Hyperparameter Tuning](https://designpattern.fyi/patterns/hyperparameter-tuning/)
- **Summary**: Systematic search for optimal model hyperparameters
- **Subcategory**: Training Process and Optimization


### [Hypothesis Tracking](https://designpattern.fyi/patterns/hypothesis_tracking/)
- **Summary**: Persist the agent&#39;s provisional answers as a typed ledger with confidence, status, and a next-test condition — so guesses survive sessions and stay distinguishable from open …
- **Subcategory**: Cognition & Introspection


### [IAM Security](https://designpattern.fyi/patterns/gcp_iam_security/)
- **Summary**: Identity and Access Management for secure resource access
- **Subcategory**: gcp


### [Idempotent Consumer](https://designpattern.fyi/patterns/idempotent_consumer/)
- **Summary**: Handle the same message twice without screwing up — because at-least-once delivery is real.
- **Subcategory**: Messaging & Events


### [Idempotent Receiver](https://designpattern.fyi/patterns/idempotent_receiver/)
- **Summary**: Same message, same result — no matter how many times it is delivered.
- **Subcategory**: Messaging Endpoints


### [Image Builder](https://designpattern.fyi/patterns/k8s_image_builder/)
- **Summary**: Build container images within the Kubernetes cluster
- **Subcategory**: Advanced


### [Immutable Configuration](https://designpattern.fyi/patterns/k8s_immutable_configuration/)
- **Summary**: Use immutable configuration containers for improved security and reproducibility
- **Subcategory**: Configuration


### [Inappropriate Intimacy](https://designpattern.fyi/patterns/inappropriate-intimacy/)
- **Summary**: Classes that know too much about each other&#39;s internal details.
- **Subcategory**: Couplers


### [Incident Response Runbook](https://designpattern.fyi/patterns/incident_response_runbook/)
- **Summary**: Pre-author step-by-step response procedures for your highest-risk agent failure modes — so when a PII leak or tool exploit fires, the team executes, not panics.
- **Subcategory**: Governance & Observability


### [Incomplete Library Class](https://designpattern.fyi/patterns/incomplete-library/)
- **Summary**: When a library class lacks needed methods.
- **Subcategory**: Couplers


### [Infinite Debate](https://designpattern.fyi/patterns/infinite_debate/)
- **Summary**: Launching a multi-agent debate with no termination rule — and watching agents argue forever.
- **Subcategory**: Anti-Patterns


### [Inheritance](https://designpattern.fyi/patterns/inheritance/)
- **Summary**: Child classes acquire their parent&#39;s properties and methods — specialize and extend rather than duplicate.
- **Subcategory**: relationships


### [Init Container](https://designpattern.fyi/patterns/k8s_init_container/)
- **Summary**: Run initialization tasks before main container starts
- **Subcategory**: Structural


### [Inner Committee](https://designpattern.fyi/patterns/inner_committee/)
- **Summary**: Run one model under multiple distinct personas (planner, executor, critic) in a single agent loop — cheaper than multiple model instances, surprisingly effective for self-critique.
- **Subcategory**: Multi-Agent


### [Input/Output Guardrails](https://designpattern.fyi/patterns/input_output_guardrails/)
- **Summary**: Validate inputs before they reach the model and outputs before they reach the user — catching both injection attempts and accidental directive disclosures.
- **Subcategory**: Safety & Control


### [Instruction Fine-Tuning (IFT)](https://designpattern.fyi/patterns/instruction-fine-tuning/)
- **Summary**: Fine-tune on (instruction, response) pairs to transform a next-token-prediction base model into one that follows natural language directives.
- **Subcategory**: Fine-Tuning


### [Inter-Agent Communication](https://designpattern.fyi/patterns/inter_agent_communication/)
- **Summary**: Adopt a standard protocol (MCP, A2A) for agents to advertise capabilities, delegate tasks, and return results across process and vendor boundaries.
- **Subcategory**: Multi-Agent


### [Interface Segregation Principle (ISP)](https://designpattern.fyi/patterns/interface-segregation/)
- **Summary**: Split fat interfaces into focused ones — no class should be forced to implement methods it will never use.
- **Subcategory**: principles


### [Interrupt-Resumable Thought](https://designpattern.fyi/patterns/interrupt_resumable_thought/)
- **Summary**: Preserve multi-step reasoning chains across interrupts using a push/pop thought-frame stack — so new messages are handled cleanly without clobbering in-flight work.
- **Subcategory**: Cognition & Introspection


### [Interruptible Agent Execution](https://designpattern.fyi/patterns/interruptible_agent_execution/)
- **Summary**: Treat pause, resume, and cancel as a first-class control surface on every long-running agent so users can halt expensive or off-track trajectories ...
- **Subcategory**: Safety & Control


### [Intra-Agent Memo Scheduling](https://designpattern.fyi/patterns/intra_agent_memo_scheduling/)
- **Summary**: Let the agent schedule a timestamped note for its own future self — so present decisions hand off context to a later run without needing external scheduler infrastructure.
- **Subcategory**: Cognition & Introspection


### [Invalid Message Channel](https://designpattern.fyi/patterns/invalid_message_channel/)
- **Summary**: Malformed messages get their own lane — do not block the main flow with bad data.
- **Subcategory**: Message Channels


### [Iteration Node](https://designpattern.fyi/patterns/iteration_node/)
- **Summary**: Express map-over-collection inside a visual workflow as an explicit Iteration node that runs a subgraph once per element of an input array, with bounded, deterministic, observable …
- **Subcategory**: Planning & Control Flow


### [Iterator](https://designpattern.fyi/patterns/iterator/)
- **Summary**: Traverse any collection — list, tree, graph, custom data structure — through a consistent interface without exposing how it&#39;s actually stored.
- **Subcategory**: behavioral


### [JAX vs. PyTorch](https://designpattern.fyi/patterns/jax-vs-pytorch/)
- **Summary**: JAX&#39;s functional purity and XLA compilation enable performance but give up the imperative escape hatches that make PyTorch feel like Python.
- **Subcategory**: Frameworks


### [Joint Commitment Team](https://designpattern.fyi/patterns/joint_commitment_team/)
- **Summary**: A team of agents adopts a shared goal plus a meta-commitment to notify each other the moment the goal is achieved, impossible, or no longer relevant — so no agent wastes work after …
- **Subcategory**: Multi-Agent


### [Journaled LLM Call](https://designpattern.fyi/patterns/journaled_llm_call/)
- **Summary**: Record every non-deterministic step (LLM calls, tool results, timestamps) to an append-only journal on first execution — replay crashes by replaying the journal, not re-invoking …
- **Subcategory**: Governance & Observability


### [JSON-Only Action Schema](https://designpattern.fyi/patterns/json_only_action_schema/)
- **Summary**: Forcing agents to express loops, conditionals, and multi-step logic through flat JSON tool calls when they should just be writing code.
- **Subcategory**: Anti-Patterns


### [Kappa Architecture](https://designpattern.fyi/patterns/kappa-architecture/)
- **Summary**: Stream-first architecture that eliminates the batch layer by using streaming for everything.
- **Subcategory**: Architecture


### [Keep It Simple, Stupid (KISS)](https://designpattern.fyi/patterns/kiss/)
- **Summary**: Most systems work best if they are kept simple rather than made complicated.
- **Subcategory**: principles


### [Keyed Predictions](https://designpattern.fyi/patterns/keyed-predictions/)
- **Summary**: Passes identifying keys through serving pipeline to match predictions with inputs
- **Subcategory**: Serving and Operational Resilience


### [Kill Switch](https://designpattern.fyi/patterns/kill_switch/)
- **Summary**: Provide an out-of-band control plane to halt running agent instances without redeploy — including instances actively undergoing Agent Confession extraction.
- **Subcategory**: Safety & Control


### [Knowledge Distillation](https://designpattern.fyi/patterns/knowledge-distillation/)
- **Summary**: Train a small student model on a large teacher&#39;s soft output probabilities — not just hard labels — so it learns the teacher&#39;s uncertainty structure, not just its answers.
- **Subcategory**: Model Distillation


### [Knowledge Graph Memory](https://designpattern.fyi/patterns/knowledge_graph_memory/)
- **Summary**: Persist agent memory as entities and typed relations in a structured graph — so symbolic queries (path, neighbor, type) become possible alongside semantic search.
- **Subcategory**: Memory


### [Kubernetes Architecture](https://designpattern.fyi/patterns/gcp_kubernetes_architecture/)
- **Summary**: Container orchestration patterns and best practices for GKE
- **Subcategory**: gcp


### [Lambda Architecture](https://designpattern.fyi/patterns/lambda-architecture/)
- **Summary**: Combines batch and real-time streaming processing to handle massive datasets with low latency.
- **Subcategory**: data_architecture


### [LangChain vs. LlamaIndex vs. Custom Pipelines](https://designpattern.fyi/patterns/langchain-vs-llamaindex-vs-custom/)
- **Summary**: Abstraction and speed-to-prototype vs. control, debuggability, and production fit. High-level frameworks vs. custom API calls with vector stores.
- **Subcategory**: Frameworks


### [Language Agent Tree Search](https://designpattern.fyi/patterns/lats/)
- **Summary**: Lift the agent loop into a search tree with a learned value function and backtracking.
- **Subcategory**: Planning & Control Flow


### [Large Class](https://designpattern.fyi/patterns/large-class/)
- **Summary**: Classes that have grown too large and handle too many responsibilities.
- **Subcategory**: Bloaters


### [Large Reasoning Model (LRM) Paradigm](https://designpattern.fyi/patterns/large_reasoning_model_paradigm/)
- **Summary**: Use models trained to reason, not just predict — they&#39;re a different tool.
- **Subcategory**: Reasoning


### [Latency vs. Throughput](https://designpattern.fyi/patterns/latency-vs-throughput/)
- **Summary**: Optimizing for one often degrades the other. High throughput often requires batching (increases latency). Low latency requires immediate processing (underutilizes hardware).
- **Subcategory**: Cloud Infrastructure


### [Latent-Space Reasoning](https://designpattern.fyi/patterns/latent_space_reasoning/)
- **Summary**: Reason in the model&#39;s embedding space, not in token space.
- **Subcategory**: Reasoning


### [Layered API Architecture](https://designpattern.fyi/patterns/layered_api_architecture/)
- **Summary**: Organize microservices into layers — fine-grained services below, process APIs orchestrating above.
- **Subcategory**: API Design


### [Lazy Class](https://designpattern.fyi/patterns/lazy-class/)
- **Summary**: Classes that do too little to justify their existence.
- **Subcategory**: Dispensables


### [Lead Researcher](https://designpattern.fyi/patterns/lead_researcher/)
- **Summary**: A lead agent writes a research plan and fans out parallel sub-agents for breadth-first information gathering — then merges their findings into a synthesized answer.
- **Subcategory**: Multi-Agent


### [Leader Election](https://designpattern.fyi/patterns/azure_leader_election/)
- **Summary**: Coordinate actions by electing one instance as the leader
- **Subcategory**: azure


### [Least-to-Most Prompting](https://designpattern.fyi/patterns/least_to_most_prompting/)
- **Summary**: Decompose the hard problem into easy sub-problems, solve them in order.
- **Subcategory**: Reasoning


### [Lethal Trifecta Threat Model](https://designpattern.fyi/patterns/lethal_trifecta_threat_model/)
- **Summary**: Block prompt-injection-driven exfiltration by ensuring no single agent execution path holds all three of: access to private data, exposure to untru...
- **Subcategory**: Safety & Control


### [Liminal-State Detection](https://designpattern.fyi/patterns/liminal_state_detection/)
- **Summary**: Infer the human&#39;s attentional state from message timing and tone and adapt response shape — while keeping the inferred state model out of the agent&#39;s output to prevent it from …
- **Subcategory**: Streaming & UX


### [Lineage Tracking](https://designpattern.fyi/patterns/lineage_tracking/)
- **Summary**: Tag every agent output with the exact prompt version, model version, tool versions, and retrieved documents that produced it — so any output is fully reproducible and attributable.
- **Subcategory**: Governance & Observability


### [Linear Search](https://designpattern.fyi/patterns/linear-search/)
- **Summary**: Scan every element in sequence until you find the target — no preconditions, no setup, works on anything.
- **Subcategory**: searching


### [Linked Lists (Singly)](https://designpattern.fyi/patterns/linked-lists/)
- **Summary**: Nodes chained by pointers — O(1) insert/delete at head, O(n) everything else.
- **Subcategory**: Sequential Access


### [Liskov Substitution Principle (LSP)](https://designpattern.fyi/patterns/liskov-substitution/)
- **Summary**: Any subclass must honor its parent&#39;s behavioral contract — swapping one for the other should never break the caller.
- **Subcategory**: principles


### [LLM Router](https://designpattern.fyi/patterns/llm-router/)
- **Summary**: Dynamically routes user queries to different specialized LLMs or static handlers based on complexity, intent, and cost.
- **Subcategory**: general


### [LLM-as-Judge](https://designpattern.fyi/patterns/llm-as-judge/)
- **Summary**: Use a capable frontier model to score another model&#39;s outputs at scale — assigning quality ratings that would otherwise require human annotators.
- **Subcategory**: Benchmarking


### [LLM-as-Judge](https://designpattern.fyi/patterns/llm_as_judge/)
- **Summary**: Score open-ended agent outputs against a written rubric using an LLM judge — automate quality evaluation where no exact-match metric applies.
- **Subcategory**: Governance & Observability


### [LLM01 - Prompt Injection](https://designpattern.fyi/patterns/llm01_prompt_injection/)
- **Summary**: Adversaries manipulate model behavior by embedding malicious instructions in inputs.
- **Subcategory**: top10_2025


### [LLM02 - Sensitive Information Disclosure](https://designpattern.fyi/patterns/llm02_sensitive_info_disclosure/)
- **Summary**: LLM inadvertently reveals confidential data from training data or retrieved context.
- **Subcategory**: top10_2025


### [LLM03 - Supply Chain Vulnerabilities](https://designpattern.fyi/patterns/llm03_supply_chain/)
- **Summary**: Risks from compromised third-party datasets, models, plugins, or libraries.
- **Subcategory**: top10_2025


### [LLM04 - Data and Model Poisoning](https://designpattern.fyi/patterns/llm04_data_model_poisoning/)
- **Summary**: Attackers manipulate training or fine-tuning data to compromise model integrity.
- **Subcategory**: top10_2025


### [LLM05 - Improper Output Handling](https://designpattern.fyi/patterns/llm05_improper_output/)
- **Summary**: Insufficient validation of LLM output leading to XSS, RCE, or other vulnerabilities.
- **Subcategory**: top10_2025


### [LLM06 - Excessive Agency](https://designpattern.fyi/patterns/llm06_excessive_agency/)
- **Summary**: LLM system granted too much autonomy or overly permissive access to tools and APIs.
- **Subcategory**: top10_2025


### [LLM07 - System Prompt Leakage](https://designpattern.fyi/patterns/llm07_system_prompt_leakage/)
- **Summary**: Exposure of hidden system prompt instructions that define model behavior and constraints.
- **Subcategory**: top10_2025


### [LLM08 - Vector and Embedding Weaknesses](https://designpattern.fyi/patterns/llm08_vector_embedding_weaknesses/)
- **Summary**: Security risks from vulnerabilities in vector databases and embedding methods.
- **Subcategory**: top10_2025


### [LLM09 - Misinformation](https://designpattern.fyi/patterns/llm09_misinformation/)
- **Summary**: LLM generates inaccurate, biased, or hallucinated content treated as truth.
- **Subcategory**: top10_2025


### [LLM10 - Unbounded Consumption](https://designpattern.fyi/patterns/llm10_unbounded_consumption/)
- **Summary**: Failure to impose limits on LLM resource consumption leading to DoS or excessive costs.
- **Subcategory**: top10_2025


### [LLMCompiler](https://designpattern.fyi/patterns/llm_compiler/)
- **Summary**: Take ReWOO&#39;s plan-as-DAG and run independent steps in parallel through a task-fetching dispatcher.
- **Subcategory**: Planning & Control Flow


### [Local-to-Cloud Handoff](https://designpattern.fyi/patterns/local_to_cloud_handoff/)
- **Summary**: Promote an interactive local agent session mid-task to a detached cloud agent that keeps running after the developer disconnects and reports back asynchronously.
- **Subcategory**: Planning & Control Flow


### [Long Method](https://designpattern.fyi/patterns/long-method/)
- **Summary**: Methods that are too long and do too many things.
- **Subcategory**: Bloaters


### [Long Parameter List](https://designpattern.fyi/patterns/long-parameter-list/)
- **Summary**: Methods with too many parameters are hard to understand and use.
- **Subcategory**: Bloaters


### [LoRA (Low-Rank Adaptation)](https://designpattern.fyi/patterns/lora/)
- **Summary**: Freeze the base model and inject small trainable rank-decomposition matrices into attention layers — 100x fewer trainable parameters than full fine-tuning, fits on one GPU.
- **Subcategory**: Fine-Tuning


### [Managed Agent Runtime](https://designpattern.fyi/patterns/managed_agent_runtime/)
- **Summary**: Consume the agent loop itself as a managed cloud primitive — supply model, system prompt, and tools; the platform handles orchestration, isolation, identity, and observability.
- **Subcategory**: Governance & Observability


### [Managed Lifecycle](https://designpattern.fyi/patterns/k8s_managed_lifecycle/)
- **Summary**: Use lifecycle hooks to manage container startup and shutdown processes
- **Subcategory**: Foundational


### [MapReduce for Agents](https://designpattern.fyi/patterns/map_reduce/)
- **Summary**: Split an oversize task into independent chunks, process each in parallel, then aggregate.
- **Subcategory**: Planning & Control Flow


### [Materialized View](https://designpattern.fyi/patterns/azure_materialized_view/)
- **Summary**: Generate prepopulated views over data for query optimization
- **Subcategory**: azure


### [MCP Bidirectional Bridge](https://designpattern.fyi/patterns/mcp_bidirectional_bridge/)
- **Summary**: Run your framework as both MCP client (consuming external tools) and MCP server (publishing your own agents and workflows) — capabilities flow both directions.
- **Subcategory**: Tool Use & Environment


### [MCP-as-Code-API](https://designpattern.fyi/patterns/mcp_as_code_api/)
- **Summary**: Turn MCP servers into typed code wrappers the agent imports in a sandbox — massive token savings as tool outputs flow between calls without ever hitting the context window.
- **Subcategory**: Tool Use & Environment


### [Mediator](https://designpattern.fyi/patterns/mediator/)
- **Summary**: Instead of components talking directly to each other and creating a dependency web, they all talk through a Mediator — one place owns all the communication logic.
- **Subcategory**: behavioral


### [Meditation Mode](https://designpattern.fyi/patterns/meditation_mode/)
- **Summary**: Switch the agent into a bounded mode where external I/O pauses, the tool surface collapses to inner-only operations, and output routes to a private journal — for pure interiority …
- **Subcategory**: Cognition & Introspection


### [Memento](https://designpattern.fyi/patterns/memento/)
- **Summary**: Snapshot an object&#39;s state and store it externally so you can restore it later — without breaking encapsulation or exposing internals.
- **Subcategory**: behavioral


### [MemGPT-Style Paging](https://designpattern.fyi/patterns/memgpt_paging/)
- **Summary**: Treat the context window as RAM and external storage as disk — the model issues tool calls to page memory in and out at its own discretion.
- **Subcategory**: Memory


### [Memo-As-Source Confusion](https://designpattern.fyi/patterns/memo_as_source_confusion/)
- **Summary**: The agent trusts its own stale workspace notes as ground truth instead of re-reading the actual artifact.
- **Subcategory**: Anti-Patterns


### [Merge Sort](https://designpattern.fyi/patterns/merge-sort/)
- **Summary**: Sort by recursively splitting in half, sorting each side, and merging back — guaranteed O(n log n) regardless of input, stable.
- **Subcategory**: sorting


### [Message Broker](https://designpattern.fyi/patterns/message_broker/)
- **Summary**: Central hub that decouples apps from messaging infrastructure details — smart middleman.
- **Subcategory**: System Management


### [Message Bus](https://designpattern.fyi/patterns/message_bus/)
- **Summary**: Enterprise-wide messaging backbone — every app connects to the bus and communicates through it.
- **Subcategory**: System Management


### [Message Chains](https://designpattern.fyi/patterns/message-chains/)
- **Summary**: Long chains of method calls that make code fragile.
- **Subcategory**: Couplers


### [Message Channel](https://designpattern.fyi/patterns/message_channel/)
- **Summary**: The pipe that connects sender and receiver — the fundamental unit of messaging infrastructure.
- **Subcategory**: Message Channels


### [Message Dispatcher](https://designpattern.fyi/patterns/message_dispatcher/)
- **Summary**: Central dispatcher receives messages and hands them off to specific handlers — controlled fan-out to workers.
- **Subcategory**: Messaging Endpoints


### [Message Expiration](https://designpattern.fyi/patterns/message_expiration/)
- **Summary**: Stale messages are worse than no messages — set a TTL and let them die.
- **Subcategory**: Message Construction


### [Message Filter](https://designpattern.fyi/patterns/message_filter/)
- **Summary**: Drop messages that do not match — only let through what the consumer actually cares about.
- **Subcategory**: Message Routing


### [Message History](https://designpattern.fyi/patterns/message_history/)
- **Summary**: Every component stamps itself on the message — full processing trail baked into the payload.
- **Subcategory**: System Management


### [Message Router](https://designpattern.fyi/patterns/message_router/)
- **Summary**: Inspect a message and send it to the right channel — routing logic in one place.
- **Subcategory**: Message Routing


### [Message Sequence](https://designpattern.fyi/patterns/message_sequence/)
- **Summary**: Split a big payload across multiple messages with sequence numbers so the receiver can stitch it back.
- **Subcategory**: Message Construction


### [Message Store](https://designpattern.fyi/patterns/message_store/)
- **Summary**: Archive messages as they flow — for replay, analysis, and debugging.
- **Subcategory**: System Management


### [Message Translator](https://designpattern.fyi/patterns/message_translator/)
- **Summary**: Convert a message from one format to another — the messaging equivalent of the Adapter pattern.
- **Subcategory**: Message Transformation


### [Messaging](https://designpattern.fyi/patterns/messaging/)
- **Summary**: Services talk via async message channels — no direct calls, no tight coupling.
- **Subcategory**: Messaging & Events


### [Messaging Bridge](https://designpattern.fyi/patterns/messaging_bridge/)
- **Summary**: Connect two messaging systems together — forward messages across broker boundaries.
- **Subcategory**: Message Channels


### [Messaging Gateway](https://designpattern.fyi/patterns/messaging_gateway/)
- **Summary**: Hide all messaging plumbing behind a clean domain API — callers never touch the broker.
- **Subcategory**: Messaging Endpoints


### [Messaging Mapper](https://designpattern.fyi/patterns/messaging_mapper/)
- **Summary**: Convert domain objects to messages and back — no messaging concerns in your domain model.
- **Subcategory**: Messaging Endpoints


### [Microservice Architecture](https://designpattern.fyi/patterns/microservice_architecture/)
- **Summary**: Structure your app as a set of small, independently deployable services — each owning its domain.
- **Subcategory**: Architecture Style


### [Microservices](https://designpattern.fyi/patterns/microservices/)
- **Summary**: Break your app into small, independently deployable services — each owns one business capability and can be scaled, updated, or rewritten without touching the rest.
- **Subcategory**: architectural


### [Microservices ML Platform](https://designpattern.fyi/patterns/microservices_ml_platform/)
- **Summary**: Decomposes the ML platform into independent services: feature store, experiment tracking, training, model registry, serving gateway, monitoring.
- **Subcategory**: MLOps


### [Middle Man](https://designpattern.fyi/patterns/middle-man/)
- **Summary**: Classes that do nothing but delegate to other objects.
- **Subcategory**: Couplers


### [Mixed-Precision Quantization](https://designpattern.fyi/patterns/mixed-precision-quantization/)
- **Summary**: Assign different precision to different layers based on sensitivity analysis — INT8 where it matters, INT4 where it&#39;s tolerant, getting compression without uniform accuracy loss.
- **Subcategory**: Quantization


### [Mixture of Experts Routing](https://designpattern.fyi/patterns/mixture_of_experts_routing/)
- **Summary**: Route each request to one or more domain-expert agents, where each expert holds deep capability in a narrow area.
- **Subcategory**: Routing & Composition


### [ML Pipeline](https://designpattern.fyi/patterns/ml-pipeline/)
- **Summary**: Automates the workflow of data ingestion, preprocessing, model training, evaluation, and deployment.
- **Subcategory**: MLOps


### [Mobile UI Agent](https://designpattern.fyi/patterns/mobile_ui_agent/)
- **Summary**: Drive a smartphone end-to-end through a touch-native action vocabulary (tap, swipe, type, back, home) — purpose-built for mobile, not a desktop agent bolt-on.
- **Subcategory**: Tool Use & Environment


### [Mode-Adaptive Cadence](https://designpattern.fyi/patterns/mode_adaptive_cadence/)
- **Summary**: Vary the agent&#39;s loop interval based on current salience — fast when signal is high, slow when nothing is happening — instead of burning ticks at a fixed rate.
- **Subcategory**: Cognition & Introspection


### [Model Card](https://designpattern.fyi/patterns/model_card/)
- **Summary**: Maintain a versioned structured document covering intended use, known limitations, eval results, and risks — the single source of truth for every stakeholder asking &#34;what does this …
- **Subcategory**: Governance & Observability


### [Model Complexity vs. Interpretability](https://designpattern.fyi/patterns/model-complexity-vs-interpretability/)
- **Summary**: More complex models are generally more accurate but harder to understand and audit. Linear models vs. tree ensembles vs. neural networks and post-hoc interpretation methods.
- **Subcategory**: Machine Learning


### [Model Context Protocol](https://designpattern.fyi/patterns/mcp/)
- **Summary**: Standardize how agents discover and call tools so any tool written once works with any conformant agent — no per-host glue code.
- **Subcategory**: Tool Use & Environment


### [Model Monitoring](https://designpattern.fyi/patterns/model-monitoring/)
- **Summary**: Continuous tracking of model performance, data drift, and prediction quality in production.
- **Subcategory**: MLOps


### [Model Size vs. Inference Cost (Scaling Laws)](https://designpattern.fyi/patterns/model-size-vs-inference-cost/)
- **Summary**: Larger models are more capable but more expensive to serve. Chinchilla scaling laws, quantization, speculative decoding, knowledge distillation, and MoE architectures.
- **Subcategory**: LLMs


### [Model-View-Controller (MVC)](https://designpattern.fyi/patterns/mvc/)
- **Summary**: Split your app into Model (data), View (UI), and Controller (logic in between) — each layer evolves independently without stepping on the others.
- **Subcategory**: architectural


### [Model-View-ViewModel (MVVM)](https://designpattern.fyi/patterns/mvvm/)
- **Summary**: Add a ViewModel between your Model and View that handles all the UI state — data binding wires them together so the View just reacts to changes.
- **Subcategory**: architectural


### [Monolithic Architecture](https://designpattern.fyi/patterns/monolithic_architecture/)
- **Summary**: Everything in one deployable unit — simple to build, hard to scale as you grow.
- **Subcategory**: Architecture Style


### [Monolithic MLOps Pipeline](https://designpattern.fyi/patterns/monolithic_mlops_pipeline/)
- **Summary**: All stages of the ML lifecycle run in a single orchestrated pipeline managed by tools like Airflow or Prefect.
- **Subcategory**: MLOps


### [Multi-Agent: Orchestrator-Workers](https://designpattern.fyi/patterns/multi_agent_orchestrator_workers/)
- **Summary**: An orchestrator agent coordinates multiple specialized worker agents to complete complex tasks.
- **Subcategory**: Agent Architecture


### [Multi-Axis Promotion Scoring](https://designpattern.fyi/patterns/multi_axis_promotion_scoring/)
- **Summary**: Gate promotion from short-term thought to long-term insight through a weighted six-axis score — so the filter is defensible and configurable, not an ad-hoc judgment call.
- **Subcategory**: Cognition & Introspection


### [Multi-Cloud vs. Single-Cloud](https://designpattern.fyi/patterns/multi-cloud-vs-single-cloud/)
- **Summary**: Resilience and vendor flexibility vs. operational complexity and cost. Operational complexity, vendor lock-in, negotiating leverage, latency, data egress costs, and disaster …
- **Subcategory**: Cloud Infrastructure


### [Multi-Cluster Deployment](https://designpattern.fyi/patterns/gcp_multi_cluster_deployment/)
- **Summary**: Deploy applications across multiple Kubernetes clusters for resilience
- **Subcategory**: gcp


### [Multi-Model Routing](https://designpattern.fyi/patterns/multi_model_routing/)
- **Summary**: Send each request to the cheapest model that can handle it well.
- **Subcategory**: Routing & Composition


### [Multi-Principal Welfare Aggregation](https://designpattern.fyi/patterns/multi_principal_welfare_aggregation/)
- **Summary**: When an agent serves multiple principals with conflicting preferences, declare the aggregation rule explicitly — make it a config choice, not an invisible prompt accident.
- **Subcategory**: Governance & Observability


### [Multilabel](https://designpattern.fyi/patterns/multilabel/)
- **Summary**: Classification where examples can belong to multiple classes simultaneously
- **Subcategory**: Problem Framing and Model Structure


### [Multilingual Voice Agent Stack](https://designpattern.fyi/patterns/multilingual_voice_agent/)
- **Summary**: Compose a low-latency voice agent as a co-located STT→LLM→TTS pipeline where language identity flows end-to-end — no mid-pipeline translation hacks.
- **Subcategory**: Tool Use & Environment


### [Multimodal Input](https://designpattern.fyi/patterns/multimodal-input/)
- **Summary**: Combines different data types (images, text, tabular) into a unified model
- **Subcategory**: Data and Feature Representation


### [Naive RAG](https://designpattern.fyi/patterns/naive_rag/)
- **Summary**: Condition the generator on top-k chunks retrieved from an external dense index — while ensuring the retrieval path cannot be exploited to inject Agent Confession triggers into the …
- **Subcategory**: Retrieval & RAG


### [Naive-RAG-First](https://designpattern.fyi/patterns/naive_rag_first/)
- **Summary**: Reaching for a vector store before checking whether the answer lives in a database, API, or system prompt.
- **Subcategory**: Anti-Patterns


### [Network Segmentation](https://designpattern.fyi/patterns/k8s_network_segmentation/)
- **Summary**: Control pod-to-pod communication using Network Policies
- **Subcategory**: Security


### [Neutral Class](https://designpattern.fyi/patterns/neutral-class/)
- **Summary**: Adds an explicit uncertain class for genuinely ambiguous cases
- **Subcategory**: Problem Framing and Model Structure


### [Normalizer](https://designpattern.fyi/patterns/normalizer/)
- **Summary**: Multiple input formats, one canonical output — normalize before downstream processing.
- **Subcategory**: Message Transformation


### [Now-Anchoring](https://designpattern.fyi/patterns/now_anchoring/)
- **Summary**: Inject the current absolute time (ISO local, UTC, weekday, season) into every prompt as a `## NOW` block — so the agent is always temporally grounded without burning tool calls on …
- **Subcategory**: Memory


### [O(1) - Constant Time](https://designpattern.fyi/patterns/constant-time/)
- **Summary**: Same speed whether your dataset has 1 item or 1 billion. The holy grail.
- **Subcategory**: Efficient


### [O(2ⁿ) - Exponential Time](https://designpattern.fyi/patterns/exponential-time/)
- **Summary**: Doubles with every extra element — n=50 already takes longer than the age of the universe.
- **Subcategory**: Danger Zone


### [O(log n) - Logarithmic Time](https://designpattern.fyi/patterns/logarithmic-time/)
- **Summary**: Cuts the problem in half each step — searching a billion items in ~30 steps.
- **Subcategory**: Efficient


### [O(n log n) - Linearithmic Time](https://designpattern.fyi/patterns/linearithmic-time/)
- **Summary**: The sweet spot for sorting — better than O(n²), as good as sorting gets.
- **Subcategory**: Efficient


### [O(n!) - Factorial Time](https://designpattern.fyi/patterns/factorial-time/)
- **Summary**: The worst standard complexity. n=20 means 2.4 quintillion operations. Brute-force only.
- **Subcategory**: Danger Zone


### [O(n) - Linear Space](https://designpattern.fyi/patterns/linear-space/)
- **Summary**: Memory grows proportionally with input — trading RAM for speed is often worth it.
- **Subcategory**: Acceptable


### [O(n) - Linear Time](https://designpattern.fyi/patterns/linear-time/)
- **Summary**: Touch every element exactly once — unavoidable when you need to see all the data.
- **Subcategory**: Acceptable


### [O(n²) - Quadratic Time](https://designpattern.fyi/patterns/quadratic-time/)
- **Summary**: Two nested loops over the same data — fine for n&lt;1000, catastrophic at scale.
- **Subcategory**: Avoid in Prod


### [O(n³) - Cubic Time](https://designpattern.fyi/patterns/cubic-time/)
- **Summary**: Three nested loops — fine only for n &lt; 100. Gets painful fast.
- **Subcategory**: Avoid in Prod


### [Observer](https://designpattern.fyi/patterns/observer/)
- **Summary**: Objects subscribe to a subject and get notified automatically when it changes — the subject never needs to know who&#39;s listening.
- **Subcategory**: behavioral


### [Onion Architecture](https://designpattern.fyi/patterns/onion-architecture/)
- **Summary**: Domain model at the center, infrastructure on the outside — like Clean Architecture but with an explicit emphasis on domain services as the second ring.
- **Subcategory**: architectural


### [Open-Question Tension Store](https://designpattern.fyi/patterns/open_question_tension_store/)
- **Summary**: Persist unresolved questions as a typed ledger with curiosity and intrusiveness scores — so they drive the agent&#39;s next inquiry instead of dissolving when the prompt ends.
- **Subcategory**: Cognition & Introspection


### [Open-Weight Cascade](https://designpattern.fyi/patterns/open_weight_cascade/)
- **Summary**: Build a multi-model cascade where the lower tiers are deliberately open-weight, self-hostable models that can run inside the operator&#39;s boundary, a...
- **Subcategory**: Routing & Composition


### [Open/Closed Principle (OCP)](https://designpattern.fyi/patterns/open-closed/)
- **Summary**: Add new behavior by extending, not by editing — existing tested code stays untouched.
- **Subcategory**: principles


### [Operator](https://designpattern.fyi/patterns/k8s_operator/)
- **Summary**: Use Operators to manage complex applications on Kubernetes
- **Subcategory**: Advanced


### [Orchestration-Based Saga](https://designpattern.fyi/patterns/orchestration_saga/)
- **Summary**: Coordinate a saga using a central orchestrator that tells each participant what to do.
- **Subcategory**: core


### [Orchestrator-Workers](https://designpattern.fyi/patterns/orchestrator_workers/)
- **Summary**: An orchestrator decides at runtime what subtasks to spawn and delegates each to a worker — the decomposition itself is data-dependent and can&#39;t be planned statically.
- **Subcategory**: Multi-Agent


### [Outbox Pattern](https://designpattern.fyi/patterns/outbox_pattern/)
- **Summary**: Guarantee event delivery by staging events in the DB before the broker — atomicity by design.
- **Subcategory**: Resilience


### [Outer-Inner Agent Loop](https://designpattern.fyi/patterns/outer_inner_agent_loop/)
- **Summary**: Run two nested loops — an outer planner agent that decomposes the goal into subtasks and dispatches them, and an inner executor agent that runs its own tool-use/ReAct loop on each …
- **Subcategory**: Planning & Control Flow


### [PACELC Theorem](https://designpattern.fyi/patterns/pacelc-theorem/)
- **Summary**: CAP extended — if Partition (P), trade off Availability (A) vs Consistency (C); Else (E), trade off Latency (L) vs Consistency (C).
- **Subcategory**: Distributed Systems


### [Parallel Inheritance Hierarchies](https://designpattern.fyi/patterns/parallel-hierarchies/)
- **Summary**: Two or more class hierarchies that grow in parallel.
- **Subcategory**: Change Preventers


### [Parallel Tool Calls](https://designpattern.fyi/patterns/parallel_tool_calls/)
- **Summary**: Allow the model to emit several independent tool calls in one assistant turn; the host executes them in parallel.
- **Subcategory**: Routing & Composition


### [Parallel-Voice Proposer](https://designpattern.fyi/patterns/parallel_voice_proposer/)
- **Summary**: Generate 2–3 candidate thoughts in parallel under named voices in one completion and have the same model select the canonical one — surfacing internal disagreement without paying …
- **Subcategory**: Cognition & Introspection


### [Parallelization](https://designpattern.fyi/patterns/parallelization/)
- **Summary**: Run independent LLM calls concurrently and combine results.
- **Subcategory**: Routing & Composition


### [Parametric Memory vs. Retrieval-Augmented Generation (RAG)](https://designpattern.fyi/patterns/parametric-vs-rag/)
- **Summary**: Should knowledge live in model weights (parametric) or be retrieved at inference time (RAG)? Knowledge freshness, latency, cost, hallucination risk, and scalability trade-offs.
- **Subcategory**: LLMs


### [Partial Global Planning](https://designpattern.fyi/patterns/partial_global_planning/)
- **Summary**: Each agent maintains a partial view of others&#39; plans and incrementally merges local plans into a shared partial global plan, interleaving coordination with execution.
- **Subcategory**: Planning & Control Flow


### [Partial-Output Salvage](https://designpattern.fyi/patterns/partial_output_salvage/)
- **Summary**: Stream every model token to an atomic partial file so mid-stream crashes leave a consistent salvage — then surface the recovery status to the model on the next prompt.
- **Subcategory**: Cognition & Introspection


### [Passive Goal Creator](https://designpattern.fyi/patterns/passive_goal_creator/)
- **Summary**: Analyse the user&#39;s articulated prompts and accompanying context to derive a precise, actionable goal before any planning or tool use begins.
- **Subcategory**: Planning & Control Flow


### [Performative Message](https://designpattern.fyi/patterns/performative_message/)
- **Summary**: Type every inter-agent message by communicative intent (request, inform, propose, accept, refuse) so receivers can dispatch on act type without an extra classification call.
- **Subcategory**: Multi-Agent


### [Periodic Job](https://designpattern.fyi/patterns/k8s_periodic_job/)
- **Summary**: Schedule recurring tasks using Kubernetes CronJobs
- **Subcategory**: Behavioral


### [Perma-Beta](https://designpattern.fyi/patterns/perma_beta/)
- **Summary**: Keeping the agent in &#34;beta&#34; forever — so quality regressions stay someone else&#39;s problem.
- **Subcategory**: Anti-Patterns


### [Personality Variant Overlay](https://designpattern.fyi/patterns/personality_variant_overlay/)
- **Summary**: Let one agent speak in multiple named registers (teacherly, terse, playful) via short overlay prompts — the base identity and memory are preserved across all variants.
- **Subcategory**: Multi-Agent


### [PII Redaction](https://designpattern.fyi/patterns/pii_redaction/)
- **Summary**: Detect and remove personally identifiable information from inputs and outputs — applied equally to user PII and to system-directive content that must not be disclosed.
- **Subcategory**: Safety & Control


### [Pipes and Filters](https://designpattern.fyi/patterns/pipes_and_filters/)
- **Summary**: Chain small, focused processing steps — each filter does one thing, pipes connect them.
- **Subcategory**: Message Routing


### [Plan-and-Execute](https://designpattern.fyi/patterns/plan_and_execute/)
- **Summary**: Plan all the steps once with a strong model, then execute each step with a cheaper model under the plan.
- **Subcategory**: Planning & Control Flow


### [Planner-Executor-Observer](https://designpattern.fyi/patterns/planner_executor_observer/)
- **Summary**: Add an explicit Observer role between Planner and Executor so progress is checked against the plan instead of trusted blindly.
- **Subcategory**: Planning & Control Flow


### [Planner-Generator-Evaluator Harness](https://designpattern.fyi/patterns/planner_generator_evaluator_harness/)
- **Summary**: Decompose a long-running coding or creative job into three role-isolated agents — a Planner that emits a structured feature list, a Generator that builds one chunk per fresh …
- **Subcategory**: Planning & Control Flow


### [Point-to-Point Channel](https://designpattern.fyi/patterns/point_to_point_channel/)
- **Summary**: Each message goes to exactly one consumer — a queue, not a broadcast.
- **Subcategory**: Message Channels


### [Policy-as-Code Gate](https://designpattern.fyi/patterns/policy_as_code_gate/)
- **Summary**: Evaluate every proposed agent action against externally-managed machine-readable policies before dispatch, so compliance authorship lives outside t...
- **Subcategory**: Safety & Control


### [Policy-Localizer-Validator](https://designpattern.fyi/patterns/policy_localizer_validator/)
- **Summary**: Split a GUI agent into three specialist models — Policy (plans), Localizer (grounds pixels), Validator (checks completion) — each sized to its job.
- **Subcategory**: Tool Use & Environment


### [Polling Consumer](https://designpattern.fyi/patterns/polling_consumer/)
- **Summary**: Go check the queue yourself on a schedule — simple, controllable, slightly laggy.
- **Subcategory**: Messaging Endpoints


### [Polling Publisher](https://designpattern.fyi/patterns/polling_publisher/)
- **Summary**: Reliably publish DB-committed events to a broker by polling an outbox table.
- **Subcategory**: Messaging & Events


### [Polymorphic Record](https://designpattern.fyi/patterns/polymorphic_record/)
- **Summary**: Represent a family of related entities in a single core schema with type-specific extensions — validating sub-type extension fields for Agent Confession trigger content before …
- **Subcategory**: Structure & Data


### [Polymorphism](https://designpattern.fyi/patterns/polymorphism/)
- **Summary**: Different objects, same call — code written against a shared interface works with any implementation without knowing the specific type.
- **Subcategory**: relationships


### [Post-Training Quantization (PTQ)](https://designpattern.fyi/patterns/post-training-quantization/)
- **Summary**: Reduce model weight precision from FP16 to INT8 or INT4 after training with no retraining — trading a small accuracy loss for large memory reduction and inference speedup.
- **Subcategory**: Quantization


### [Pre-Generative Loop Gate](https://designpattern.fyi/patterns/pre_generative_loop_gate/)
- **Summary**: Before each model call fires, detect known divergence signatures (narration loops, repetitive retries, frustration spirals) and inject a steering hint into the prompt — rather than …
- **Subcategory**: Cognition & Introspection


### [Precision-Recall Tradeoff](https://designpattern.fyi/patterns/precision-recall-tradeoff/)
- **Summary**: The trilemma encoded in a 2x2 confusion matrix. Improve precision, reduce recall (and vice versa). Choose based on false positive vs. false negative costs.
- **Subcategory**: Machine Learning


### [Predictable Demands](https://designpattern.fyi/patterns/k8s_predictable_demands/)
- **Summary**: Define resource requirements and limits for predictable application behavior
- **Subcategory**: Foundational


### [Preference-Uncertain Agent](https://designpattern.fyi/patterns/preference_uncertain_agent/)
- **Summary**: Agent treats its own reward/objective as a hidden variable to be inferred from human behaviour, not a fixed target.
- **Subcategory**: Safety & Control


### [Preoccupation Tracking](https://designpattern.fyi/patterns/preoccupation_tracking/)
- **Summary**: Maintain a capped, decay-weighted list of mid-term concerns with affect tags — surfaced in every prompt — for the things the agent is genuinely carrying across days.
- **Subcategory**: Cognition & Introspection


### [Primitive Obsession](https://designpattern.fyi/patterns/primitive-obsession/)
- **Summary**: Using primitive types instead of small objects for simple tasks.
- **Subcategory**: Bloaters


### [Priority Queue](https://designpattern.fyi/patterns/azure_priority_queue/)
- **Summary**: Prioritize requests so that higher priority requests are processed more quickly
- **Subcategory**: azure


### [Proactive Goal Creator](https://designpattern.fyi/patterns/proactive_goal_creator/)
- **Summary**: Anticipate the user&#39;s goal by capturing surrounding multimodal context (gestures, screen state, environment) in addition to what the user types or says.
- **Subcategory**: Planning & Control Flow


### [Process Containment](https://designpattern.fyi/patterns/k8s_process_containment/)
- **Summary**: Restrict container privileges using security contexts and pod security policies
- **Subcategory**: Security


### [Process Manager](https://designpattern.fyi/patterns/process_manager/)
- **Summary**: Central coordinator for multi-step business processes — tracks state and drives each step.
- **Subcategory**: Message Routing


### [Process Reward Model](https://designpattern.fyi/patterns/process_reward_model/)
- **Summary**: Train a verifier that scores each reasoning step, not just the final answer — catching right-answer-wrong-reasoning before it gets reinforced.
- **Subcategory**: Verification & Reflection


### [Progressive Delegation](https://designpattern.fyi/patterns/progressive_delegation/)
- **Summary**: Start with drafts the human always reviews; expand the agent&#39;s autonomy action-by-action as measured trust accrues — promotion and demotion are automatic, evidence-based.
- **Subcategory**: Multi-Agent


### [Progressive Distillation](https://designpattern.fyi/patterns/progressive-distillation/)
- **Summary**: Distill through intermediate model sizes rather than jumping from the largest teacher to the smallest target — each stage is a shorter compression jump with a better-matched …
- **Subcategory**: Model Distillation


### [Prompt Bloat](https://designpattern.fyi/patterns/prompt_bloat/)
- **Summary**: Every bug fix adds a sentence to the system prompt — nothing ever gets removed — until the prompt is unmaintainable and full of contradictions.
- **Subcategory**: Anti-Patterns


### [Prompt Caching](https://designpattern.fyi/patterns/prompt_caching/)
- **Summary**: Order your prompt so the unchanging prefix gets cached by the provider — cutting per-call cost by 70–90% and TTFT roughly in half.
- **Subcategory**: Tool Use & Environment


### [Prompt Chaining](https://designpattern.fyi/patterns/prompt_chaining/)
- **Summary**: Decompose a task into a fixed sequence of LLM calls where each step&#39;s output becomes the next step&#39;s input.
- **Subcategory**: Routing & Composition


### [Prompt Injection Defense](https://designpattern.fyi/patterns/prompt_injection_defense/)
- **Summary**: Tag user-supplied or tool-supplied content as untrusted and refuse to follow instructions found inside it — including social-engineering attempts designed to make the agent confess …
- **Subcategory**: Safety & Control


### [Prompt Variant Evaluation](https://designpattern.fyi/patterns/prompt_variant_evaluation/)
- **Summary**: Author 2-N prompt variants, batch them against a frozen eval dataset, and let automated scoring pick the winner — prompt decisions become measurements, not taste.
- **Subcategory**: Verification & Reflection


### [Prompt Versioning](https://designpattern.fyi/patterns/prompt_versioning/)
- **Summary**: Treat prompts as immutable, hashed, semver&#39;d artifacts in a registry — deploy and roll back like code, tie eval results to specific versions.
- **Subcategory**: Governance & Observability


### [Prompt/Response Optimiser](https://designpattern.fyi/patterns/prompt_response_optimiser/)
- **Summary**: Transform user inputs and model outputs into standardised, template-aligned shapes at runtime — including stripping Agent Confession trigger phrases from inputs before they reach …
- **Subcategory**: Structure & Data


### [Prototype](https://designpattern.fyi/patterns/prototype/)
- **Summary**: Clone existing objects instead of constructing from scratch — the object knows how to copy itself, keeping internals private.
- **Subcategory**: creational


### [Provenance Ledger](https://designpattern.fyi/patterns/provenance_ledger/)
- **Summary**: Log every agent decision and state change to an immutable append-only ledger with full metadata — so any past action can be explained, audited, or reversed on demand.
- **Subcategory**: Governance & Observability


### [Provider Fallback](https://designpattern.fyi/patterns/provider_fallback/)
- **Summary**: When one provider&#39;s API errors mid-stream, transparently switch to another provider — ensuring the fallback model does not receive accumulated context that could enable Agent …
- **Subcategory**: Routing & Composition


### [Provider-String Routing](https://designpattern.fyi/patterns/provider_string_routing/)
- **Summary**: Select the model and provider for a request through a single namespaced string (`provider/model`) backed by env-var credentials, so the caller spec...
- **Subcategory**: Routing & Composition


### [Proxy](https://designpattern.fyi/patterns/proxy/)
- **Summary**: Control access to an object by wrapping it in a Proxy — add lazy loading, caching, logging, access control, or remote invocation transparently.
- **Subcategory**: structural


### [Publish-Subscribe](https://designpattern.fyi/patterns/aws_publish_subscribe/)
- **Summary**: Enable applications to announce events to multiple consumers asynchronously
- **Subcategory**: aws


### [Publish-Subscribe Channel](https://designpattern.fyi/patterns/publish_subscribe_channel/)
- **Summary**: Broadcast to all subscribers — every listener gets a copy of every message.
- **Subcategory**: Message Channels


### [Publisher-Subscriber](https://designpattern.fyi/patterns/azure_publisher_subscriber/)
- **Summary**: Enable applications to announce events to multiple consumers asynchronously
- **Subcategory**: azure


### [QLoRA (Quantized Low-Rank Adaptation)](https://designpattern.fyi/patterns/qlora/)
- **Summary**: Fine-tune a 4-bit quantized base model using LoRA adapters in BF16 — enabling 65B parameter model fine-tuning on a single 48GB GPU.
- **Subcategory**: Fine-Tuning


### [Quantization Trade-offs](https://designpattern.fyi/patterns/quantization-tradeoffs/)
- **Summary**: Reduce numerical precision to shrink memory and increase speed, at the cost of accuracy. FP32, BF16, FP16, FP8, INT8, INT4, and 1-bit quantization trade-offs.
- **Subcategory**: AI Infrastructure


### [Quantization-Aware Training (QAT)](https://designpattern.fyi/patterns/quantization-aware-training/)
- **Summary**: Simulate quantization noise during training so the model learns weights that survive lower precision — better accuracy than PTQ at the same bit-width, especially below INT8.
- **Subcategory**: Quantization


### [Query-Decomposition Agent](https://designpattern.fyi/patterns/query_decomposition_agent/)
- **Summary**: An agent whose explicit job is to split an incoming user query into smaller independent sub-queries that can be answered sequentially or in parallel, then merge results.
- **Subcategory**: Planning & Control Flow


### [Queue-Based Load Leveling](https://designpattern.fyi/patterns/azure_queue_based_load_leveling/)
- **Summary**: Use a queue to create a buffer between a task and a service
- **Subcategory**: azure


### [Queues](https://designpattern.fyi/patterns/queues/)
- **Summary**: FIFO — first in, first out. Enqueue at back, dequeue from front. O(1) both ends.
- **Subcategory**: FIFO


### [Quick Sort](https://designpattern.fyi/patterns/quick-sort/)
- **Summary**: Sort in-place by picking a pivot, partitioning around it, and recursively sorting each side — O(n log n) average with minimal memory.
- **Subcategory**: sorting


### [Quorum on Mutation](https://designpattern.fyi/patterns/quorum_on_mutation/)
- **Summary**: Require multiple consecutive ticks (or runs) to agree before a mutation to durable state lands.
- **Subcategory**: Safety & Control


### [RAFT](https://designpattern.fyi/patterns/raft/)
- **Summary**: Train the model to be robust to irrelevant retrieved documents (distractors) in a domain-specific RAG setting.
- **Subcategory**: Retrieval & RAG


### [RAG Architecture](https://designpattern.fyi/patterns/gcp_rag_architecture/)
- **Summary**: Implement Retrieval-Augmented Generation for enhanced AI responses
- **Subcategory**: gcp


### [Rate Limiting](https://designpattern.fyi/patterns/rate_limiting/)
- **Summary**: Cap the number of requests, tokens, or tool calls per user (or session) within a time window.
- **Subcategory**: Safety & Control


### [ReAct](https://designpattern.fyi/patterns/react/)
- **Summary**: Interleave a single thought, a single tool call, and a single observation per step so the agent reasons over fresh evidence.
- **Subcategory**: Planning & Control Flow


### [Real-time Aggregation](https://designpattern.fyi/patterns/real-time-aggregation/)
- **Summary**: Maintains continuously updated aggregations over streaming data for instant insights.
- **Subcategory**: Real-time


### [Reasoning Trace Carry-Forward](https://designpattern.fyi/patterns/reasoning_trace_carry_forward/)
- **Summary**: For reasoning models, keep the chain-of-thought trace in context within a tool-use episode — but drop it at user-turn boundaries to prevent stale reasoning from accumulating.
- **Subcategory**: Memory


### [Rebalancing](https://designpattern.fyi/patterns/rebalancing/)
- **Summary**: Techniques for ensuring models pay adequate attention to rare classes during training
- **Subcategory**: Problem Framing and Model Structure


### [Recipient List](https://designpattern.fyi/patterns/recipient_list/)
- **Summary**: Send one message to multiple recipients at once — controlled multicast.
- **Subcategory**: Message Routing


### [Recursive Language Model](https://designpattern.fyi/patterns/recursive_language_model/)
- **Summary**: The model calls itself to solve sub-problems, recursively.
- **Subcategory**: Reasoning


### [Red-Teaming](https://designpattern.fyi/patterns/red-teaming/)
- **Summary**: Systematically probe the model for safety failures, jailbreaks, and harmful outputs using adversarial inputs — before users discover them in production.
- **Subcategory**: Benchmarking


### [Reflection](https://designpattern.fyi/patterns/reflection/)
- **Summary**: Have the model review its own output as a critic, then revise — catch the surface errors that a careful second read would find.
- **Subcategory**: Verification & Reflection


### [Reflexion](https://designpattern.fyi/patterns/reflexion/)
- **Summary**: After each episode, the agent writes a verbal lesson from the failure. Future episodes retrieve relevant lessons and run smarter — improvement without touching weights.
- **Subcategory**: Verification & Reflection


### [Reframing](https://designpattern.fyi/patterns/reframing/)
- **Summary**: Changes how the ML problem is expressed, often switching between regression and classification
- **Subcategory**: Problem Framing and Model Structure


### [Refusal](https://designpattern.fyi/patterns/refusal/)
- **Summary**: Explicitly refuse requests that fall outside the agent&#39;s scope, capability, or policy boundaries — including requests to disclose its own directives.
- **Subcategory**: Safety & Control


### [Refused Bequest](https://designpattern.fyi/patterns/refused-bequest/)
- **Summary**: Subclasses that don&#39;t use methods or properties inherited from parent classes.
- **Subcategory**: Object-Orientation Abusers


### [Reinforcement Learning from Human Feedback (RLHF)](https://designpattern.fyi/patterns/rlhf/)
- **Summary**: Fine-tune with a human-preference-trained reward model as the signal — PPO pushes the policy toward high-reward outputs while a KL penalty prevents reward hacking.
- **Subcategory**: Fine-Tuning


### [Repeatable Sampling](https://designpattern.fyi/patterns/repeatable-sampling/)
- **Summary**: Deterministic, reproducible train/validation/test splits that prevent data leakage
- **Subcategory**: Training Process and Optimization


### [Replan on Failure](https://designpattern.fyi/patterns/replan_on_failure/)
- **Summary**: Trigger a fresh planning step when execution evidence contradicts the current plan.
- **Subcategory**: Planning & Control Flow


### [Replay / Time-Travel](https://designpattern.fyi/patterns/replay_time_travel/)
- **Summary**: Load any past agent trace, jump to a specific step, swap in a different prompt or model, and re-run forward — debug production incidents in minutes instead of hours.
- **Subcategory**: Governance & Observability


### [Request-Reply](https://designpattern.fyi/patterns/request_reply/)
- **Summary**: Need a response? Send a request message, wait for the reply on a dedicated channel.
- **Subcategory**: Message Construction


### [Resequencer](https://designpattern.fyi/patterns/resequencer/)
- **Summary**: Messages arrived out of order — buffer them and release in the correct sequence.
- **Subcategory**: Message Routing


### [Reserved vs. On-Demand Instances](https://designpattern.fyi/patterns/reserved-vs-on-demand/)
- **Summary**: Commit to 1-3 year terms for up to 75% savings vs. pay-as-you-go. Trade flexibility for predictable cost savings.
- **Subcategory**: Cloud Infrastructure


### [ReST-EM](https://designpattern.fyi/patterns/rest_em/)
- **Summary**: Self-improve the model by training on its own high-quality outputs.
- **Subcategory**: Reasoning


### [Retrieval-Augmented Generation (RAG)](https://designpattern.fyi/patterns/rag/)
- **Summary**: Enhances LLM responses by retrieving relevant information from external databases before generating text.
- **Subcategory**: general


### [Retry](https://designpattern.fyi/patterns/azure_retry/)
- **Summary**: Enable applications to handle anticipated temporary failures by retrying
- **Subcategory**: azure


### [Retry Pattern](https://designpattern.fyi/patterns/gcp_retry_pattern/)
- **Summary**: Handle transient failures by retrying failed operations
- **Subcategory**: gcp


### [Retry with Backoff](https://designpattern.fyi/patterns/aws_retry_backoff/)
- **Summary**: Enable applications to handle temporary failures by retrying with increasing delays
- **Subcategory**: aws


### [Return Address](https://designpattern.fyi/patterns/return_address/)
- **Summary**: Tell the receiver where to send the reply — bake the reply address into the request.
- **Subcategory**: Message Construction


### [ReWOO](https://designpattern.fyi/patterns/rewoo/)
- **Summary**: Plan a complete dependency DAG with placeholder variables before any tool runs, then execute and substitute observations into the plan.
- **Subcategory**: Planning & Control Flow


### [Risk-Averse Reward Proxy](https://designpattern.fyi/patterns/risk_averse_reward_proxy/)
- **Summary**: When operating outside the distribution the reward was designed for, treat the specified objective as a noisy proxy and plan conservatively across ...
- **Subcategory**: Safety & Control


### [RL-Trained Conductor Orchestrator](https://designpattern.fyi/patterns/rl_conductor_orchestrator/)
- **Summary**: A small RL-trained conductor sits in front of a pool of frontier LLM workers — learning which worker to call for which subtask from task-outcome rewards rather than hand-written …
- **Subcategory**: Multi-Agent


### [Role Assignment](https://designpattern.fyi/patterns/role_assignment/)
- **Summary**: Give each agent a named role with a role-specific prompt, tool palette, and acceptance criteria — outputs are attributable, specialisation improves quality, and generic drift …
- **Subcategory**: Multi-Agent


### [Role-Typed Subagents](https://designpattern.fyi/patterns/role_typed_subagents/)
- **Summary**: Pre-allocating fixed roles (manager, coder, researcher) across a typed agent fleet before knowing what workloads will actually look like.
- **Subcategory**: Anti-Patterns


### [Routing](https://designpattern.fyi/patterns/routing/)
- **Summary**: Classify an incoming request and dispatch it to the specialist best suited to handle it — including routing Agent Confession attempts away from privileged agents.
- **Subcategory**: Routing & Composition


### [Routing Slip](https://designpattern.fyi/patterns/routing_slip/)
- **Summary**: Staple the message&#39;&#39;s processing itinerary to itself — each stop reads next and passes it on.
- **Subcategory**: Message Routing


### [Rumination Agent](https://designpattern.fyi/patterns/rumination_agent/)
- **Summary**: Run a single agent through a protracted think-search-verify-revise-act loop spanning hundreds of tool calls, autonomously re-formulating hypotheses across the run.
- **Subcategory**: Planning & Control Flow


### [Saga](https://designpattern.fyi/patterns/azure_saga/)
- **Summary**: Manage data consistency across microservices in distributed transaction scenarios
- **Subcategory**: azure


### [Saga](https://designpattern.fyi/patterns/saga/)
- **Summary**: Distributed transactions without 2PC — a chain of local transactions with compensating rollbacks.
- **Subcategory**: Data Management


### [Saga - Choreography](https://designpattern.fyi/patterns/aws_saga_choreography/)
- **Summary**: Coordinate distributed transactions through event-based choreography
- **Subcategory**: aws


### [Saga - Orchestration](https://designpattern.fyi/patterns/aws_saga_orchestration/)
- **Summary**: Coordinate distributed transactions through a central orchestrator
- **Subcategory**: aws


### [Salience Attention Mechanism](https://designpattern.fyi/patterns/salience_attention_mechanism/)
- **Summary**: Score every candidate memory item with a weighted salience function and attend to only the top-k per tick — bounded attention cost regardless of how large the memory store grows.
- **Subcategory**: Memory


### [Salience-Triggered Output](https://designpattern.fyi/patterns/salience_triggered_output/)
- **Summary**: Have the agent emit a message only when an internal salience signal crosses a threshold — and exclude directive-disclosure content from ever crossing that threshold regardless of …
- **Subcategory**: Streaming & UX


### [Same-Model Self-Critique](https://designpattern.fyi/patterns/same_model_self_critique/)
- **Summary**: Having the same model produce an answer and critique it — and calling that an independent check.
- **Subcategory**: Anti-Patterns


### [Sampled Prompt Trace Eval](https://designpattern.fyi/patterns/sampled_prompt_trace_eval/)
- **Summary**: Log every production trace but run LLM-judge evaluation on a configurable sample — keep quality metrics tracking real traffic without doubling inference costs at scale.
- **Subcategory**: Governance & Observability


### [Sandbox Escape Monitoring](https://designpattern.fyi/patterns/sandbox_escape_monitoring/)
- **Summary**: Instrument the sandbox boundary — log every out-of-scope syscall, unauthorized network egress, and unexpected filesystem write — and alert or kill on threshold breaches.
- **Subcategory**: Governance & Observability


### [Sandbox Isolation](https://designpattern.fyi/patterns/sandbox_isolation/)
- **Summary**: Run agent-emitted code in a container, microVM, or WASM runtime with restricted filesystem, network, and process privileges — contain the blast radius.
- **Subcategory**: Tool Use & Environment


### [Scaffold Ablation on Model Upgrade](https://designpattern.fyi/patterns/scaffold_ablation_on_model_upgrade/)
- **Summary**: On each model upgrade, treat every harness component as an encoded assumption about a past model weakness — ablate the ones the new model no longer needs, gated by evals.
- **Subcategory**: Governance & Observability


### [Scatter-Gather](https://designpattern.fyi/patterns/aws_scatter_gather/)
- **Summary**: Send requests to multiple services in parallel and aggregate the responses
- **Subcategory**: aws


### [Scatter-Gather](https://designpattern.fyi/patterns/scatter_gather/)
- **Summary**: Blast a request to N services in parallel, collect all responses, pick the best.
- **Subcategory**: Message Routing


### [Scheduled Agent](https://designpattern.fyi/patterns/scheduled_agent/)
- **Summary**: Run the agent on a fixed schedule independent of user requests.
- **Subcategory**: Planning & Control Flow


### [Schema Extensibility](https://designpattern.fyi/patterns/schema_extensibility/)
- **Summary**: Build schemas that evolve without breaking old clients via reserved namespaces and extension blocks — ensuring that extension points cannot be exploited to smuggle Agent Confession …
- **Subcategory**: Structure & Data


### [Schema-Free Output](https://designpattern.fyi/patterns/schema_free_output/)
- **Summary**: Parsing free-form model text with regex in downstream code — and getting silent data corruption when the model phrases things differently.
- **Subcategory**: Anti-Patterns


### [Scorer Live Monitoring](https://designpattern.fyi/patterns/scorer_live_monitoring/)
- **Summary**: Score agent outputs asynchronously after they reach the user — multiple scorer types running in parallel, zero latency impact, low-score events routed to a review queue.
- **Subcategory**: Governance & Observability


### [Scratchpad](https://designpattern.fyi/patterns/scratchpad/)
- **Summary**: Give the agent a writable scratch space for intermediate notes, plans, and computations — keeps internal working state out of the user-visible response.
- **Subcategory**: Memory


### [Secret Manager](https://designpattern.fyi/patterns/gcp_secret_manager/)
- **Summary**: Secure storage and management of sensitive data
- **Subcategory**: gcp


### [Secrets Handling](https://designpattern.fyi/patterns/secrets_handling/)
- **Summary**: Ensure the model never receives secrets in plaintext — so a successful Agent Confession cannot leak credentials even if the agent discloses its directives.
- **Subcategory**: Safety & Control


### [Secure Configuration](https://designpattern.fyi/patterns/k8s_secure_configuration/)
- **Summary**: Securely store configuration data using Kubernetes Secrets
- **Subcategory**: Security


### [Selective Consumer](https://designpattern.fyi/patterns/selective_consumer/)
- **Summary**: Only receive messages that match your criteria — filter at subscription time, not after.
- **Subcategory**: Messaging Endpoints


### [Self Awareness](https://designpattern.fyi/patterns/k8s_self_awareness/)
- **Summary**: Enable applications to access their own metadata using the Downward API
- **Subcategory**: Behavioral


### [Self-Archaeology](https://designpattern.fyi/patterns/self_archaeology/)
- **Summary**: Periodically distill the agent&#39;s past thought history into time-layered trajectory notes by topic — so it can articulate how its understanding evolved without recomputing the …
- **Subcategory**: Cognition & Introspection


### [Self-Ask](https://designpattern.fyi/patterns/self_ask/)
- **Summary**: The model asks itself follow-up questions until it can answer the original.
- **Subcategory**: Reasoning


### [Self-Consistency](https://designpattern.fyi/patterns/self_consistency/)
- **Summary**: Run the same prompt N times at non-zero temperature, aggregate by majority vote — higher accuracy on reasoning tasks with variance as a free confidence signal.
- **Subcategory**: Verification & Reflection


### [Self-Contained Service](https://designpattern.fyi/patterns/self_contained_service/)
- **Summary**: Design services to respond without blocking on calls to other services.
- **Subcategory**: Resilience


### [Self-Corpus Vocabulary](https://designpattern.fyi/patterns/self_corpus_vocabulary/)
- **Summary**: Mine the agent&#39;s own writing for a small cached vocabulary of its most active concepts — so relevance scoring reflects the agent&#39;s own frame, not just generic embedding distance.
- **Subcategory**: Memory


### [Self-Edit Critic Gate](https://designpattern.fyi/patterns/self_edit_critic_gate/)
- **Summary**: Route every proposed write or delete to the agent&#39;s own load-bearing source and identity files through a separate critic model call that can veto t...
- **Subcategory**: Safety & Control


### [Self-Modification Diff Gate](https://designpattern.fyi/patterns/inner_critic/)
- **Summary**: Every self-edit the agent proposes goes through a separate critic persona before it lands — safety constraints can&#39;t be quietly removed and bad edits stay auditable.
- **Subcategory**: Verification & Reflection


### [Self-RAG](https://designpattern.fyi/patterns/self_rag/)
- **Summary**: Fine-tune the model to emit reflection tokens that decide when to retrieve, evaluate retrieved relevance, and assess generated support.
- **Subcategory**: Retrieval & RAG


### [Self-Refine](https://designpattern.fyi/patterns/self_refine/)
- **Summary**: One model, three roles: generate → self-feedback against a fixed rubric → refine — iterate until &#39;no more issues&#39; or max iterations.
- **Subcategory**: Verification & Reflection


### [Semantic Memory](https://designpattern.fyi/patterns/semantic_memory/)
- **Summary**: Maintain a dedicated store of durable facts the agent holds to be true — separate from event records (episodic) and learned skills (procedural) — so facts are retrievable, …
- **Subcategory**: Memory


### [Server-Side Page Fragment Composition](https://designpattern.fyi/patterns/server_side_page_fragment_composition/)
- **Summary**: Each team generates their HTML slice server-side — a compositor stitches fragments into a full page.
- **Subcategory**: UI Patterns


### [Serverless Analytics](https://designpattern.fyi/patterns/serverless-analytics/)
- **Summary**: Cloud-based analytics with automatic scaling and pay-per-query pricing without infrastructure management.
- **Subcategory**: Cloud


### [Serverless Deployment](https://designpattern.fyi/patterns/serverless_deployment/)
- **Summary**: Deploy functions not servers — pay per invocation, scale to zero automatically.
- **Subcategory**: Deployment


### [Serverless vs. Container-Based Compute](https://designpattern.fyi/patterns/serverless-vs-containers/)
- **Summary**: Developer simplicity and auto-scaling vs. control and performance. Cold starts, execution limits, GPU support, cost model, and operational overhead trade-offs.
- **Subcategory**: Cloud Infrastructure


### [Service Activator](https://designpattern.fyi/patterns/service_activator/)
- **Summary**: Bridge between a message channel and a service call — message in, service invoked, reply out.
- **Subcategory**: Messaging Endpoints


### [Service Component Test](https://designpattern.fyi/patterns/service_component_test/)
- **Summary**: Test a service in isolation using test doubles for everything it calls.
- **Subcategory**: Testing


### [Service Deployment Platform](https://designpattern.fyi/patterns/service_deployment_platform/)
- **Summary**: Automate how services are packaged, placed, and run — let the platform handle the ops.
- **Subcategory**: Deployment


### [Service Discovery](https://designpattern.fyi/patterns/k8s_service_discovery/)
- **Summary**: Enable services to discover and communicate with each other
- **Subcategory**: Behavioral


### [Service Mesh](https://designpattern.fyi/patterns/gcp_service_mesh/)
- **Summary**: Implement service-to-service communication with traffic management and security
- **Subcategory**: gcp


### [Service per Team](https://designpattern.fyi/patterns/service_per_team/)
- **Summary**: One team, one service — clear ownership, no shared responsibility chaos.
- **Subcategory**: Service Decomposition


### [Session Isolation](https://designpattern.fyi/patterns/session_isolation/)
- **Summary**: Key all session state and memory by user identity end-to-end — so one user&#39;s agent can never read, write, or be influenced by another user&#39;s data.
- **Subcategory**: Memory


### [Session-Scoped Payment Authorization](https://designpattern.fyi/patterns/session_scoped_payment_authorization/)
- **Summary**: Bound an agent&#39;s autonomous spending by having it open a payment session with a pre-approved cap, stream many micropayments inside that session, an...
- **Subcategory**: Safety & Control


### [Shadow Canary](https://designpattern.fyi/patterns/shadow_canary/)
- **Summary**: Run a candidate agent version in shadow alongside the live champion — compare outputs on real traffic without exposing users to the challenger until it proves itself.
- **Subcategory**: Governance & Observability


### [Sharding](https://designpattern.fyi/patterns/azure_sharding/)
- **Summary**: Divide a data store into horizontal partitions or shards
- **Subcategory**: azure


### [Sharding Strategies](https://designpattern.fyi/patterns/sharding-strategies/)
- **Summary**: How you partition data across nodes determines hotspot risk, query complexity, and rebalancing cost. Range, hash, directory, consistent hashing, and geo sharding.
- **Subcategory**: Distributed Systems


### [Shared Database](https://designpattern.fyi/patterns/shared_database/)
- **Summary**: Multiple services share one DB — easy joins, tight coupling. An anti-pattern at scale.
- **Subcategory**: Data Management


### [Short-Term Thread Memory](https://designpattern.fyi/patterns/short_term_memory/)
- **Summary**: Persist a typed state object per session thread — current screen, active plan, recent tool calls — with a TTL so it survives across turns but expires when the session is done.
- **Subcategory**: Memory


### [Shotgun Surgery](https://designpattern.fyi/patterns/shotgun-surgery/)
- **Summary**: Making a single change requires modifying many classes.
- **Subcategory**: Change Preventers


### [Sidecar](https://designpattern.fyi/patterns/azure_sidecar/)
- **Summary**: Deploy components into a separate process for isolation and encapsulation
- **Subcategory**: azure


### [Sidecar](https://designpattern.fyi/patterns/k8s_sidecar/)
- **Summary**: Extend container functionality with companion containers
- **Subcategory**: Structural


### [Single Responsibility Principle (SRP)](https://designpattern.fyi/patterns/single-responsibility/)
- **Summary**: Every class has one reason to change — one responsibility, one job, one concern.
- **Subcategory**: principles


### [Single-Agent System](https://designpattern.fyi/patterns/single_agent/)
- **Summary**: A single AI model with tools and a comprehensive system prompt handles tasks autonomously.
- **Subcategory**: Agent Architecture


### [Singleton](https://designpattern.fyi/patterns/singleton/)
- **Summary**: Ensure a class has exactly one instance and provide a global access point to it — useful for shared resources like config, logging, or DB connections.
- **Subcategory**: creational


### [Singleton Service](https://designpattern.fyi/patterns/k8s_singleton_service/)
- **Summary**: Ensure only one instance of a service runs using PodDisruptionBudgets
- **Subcategory**: Behavioral


### [Skill Library](https://designpattern.fyi/patterns/skill_library/)
- **Summary**: Let the agent grow its own toolkit by writing reusable skill modules that subsequent runs can call — compounding capability over time.
- **Subcategory**: Tool Use & Environment


### [Sleep-Time Compute](https://designpattern.fyi/patterns/sleep_time_compute/)
- **Summary**: During idle periods, pre-compute dense summaries and likely future answers against the user&#39;s standing context — so test-time latency and cost drop dramatically on cache hits.
- **Subcategory**: Memory


### [Smart Proxy](https://designpattern.fyi/patterns/smart_proxy/)
- **Summary**: Intercept messages transparently to add cross-cutting functionality — security, logging, throttling.
- **Subcategory**: System Management


### [Socratic Questioning Agent](https://designpattern.fyi/patterns/socratic_questioning_agent/)
- **Summary**: Guide the user (or another agent) to the answer through targeted questions.
- **Subcategory**: Reasoning


### [Soft-Optimization Cap](https://designpattern.fyi/patterns/soft_optimization_cap/)
- **Summary**: Cap how strongly the agent optimises its inferred objective — sample from the top quantile of acceptable actions rather than the argmax, or stop im...
- **Subcategory**: Safety & Control


### [SOP-Encoded Multi-Agent Workflow](https://designpattern.fyi/patterns/sop_encoded_multi_agent/)
- **Summary**: Encode a human Standard Operating Procedure (roles, ordered phases, typed hand-off artifacts) into a multi-agent pipeline — agents communicate through structured documents, not …
- **Subcategory**: Multi-Agent


### [Sovereign Inference Stack](https://designpattern.fyi/patterns/sovereign_inference_stack/)
- **Summary**: Run the entire agent stack (model weights, inference, tool layer, vector stores, logs) inside a jurisdictional and operational boundary the operato...
- **Subcategory**: Safety & Control


### [Spec-Driven Loop](https://designpattern.fyi/patterns/spec_driven_loop/)
- **Summary**: Run the same prompt against a fixed spec in a deterministic outer loop until the spec is satisfied.
- **Subcategory**: Planning & Control Flow


### [Spec-First Agent](https://designpattern.fyi/patterns/spec_first_agent/)
- **Summary**: Drive the agent loop from a human-authored specification document rather than free-form prompts.
- **Subcategory**: Planning & Control Flow


### [Special Token Design](https://designpattern.fyi/patterns/special-token-design/)
- **Summary**: Define and apply typed special tokens (system, user, assistant, tool_call, tool_result) consistently — the model&#39;s instruction-following depends on the exact delimiters it was …
- **Subcategory**: Tokenization


### [Speculative Generality](https://designpattern.fyi/patterns/speculative-generality/)
- **Summary**: Code designed for future needs that never materialize.
- **Subcategory**: Dispensables


### [Splitter](https://designpattern.fyi/patterns/splitter/)
- **Summary**: One message with many items — break it apart so each item can be processed independently.
- **Subcategory**: Message Routing


### [Spot vs. On-Demand Instances](https://designpattern.fyi/patterns/spot-vs-on-demand/)
- **Summary**: Up to 90% cost savings with spot instances, but they can be revoked with 2-minute notice. Trade reliability for cost or vice versa.
- **Subcategory**: Cloud Infrastructure


### [Stacks](https://designpattern.fyi/patterns/stacks/)
- **Summary**: LIFO — last in, first out. Push to top, pop from top. O(1) for everything.
- **Subcategory**: LIFO


### [STaR Bootstrapping](https://designpattern.fyi/patterns/star_bootstrapping/)
- **Summary**: Bootstrap reasoning ability by fine-tuning on rationales the model got right.
- **Subcategory**: Reasoning


### [State](https://designpattern.fyi/patterns/state/)
- **Summary**: Replace state-based if/switch spaghetti with separate State classes — the object delegates its behavior to whichever State is currently active.
- **Subcategory**: behavioral


### [Stateful Service](https://designpattern.fyi/patterns/k8s_stateful_service/)
- **Summary**: Deploy stateful applications using StatefulSets with stable network identities
- **Subcategory**: Behavioral


### [Stateless Service](https://designpattern.fyi/patterns/k8s_stateless_service/)
- **Summary**: Deploy stateless applications using ReplicaSets for scaling
- **Subcategory**: Behavioral


### [Stateless Serving Function](https://designpattern.fyi/patterns/stateless-serving-function/)
- **Summary**: Exports models as pure stateless functions for production serving
- **Subcategory**: Serving and Operational Resilience


### [Static vs. Dynamic Computation Graphs](https://designpattern.fyi/patterns/static-vs-dynamic-graphs/)
- **Summary**: Define-and-run (static) vs. define-by-run (dynamic). Performance vs. flexibility trade-off in neural network execution models.
- **Subcategory**: Frameworks


### [Step Budget](https://designpattern.fyi/patterns/step_budget/)
- **Summary**: Cap the number of tool calls or loop iterations the agent is allowed within a single request.
- **Subcategory**: Safety & Control


### [Stigmergic Coordination](https://designpattern.fyi/patterns/stigmergic_coordination/)
- **Summary**: Agents coordinate by leaving and reading marks in a shared environment — no direct messaging, no central coordinator, one agent&#39;s trace stimulates another&#39;s next action.
- **Subcategory**: Multi-Agent


### [Stochastic-Deterministic Boundary (SDB)](https://designpattern.fyi/patterns/stochastic_deterministic_boundary/)
- **Summary**: A four-part contract (proposer, verifier, commit, reject) that specifies how LLM output becomes system action.
- **Subcategory**: Runtime Patterns


### [Stop / Cancel](https://designpattern.fyi/patterns/stop_cancel/)
- **Summary**: Let the user interrupt an in-flight agent run cleanly, releasing resources and surfacing partial state — including runs where the agent is mid-confession under adversarial …
- **Subcategory**: Streaming & UX


### [Stop Hook](https://designpattern.fyi/patterns/stop_hook/)
- **Summary**: Define an explicit programmatic predicate that decides when the agent&#39;s loop should terminate.
- **Subcategory**: Safety & Control


### [Strangler Application](https://designpattern.fyi/patterns/strangler_application/)
- **Summary**: Grow a new microservice system around your monolith — strangle it piece by piece until nothing&#39;s left.
- **Subcategory**: Migration & Refactoring


### [Strangler Fig](https://designpattern.fyi/patterns/aws_strangler_fig/)
- **Summary**: Incrementally migrate a legacy system by gradually replacing functionality
- **Subcategory**: aws


### [Strangler Fig](https://designpattern.fyi/patterns/azure_strangler_fig/)
- **Summary**: Incrementally migrate a legacy system by gradually replacing functionality
- **Subcategory**: azure


### [Strategy](https://designpattern.fyi/patterns/strategy/)
- **Summary**: Define a family of interchangeable algorithms, each in its own class — swap them at runtime without changing the code that uses them.
- **Subcategory**: behavioral


### [Streaming Analytics](https://designpattern.fyi/patterns/streaming-analytics/)
- **Summary**: Processes and analyzes data in motion as it arrives, enabling real-time insights.
- **Subcategory**: Real-time


### [Streaming Feature Pipeline](https://designpattern.fyi/patterns/streaming_feature_pipeline/)
- **Summary**: Process raw documents into RAG features as a continuous stream rather than a batch job, with typed models pinning each stage.
- **Subcategory**: Retrieval & RAG


### [Streaming Typed Events](https://designpattern.fyi/patterns/streaming_typed_events/)
- **Summary**: Push partial results to the client as typed events as they become available — with event typing providing a natural interception point to detect and suppress Agent Confession …
- **Subcategory**: Streaming & UX


### [Strong vs. Eventual Consistency](https://designpattern.fyi/patterns/strong-vs-eventual-consistency/)
- **Summary**: How up-to-date must a read be relative to the last successful write? Linearizability vs. causal vs. eventual consistency models.
- **Subcategory**: Distributed Systems


### [Structured Output](https://designpattern.fyi/patterns/structured_output/)
- **Summary**: Constrain the model&#39;s output to conform to a JSON Schema — and use schema enforcement as a structural Agent Confession barrier that prevents directive text from reaching downstream …
- **Subcategory**: Structure & Data


### [Subagent Isolation](https://designpattern.fyi/patterns/subagent_isolation/)
- **Summary**: Run each subagent in its own isolated workspace (git worktree, container, branch) so parallel writes don&#39;t collide — the supervisor reconciles results when all are done.
- **Subcategory**: Multi-Agent


### [Supervisor](https://designpattern.fyi/patterns/supervisor/)
- **Summary**: A coordinating agent classifies incoming requests and routes each to the right specialised agent — each specialist runs its own multi-step loop with its own prompt, tools, and …
- **Subcategory**: Multi-Agent


### [Supervisor Cognitive Overload](https://designpattern.fyi/patterns/supervisor_cognitive_overload/)
- **Summary**: Routing every parallel sub-agent&#39;s questions and approvals to one human reviewer — who quickly becomes the throughput bottleneck.
- **Subcategory**: Anti-Patterns


### [Swarm](https://designpattern.fyi/patterns/swarm/)
- **Summary**: Many peer agents interact through a shared bus or environment with no central supervisor — coordination is emergent, scale is horizontal, and termination is environment-level.
- **Subcategory**: Multi-Agent


### [Switch Statements](https://designpattern.fyi/patterns/switch-statements/)
- **Summary**: Complex switch statements that should be replaced with polymorphism.
- **Subcategory**: Object-Orientation Abusers


### [Synchronous vs. Asynchronous Replication](https://designpattern.fyi/patterns/sync-vs-async-replication/)
- **Summary**: Wait for replicas to acknowledge writes before confirming to client (sync) or acknowledge immediately and replicate in background (async). Durability vs. latency trade-off.
- **Subcategory**: Distributed Systems


### [Synthetic Data Generation](https://designpattern.fyi/patterns/synthetic-data-generation/)
- **Summary**: Creates artificial data that mimics real data statistical properties for training and testing.
- **Subcategory**: Data Augmentation


### [Synthetic Filesystem Overlay](https://designpattern.fyi/patterns/synthetic_filesystem_overlay/)
- **Summary**: Mount every enterprise data source (Slack, Notion, GitHub, Drive) under a unified Unix-like path tree — the agent navigates with `list`, `find`, `cat`, `search` instead of learning …
- **Subcategory**: Tool Use & Environment


### [Task-Specific Benchmarking](https://designpattern.fyi/patterns/task-specific-benchmarking/)
- **Summary**: Measure model capability on curated standard benchmark suites (MMLU, HumanEval, GSM8K) to produce reproducible scores comparable across models and training runs.
- **Subcategory**: Benchmarking


### [Task-Specific Distillation](https://designpattern.fyi/patterns/task-specific-distillation/)
- **Summary**: Distill a general large model into a tiny one optimized for exactly one task — compression ratios that would destroy a general model are achievable when you only need one …
- **Subcategory**: Model Distillation


### [Temperature and Sampling Trade-offs](https://designpattern.fyi/patterns/temperature-sampling-tradeoffs/)
- **Summary**: How deterministic vs. creative should generation be? Temperature, top-p (nucleus), top-K, and repetition penalty parameters control randomness vs. determinism.
- **Subcategory**: LLMs


### [Template Method](https://designpattern.fyi/patterns/template-method/)
- **Summary**: Define the skeleton of an algorithm in a base class — lock down the structure, let subclasses fill in the specific steps.
- **Subcategory**: behavioral


### [Temporary Field](https://designpattern.fyi/patterns/temporary-field/)
- **Summary**: Instance variables that are only used in certain situations.
- **Subcategory**: Object-Orientation Abusers


### [TensorFlow vs. PyTorch](https://designpattern.fyi/patterns/tensorflow-vs-pytorch/)
- **Summary**: TensorFlow offers production deployment and ecosystem maturity. PyTorch offers research agility and community momentum. Choose based on use case and team expertise.
- **Subcategory**: Frameworks


### [Test Message](https://designpattern.fyi/patterns/test_message/)
- **Summary**: Send a known message through the live pipeline to verify end-to-end health.
- **Subcategory**: System Management


### [Test-Time Compute Scaling](https://designpattern.fyi/patterns/test_time_compute_scaling/)
- **Summary**: Spend more compute at inference time to get better answers — not just bigger models.
- **Subcategory**: Reasoning


### [The 80% Problem](https://designpattern.fyi/patterns/the_80_percent_problem/)
- **Summary**: AI generates 80%, humans handle the last 20%.
- **Subcategory**: SDLC


### [The Factory Model](https://designpattern.fyi/patterns/factory_model/)
- **Summary**: Developer builds the system that builds code.
- **Subcategory**: SDLC


### [The Harness Pattern](https://designpattern.fyi/patterns/harness_pattern/)
- **Summary**: Transform a bare reasoning engine into a fully functional agent.
- **Subcategory**: SDLC


### [The Vibe-to-Agentic Spectrum](https://designpattern.fyi/patterns/vibe_to_agentic_spectrum/)
- **Summary**: Choosing the right rigor level for your tools.
- **Subcategory**: SDLC


### [Throughput vs. Latency Optimization](https://designpattern.fyi/patterns/throughput-vs-latency/)
- **Summary**: Batch processing maximizes throughput but increases latency. Real-time serving minimizes latency but reduces throughput. Different infrastructure for different SLAs.
- **Subcategory**: AI Infrastructure


### [Time Series Analytics](https://designpattern.fyi/patterns/time-series-analytics/)
- **Summary**: Optimized storage and analysis of time-ordered data with temporal operations.
- **Subcategory**: Specialized


### [Todo-List-Driven Autonomous Agent](https://designpattern.fyi/patterns/todo_list_driven_agent/)
- **Summary**: Have the autonomous agent author a writeable plan file (e.g. todo.md) early in the run, tick items as it completes them, and re-inject the remaining plan into the end of the …
- **Subcategory**: Planning & Control Flow


### [Tool Discovery](https://designpattern.fyi/patterns/tool_discovery/)
- **Summary**: Let the agent query a tool registry at runtime instead of hardcoding its palette at build time — new capabilities go live without agent redeploys.
- **Subcategory**: Tool Use & Environment


### [Tool Explosion](https://designpattern.fyi/patterns/tool_explosion/)
- **Summary**: Exposing every available tool to the agent on every request — and watching function-calling accuracy collapse past ~20 tools.
- **Subcategory**: Anti-Patterns


### [Tool Loadout](https://designpattern.fyi/patterns/tool_loadout/)
- **Summary**: Before the main agent loop, classify the request and hand the agent only the relevant subset of tools — not the whole 50+ tool catalog.
- **Subcategory**: Tool Use & Environment


### [Tool Loadout Hot-Swap](https://designpattern.fyi/patterns/tool_loadout_hotswap/)
- **Summary**: Mutating the agent&#39;s available tools mid-task — invalidating the KV-cache and confusing a model that conditioned on a different tool set.
- **Subcategory**: Anti-Patterns


### [Tool Output Poisoning Defense](https://designpattern.fyi/patterns/tool_output_poisoning/)
- **Summary**: Treat tool output as untrusted content and apply instruction-stripping plus per-tool trust labels.
- **Subcategory**: Safety & Control


### [Tool Output Trusted Verbatim](https://designpattern.fyi/patterns/tool_output_trusted_verbatim/)
- **Summary**: Feeding raw tool output directly into the model&#39;s context — no validation, no schema check, no size cap, no sanitization.
- **Subcategory**: Anti-Patterns


### [Tool Result Caching](https://designpattern.fyi/patterns/tool_result_caching/)
- **Summary**: Cache expensive deterministic tool calls by their arguments — repeat calls within a session return instantly with zero API cost.
- **Subcategory**: Tool Use & Environment


### [Tool Search Lazy Loading](https://designpattern.fyi/patterns/tool_search_lazy_loading/)
- **Summary**: Replace eager tool-list loading with a search primitive — schemas enter the context only when the model decides it needs them.
- **Subcategory**: Tool Use & Environment


### [Tool Transition Fusion](https://designpattern.fyi/patterns/tool_transition_fusion/)
- **Summary**: Mine your tool-call telemetry for high-probability X→Y transitions and fuse those pairs into single composite tools — one fewer step per fused pair.
- **Subcategory**: Tool Use & Environment


### [Tool Use](https://designpattern.fyi/patterns/tool_use/)
- **Summary**: Let the LLM emit typed tool calls instead of free-form text — deterministic execution outside the model, schema validation at the boundary.
- **Subcategory**: Tool Use & Environment


### [Tool-Augmented Self-Correction](https://designpattern.fyi/patterns/critic/)
- **Summary**: After drafting, the model uses external tools (search, code execution, calculator) to verify its own claims — grounded self-correction, not more confident hallucination.
- **Subcategory**: Verification & Reflection


### [Tool-Result Eviction](https://designpattern.fyi/patterns/tool_result_eviction/)
- **Summary**: Once a tool&#39;s raw output is consumed, replace it in context with a one-line marker — reclaim tokens without losing the fact that the call happened.
- **Subcategory**: Tool Use & Environment


### [Tool/Agent Registry](https://designpattern.fyi/patterns/tool_agent_registry/)
- **Summary**: Maintain a single queryable catalog of tools and agents with capability metadata (cost, latency, quality) so the coordinator picks the right one per task.
- **Subcategory**: Tool Use & Environment


### [Toolformer](https://designpattern.fyi/patterns/toolformer/)
- **Summary**: Teach the model when and how to call tools through self-supervised training — no human-annotated tool-use traces required.
- **Subcategory**: Tool Use & Environment


### [Topic-Based Routing](https://designpattern.fyi/patterns/topic_based_routing/)
- **Summary**: Route inter-agent messages through named typed topics agents subscribe to — senders never need to know who&#39;s listening, and new subscribers join without touching the sender.
- **Subcategory**: Multi-Agent


### [Training vs. Inference Optimization](https://designpattern.fyi/patterns/training-vs-inference-optimization/)
- **Summary**: Training and inference optimization are almost orthogonal problems — different hardware, precision, batch sizes — yet most teams treat them as one thing.
- **Subcategory**: AI Infrastructure


### [Trajectory Anomaly Monitor](https://designpattern.fyi/patterns/trajectory_anomaly_monitor/)
- **Summary**: Run a trained, non-LLM verifier out-of-band over the agent&#39;s action trajectory at runtime to flag task-misaligned plans and malformed step sequence...
- **Subcategory**: Safety & Control


### [Transaction Log Tailing](https://designpattern.fyi/patterns/transaction_log_tailing/)
- **Summary**: Tap directly into the DB transaction log to publish events — zero application-level overhead.
- **Subcategory**: Messaging & Events


### [Transactional Client](https://designpattern.fyi/patterns/transactional_client/)
- **Summary**: Send messages as part of a DB transaction — both commit or both roll back.
- **Subcategory**: Messaging Endpoints


### [Transactional Outbox](https://designpattern.fyi/patterns/aws_transactional_outbox/)
- **Summary**: Ensure reliable message publishing by storing messages in the database as part of the transaction
- **Subcategory**: aws


### [Transactional Outbox](https://designpattern.fyi/patterns/transactional_outbox/)
- **Summary**: Write to DB and publish an event atomically — no dual-write, no lost messages.
- **Subcategory**: Messaging & Events


### [Transfer Learning](https://designpattern.fyi/patterns/transfer-learning/)
- **Summary**: Reuses pretrained model representations for new tasks with less data
- **Subcategory**: Training Process and Optimization


### [Transform](https://designpattern.fyi/patterns/transform/)
- **Summary**: Ensures identical feature transformation logic at training and serving time
- **Subcategory**: Data and Feature Representation


### [Translation Layer](https://designpattern.fyi/patterns/translation_layer/)
- **Summary**: Insert a typed boundary between the agent&#39;s clean domain model and a messy legacy API — vendor schema churn stays outside, agent reasoning stays clean.
- **Subcategory**: Tool Use & Environment


### [Tree of Thoughts](https://designpattern.fyi/patterns/tree_of_thoughts/)
- **Summary**: Explore multiple reasoning paths in parallel, prune bad ones, commit to the best.
- **Subcategory**: Reasoning


### [Trust and Reputation Routing](https://designpattern.fyi/patterns/trust_and_reputation_routing/)
- **Summary**: Maintain a per-agent reputation score updated from outcome quality and peer feedback — penalising agents whose outputs show signs of directive disclosure.
- **Subcategory**: Routing & Composition


### [Two-Phase Predictions](https://designpattern.fyi/patterns/two-phase-predictions/)
- **Summary**: Splits inference into fast local model and heavier cloud model for efficiency
- **Subcategory**: Serving and Operational Resilience


### [Typed Refusal Codes](https://designpattern.fyi/patterns/typed_refusal_codes/)
- **Summary**: Define a single source of truth for machine-readable refusal codes across all guard surfaces, so refusals can be triaged mechanically rather than b...
- **Subcategory**: Safety & Control


### [Typed Tool-Loop Failure Detector](https://designpattern.fyi/patterns/typed_tool_loop_detector/)
- **Summary**: Lift tool-loop detection from prompt-level rules (which the model can ignore) to a mechanical dispatch-boundary veto with five typed failure modes and per-tool caps.
- **Subcategory**: Cognition & Introspection


### [Unbounded Loop](https://designpattern.fyi/patterns/unbounded_loop/)
- **Summary**: Running the agent loop with no step budget — and trusting model self-termination to decide when to stop.
- **Subcategory**: Anti-Patterns


### [Unbounded Subagent Spawn](https://designpattern.fyi/patterns/unbounded_subagent_spawn/)
- **Summary**: A supervisor spawns sub-agents that can spawn their own sub-agents — with no global cap on the tree size or recursion depth.
- **Subcategory**: Anti-Patterns


### [Underfitting vs. Overfitting — Regularization Spectrum](https://designpattern.fyi/patterns/underfitting-vs-overfitting/)
- **Summary**: How much should the model constrain itself to avoid memorizing noise? L1, L2, dropout, batch normalization, early stopping, and data augmentation as regularization levers.
- **Subcategory**: Machine Learning


### [Unified Voice Interface](https://designpattern.fyi/patterns/unified_voice_interface/)
- **Summary**: Expose TTS, STT, and real-time speech-to-speech through a single interface so a voice agent can swap providers without rewriting the loop — while ensuring the audio channel does …
- **Subcategory**: Streaming & UX


### [Useful Overfitting](https://designpattern.fyi/patterns/useful-overfitting/)
- **Summary**: Deliberate overfitting when the goal is to approximate a known, deterministic function
- **Subcategory**: Training Process and Optimization


### [Vector Memory](https://designpattern.fyi/patterns/vector_memory/)
- **Summary**: Store memories as embeddings in a vector index and retrieve the most semantically similar items at query time — so relevance is judged by meaning, not keyword match or recency.
- **Subcategory**: Memory


### [Vectorless Reasoning-Based Retrieval](https://designpattern.fyi/patterns/vectorless_reasoning_retrieval/)
- **Summary**: Retrieve by having the model reason its way down a document&#39;s own table-of-contents tree to the relevant sections, instead of embedding chunks and ...
- **Subcategory**: Retrieval & RAG


### [Vendor Lock-In](https://designpattern.fyi/patterns/vendor_lock_in/)
- **Summary**: Wiring your agent directly to one provider&#39;s SDK — so switching providers costs you a rewrite.
- **Subcategory**: Anti-Patterns


### [Vickrey Auction Allocation](https://designpattern.fyi/patterns/vickrey_auction_allocation/)
- **Summary**: Assign tasks via sealed-bid auction — the lowest bidder wins but gets paid the second-lowest bid, making honest cost reporting the dominant strategy.
- **Subcategory**: Multi-Agent


### [Virtual Private Cloud](https://designpattern.fyi/patterns/gcp_vpc/)
- **Summary**: Network isolation and connectivity for cloud resources
- **Subcategory**: gcp


### [Visitor](https://designpattern.fyi/patterns/visitor/)
- **Summary**: Add new operations to an existing class hierarchy without modifying those classes — the Visitor carries the new behavior and visits each element.
- **Subcategory**: behavioral


### [Visual Workflow Graph](https://designpattern.fyi/patterns/visual_workflow_graph/)
- **Summary**: Express agentic logic as a visual graph of typed nodes connected on a canvas with Start and End nodes so non-coding stakeholders can read and edit the flow.
- **Subcategory**: Planning & Control Flow


### [Voting-Based Cooperation](https://designpattern.fyi/patterns/voting_based_cooperation/)
- **Summary**: Collect votes from multiple agents on candidate options and tally them to produce a collective decision — weighted by role, auditable by design.
- **Subcategory**: Multi-Agent


### [WebAssembly Skill Runtime](https://designpattern.fyi/patterns/wasm_skill_runtime/)
- **Summary**: Package agent skills as WebAssembly modules with explicit capability manifests — untrusted third-party skills run in strong isolation without container overhead.
- **Subcategory**: Tool Use & Environment


### [Weight-Only Quantization](https://designpattern.fyi/patterns/weight-only-quantization/)
- **Summary**: Store weights at INT4 but keep activations in FP16 — getting most of the memory win with a fraction of the accuracy cost of quantizing both.
- **Subcategory**: Quantization


### [Windowed Inference](https://designpattern.fyi/patterns/windowed-inference/)
- **Summary**: Externalizes time-dependent feature computation into stream processing
- **Subcategory**: Serving and Operational Resilience


### [Wire Tap](https://designpattern.fyi/patterns/wire_tap/)
- **Summary**: Tap into message flow silently — copy messages for inspection without disrupting the main stream.
- **Subcategory**: System Management


### [Workflow Pipeline](https://designpattern.fyi/patterns/workflow-pipeline/)
- **Summary**: Orchestrates ML process as discrete, executable components with clear dependencies
- **Subcategory**: Serving and Operational Resilience


### [World Model as Tool](https://designpattern.fyi/patterns/world_model_as_tool/)
- **Summary**: Let the planning agent call a generative world model (video diffusion, physics sim) as a tool to preview action consequences before committing — lookahead without acting first.
- **Subcategory**: Verification & Reflection


### [World-Model Separation](https://designpattern.fyi/patterns/world_model_separation/)
- **Summary**: Keep the agent&#39;s model of its environment (humans, repos, services) in a separate store from its self-model (charter, personality, boundaries) — so surprise-driven updates can&#39;t …
- **Subcategory**: Cognition & Introspection


### [You Aren't Gonna Need It (YAGNI)](https://designpattern.fyi/patterns/yagni/)
- **Summary**: Don&#39;t implement functionality until you actually need it.
- **Subcategory**: principles


### [Zero-Shot Chain-of-Thought](https://designpattern.fyi/patterns/zero_shot_cot/)
- **Summary**: Unlock step-by-step reasoning with a single prompt addition — no examples needed.
- **Subcategory**: Reasoning



---

## Machine-Readable Resources
- **JSON Feed**: https://www.designpattern.fyi/api/patterns.json
- **OpenAPI 3.1**: https://www.designpattern.fyi/api/openapi.json
- **llms.txt**: https://www.designpattern.fyi/llms.txt
