Key takeaway
- Behavioural design patterns explained: the ten software patterns and the UX behaviour principles behind them, with a decision guide for architects.
What are behavioural design patterns?
The phrase has two meanings. In software engineering, behavioural design patterns are reusable answers to how objects share responsibility and communicate. Refactoring Guru describes them as being "concerned with algorithms and the assignment of responsibilities between objects". In product design, behavioural design is the practice of shaping an interface so that people can complete the right action with less effort and fewer mistakes.
This guide covers both, because enterprise teams now meet them in the same place: agentic systems where code decides what happens next and people must trust, approve or undo it. For the structural and creational side of the catalogue, see our guide to design patterns in TypeScript and JavaScript.
Which meaning of behavioural design do you need?
Use the table to pick the right half of this article.
| Meaning | Question it answers | Typical reader | Where to read |
|---|---|---|---|
| Software behavioural patterns | How should objects divide work and notify each other? | Engineers, solution architects | The next two sections |
| Behavioural design (UX) | How do we help users act correctly with less effort? | Product, design and platform leads | The UX sections that follow |
| Both, in agentic systems | How do we keep automated decisions reviewable and reversible? | CTOs, CIOs, CISOs | The governance section |
What are the ten behavioural design patterns?
Refactoring Guru lists ten behavioural patterns. Some older catalogues also include Interpreter, so confirm against the catalogue your team follows. Descriptions below follow the Refactoring Guru page (read 13 November 2026).
| Pattern | What it does | When it fits |
|---|---|---|
| Chain of Responsibility | Passes a request along handlers, each of which processes it or forwards it | Approval chains, validation and middleware |
| Command | Wraps a request in an object so it can be passed around, delayed, queued or undone | Task queues, undo and audit of actions |
| Iterator | Steps through a collection without exposing how it is built | Uniform traversal of different data structures |
| Mediator | Routes communication through a central hub so objects do not depend on each other | Many components that must coordinate |
| Memento | Saves and restores an earlier state without exposing internals | Snapshots, rollback and checkpoints |
| Observer | Lets objects subscribe to another object and receive notifications when it changes | Event-driven updates and alerts |
| State | Changes an object's behaviour as its internal state shifts | Workflows with clear stages |
| Strategy | Packages interchangeable algorithms so they can be swapped at runtime | Pricing, routing or model selection rules |
| Template Method | Defines an algorithm's skeleton and lets subclasses customise steps | Shared process with variable steps |
| Visitor | Keeps operations separate from the objects they work on | Adding operations to stable object structures |
How do behavioural patterns help with agentic workflows?
This section is design guidance from our own practice, not a claim from the sources above. Agentic workflows hand decisions to software, so the patterns that make behaviour explicit become governance tools. Command and Memento give you actions that can be logged and rolled back. State makes the stage of a task visible. Chain of Responsibility models an approval route. Observer carries events to the people or systems that must react. Strategy keeps the choice of model or rule swappable and reviewable.
For example, a refund agent can be built as a chain of handlers, where each handler either decides within its limit or passes the case to a human approver, and every decision is stored as a command that can be reviewed later. ElixirData keeps governed context, versioned policy and decision traces in one decision layer above AI agents, which is where such stored decisions are meant to live.
What is behavioural design in UX?
Behavioural design asks how an interface shapes what people do. A widely cited model is the Fogg Behavior Model (B=MAP), developed by Dr BJ Fogg, who founded the Behavior Design Lab at Stanford University. Its core statement is that behaviour happens when motivation, ability and a prompt come together at the same time (behaviormodel.org, read 13 November 2026). For designers this means you can raise the odds of an action by making it easier, or by timing the prompt better, rather than by pushing motivation alone.
A second foundation is the limit on what people hold in mind. George A. Miller's 1956 paper in Psychological Review, "The Magical Number Seven, Plus or Minus Two", concluded that immediate memory is limited by the number of chunks, and that grouping information into familiar chunks lets people retain more. Treat it as a reason to group content, not as a hard rule of seven items per screen.
What are the best practices of behavioural design?
The practices below come from the original article, restated as design decisions. They are design guidance, so test each against your own users before you roll it out.
| Practice | What to do | Example |
|---|---|---|
| Least effort | Remove steps and pre-fill what you already know | Sign in with an existing account instead of a new form |
| Prevent and forgive mistakes | Predict confusion, confirm destructive actions, allow undo | Password confirmation, cart removal prompt, undo in editors |
| Keep patterns familiar | Put components where users expect them | Footer at the bottom, navigation in a consistent place |
| Chunk information | Group related items so users process fewer things at once | Group page components and limit recommendations shown |
| Give early success | Let users complete something useful in the first moments | Defer optional questions until later |
| Show social proof | Display real reviews, ratings and usage signals honestly | Ratings and reviews on a product page |
| Build identity and feedback | Keep a consistent brand and confirm every action | Messages such as saved or request received |
| Care about aesthetics | Treat visual quality as part of perceived reliability | Consistent colour, spacing and type |
What is in the behavioural design toolkit?
Four tools recur in practice. Cues are triggers that prompt an action, and work best when they arrive in the user's own context. Ambient communication uses colour, scale, motion or sound to convey dense information faster than text. Personalisation adapts the experience to different user groups, skill levels and needs, and machine learning can now do this at larger scale. Optimal information flow sequences steps and information so that each person meets the right content before they struggle, which suits one-off tasks such as sign-up or checkout.
For deeper interface guidance, read our guides to principles of user interface design, user experience design and conversational user interface best practices.
When does behavioural design become manipulation?
Designing for behaviour is legitimate when it helps people do what they intend. It becomes a problem when it traps or tricks them. In September 2022 the US Federal Trade Commission published a staff report titled "Bringing Dark Patterns to Light", and regulators in other regions also watch deceptive design; confirm the current rules that apply to you on the official pages. A practical test is whether a user could explain, afterwards, why the interface led them to that choice.
The same test applies to agents. If an agent nudges a customer or an employee, the nudge is a decision, and it should leave a trace. The Decision Review Agent describes reviewing agent decisions, finding patterns and recommending improvements, and ElixirClaw is an agentic OS platform to build, orchestrate and govern AI agents and automation workflows while keeping humans in control.
How should you adopt behavioural patterns and design?
| Step | Action | Check before moving on |
|---|---|---|
| 1. Name the behaviour | Write the single action you want users or agents to complete | Can the team state it in one sentence? |
| 2. Remove friction | Cut steps, pre-fill data, add undo | Does a first-time user finish unaided? |
| 3. Pick the pattern | Choose the software pattern that makes the behaviour explicit | Is the pattern simpler than the code it replaces? |
| 4. Add review | Log decisions and let humans override | Can you replay why a decision was made? |
| 5. Test with users | Run usability tests and watch real behaviour | Did the metric improve without hurting trust? |
Patterns are not free. Each adds classes and indirection, so skip a pattern when a simple function does the job. Skip persuasive design for high-stakes or regulated choices unless a reviewer can inspect it.
To map one behavioural decision your agents should make, and the context and policy it depends on, book a Context Workshop. See what happens in the workshop.
Frequently asked questions
What are behavioural design patterns?
In software, they are reusable solutions for how objects divide responsibility and communicate, such as Observer, Strategy and State. Refactoring Guru lists ten of them.
How many behavioural design patterns are there?
Refactoring Guru lists ten: Chain of Responsibility, Command, Iterator, Mediator, Memento, Observer, State, Strategy, Template Method and Visitor. Some catalogues also include Interpreter.
What is the Fogg Behavior Model?
It is B=MAP, from Dr BJ Fogg of the Behavior Design Lab at Stanford University. Behaviour happens when motivation, ability and a prompt come together at the same time.
Is the 'seven plus or minus two' rule a design rule?
Miller's 1956 paper concluded that immediate memory is limited by chunks, not that screens must hold seven items. Use it as a reason to group content.
How do behavioural patterns apply to AI agents?
Command, Memento and State make agent actions loggable, reversible and visible, and Chain of Responsibility models human approval. This is design guidance, not a vendor claim.
Related reading: design patterns in automation testing.
Explore the XenonStack platform family: ElixirData · ElixirClaw · ElixirHub · NexaStack · MetaSecure · Neural AI · AgentGRC · AgentSRE · AgentAnalyst · AgentInstruct · AgentRAI · AgentScrum · AgentSearch · AgentForce · AI Aviator · SAIF Aviator · CohortIQ · XenonStack AI · XenonStack UAE