Skip to main content
XenonStack

Service Design

XenonStack Insights Behavioural Design Patterns and Best Practices

and | Published | Updated

Featured image titled Behavioural design patterns, with a stack from clear user intent through UX principles and patterns to reviewable agent decisions

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.

MeaningQuestion it answersTypical readerWhere to read
Software behavioural patternsHow should objects divide work and notify each other?Engineers, solution architectsThe next two sections
Behavioural design (UX)How do we help users act correctly with less effort?Product, design and platform leadsThe UX sections that follow
Both, in agentic systemsHow do we keep automated decisions reviewable and reversible?CTOs, CIOs, CISOsThe 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).

PatternWhat it doesWhen it fits
Chain of ResponsibilityPasses a request along handlers, each of which processes it or forwards itApproval chains, validation and middleware
CommandWraps a request in an object so it can be passed around, delayed, queued or undoneTask queues, undo and audit of actions
IteratorSteps through a collection without exposing how it is builtUniform traversal of different data structures
MediatorRoutes communication through a central hub so objects do not depend on each otherMany components that must coordinate
MementoSaves and restores an earlier state without exposing internalsSnapshots, rollback and checkpoints
ObserverLets objects subscribe to another object and receive notifications when it changesEvent-driven updates and alerts
StateChanges an object's behaviour as its internal state shiftsWorkflows with clear stages
StrategyPackages interchangeable algorithms so they can be swapped at runtimePricing, routing or model selection rules
Template MethodDefines an algorithm's skeleton and lets subclasses customise stepsShared process with variable steps
VisitorKeeps operations separate from the objects they work onAdding 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.

Two-column diagram mapping behaviour needs (approval route, undo, task stage, event notification) to patterns (Chain of Responsibility, Command and Memento, State, Observer), ending with explicit, logged, reversible behaviour

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.

PracticeWhat to doExample
Least effortRemove steps and pre-fill what you already knowSign in with an existing account instead of a new form
Prevent and forgive mistakesPredict confusion, confirm destructive actions, allow undoPassword confirmation, cart removal prompt, undo in editors
Keep patterns familiarPut components where users expect themFooter at the bottom, navigation in a consistent place
Chunk informationGroup related items so users process fewer things at onceGroup page components and limit recommendations shown
Give early successLet users complete something useful in the first momentsDefer optional questions until later
Show social proofDisplay real reviews, ratings and usage signals honestlyRatings and reviews on a product page
Build identity and feedbackKeep a consistent brand and confirm every actionMessages such as saved or request received
Care about aestheticsTreat visual quality as part of perceived reliabilityConsistent 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?

StepActionCheck before moving on
1. Name the behaviourWrite the single action you want users or agents to completeCan the team state it in one sentence?
2. Remove frictionCut steps, pre-fill data, add undoDoes a first-time user finish unaided?
3. Pick the patternChoose the software pattern that makes the behaviour explicitIs the pattern simpler than the code it replaces?
4. Add reviewLog decisions and let humans overrideCan you replay why a decision was made?
5. Test with usersRun usability tests and watch real behaviourDid 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.

Table of Contents

navdeep-singh-gill

Navdeep Singh Gill

Global CEO and Founder of XenonStack

LinkedIn profile

Navdeep Singh Gill is serving as Chief Executive Officer and Product Architect at XenonStack. He holds expertise in building SaaS Platform for Decentralised Big Data management and Governance, AI Marketplace for Operationalising and Scaling. His incredible experience in AI Technologies and Big Data Engineering thrills him to write about different use cases and its approach to solutions.

Get the latest articles in your inbox

Subscribe Now

Interested in solving your challenges with the XenonStack team?
Get Started

Tell us about you and your priorities so we can prepare the right conversation. It takes about 2 minutes.

Please Select your Industry
Banking
Fintech
Payment Providers
Wealth Management
Discrete Manufacturing
Semiconductor
Machinery Manufacturing / Automation
Appliances / Electrical / Electronics
Elevator Manufacturing
Defense & Space Manufacturing
Computers & Electronics / Industrial Machinery
Motor Vehicle Manufacturing
Food and Beverages
Distillery & Wines
Beverages
Shipping
Logistics
Mobility (EV / Public Transport)
Energy & Utilities
Hospitality
Digital Gaming Platforms
SportsTech with AI
Public Safety - Explosives
Public Safety - Firefighting
Public Safety - Surveillance
Public Safety - Others
Media Platforms
City Operations
Airlines & Aviation
Defense Warfare & Drones
Robotics Engineering
Drones Manufacturing
AI Labs for Colleges
AI MSP / Quantum / AGI Institutes
Retail Apparel and Fashion

Continue