Agent architecture patterns

The classic ways to assemble LLMs into something reliable — each explained simply, with a diagram and a concrete example.

building

The augmented LLM

The building block of every agent: a model plus tools, retrieval and memory. Nothing works without it.

Le LLM augmenté

La brique de base de tout agent : un modèle plus des outils, de la recherche et de la mémoire. Rien ne fonctionne sans elle.

prompting

Few-shot: show, don't tell

Two or three worked examples in the prompt beat a page of instructions — and cached right, they're almost free.

Structured output: make it speak JSON

Demand a machine-readable format instead of prose — shorter, checkable, pluggable into code. The pattern that turns chat into a component.

workflow

Prompt chaining

Break a task into fixed steps, each LLM call feeding the next. The assembly line of AI workflows.

Le chaînage de prompts

Découper une tâche en étapes fixes, chaque appel LLM nourrissant le suivant. La chaîne de montage des workflows IA.

Routing

Classify the request first, then send it to the specialist path built for it. The reception desk of AI systems.

Le routage

Classer la demande d'abord, puis l'envoyer vers le parcours spécialiste conçu pour elle. La réception des systèmes IA.

Parallelization

Run several LLM calls at once — to split the work (sectioning) or to cross-check an answer (voting).

La parallélisation

Lancer plusieurs appels LLM en même temps — pour répartir le travail (découpage) ou recouper une réponse (vote).

Orchestrator–workers

One LLM plans and delegates, several workers execute in their own context. The site foreman of AI architectures.

Orchestrateur-ouvriers

Un LLM planifie et délègue, plusieurs ouvriers exécutent chacun dans leur propre contexte. Le chef de chantier des architectures IA.

Evaluator–optimizer

One LLM produces, another critiques, and the loop repeats until it's good. The writer-and-editor duo.

Évaluateur-optimiseur

Un LLM produit, un autre critique, et la boucle recommence jusqu'à ce que ce soit bon. Le duo écrivain-éditeur.

Plan, then execute

Make the model write its plan first, validate it, then let it act. The approved blueprint before construction.

Planifier, puis exécuter

Faire écrire le plan complet au modèle, le valider, puis le laisser agir. Le devis approuvé avant les travaux.

agent

The agent loop

Plan, act, observe, repeat — the model steers itself with tools until the goal is reached. Powerful, and to be handled accordingly.

La boucle d'agent

Planifier, agir, observer, recommencer — le modèle se pilote lui-même avec des outils jusqu'à l'objectif. Puissant, et à manier en conséquence.

Agent memory

A notebook for the session, an archive for the long run, and the art of summarizing before the desk overflows.

La mémoire d'agent

Un carnet pour la session, une archive pour le long terme, et l'art de résumer avant que le bureau ne déborde.

Multi-agent systems

Several full agents — each with its own loop, tools and context — collaborating on one goal. Powerful, expensive, often overkill.

Les systèmes multi-agents

Plusieurs agents complets — chacun sa boucle, ses outils, son contexte — qui collaborent vers un objectif. Puissant, coûteux, souvent excessif.

safety

Human in the loop

The AI prepares, a human approves the moments that matter. Not a fallback — a design pattern.

L'humain dans la boucle

L'IA prépare, un humain valide les moments qui comptent. Pas une roue de secours — un pattern de conception.

Guardrails

Automatic checks around the model that block bad inputs and bad outputs. The crash barriers of AI systems.

Les guardrails

Des contrôles automatiques autour du modèle qui bloquent les mauvaises entrées et les mauvaises sorties. Les glissières de sécurité des systèmes IA.

implementation

Where to start: your first agent

Start with one call, add a pattern only when a measured problem demands it — and a decision tree to pick the right one.

Par où commencer : votre premier agent

Commencer par un seul appel, n'ajouter un pattern que lorsqu'un problème mesuré l'exige — avec un arbre de décision pour choisir le bon.

Evaluate and observe

Log every step, build a test set from real failures, measure before changing anything. The dashboard and crash tests of your agent.

Évaluer et observer

Journaliser chaque étape, construire un jeu de tests à partir des vrais échecs, mesurer avant de changer quoi que ce soit. Le tableau de bord et les crash-tests de votre agent.

Budgets, costs and limits

The meter and the circuit breaker: know what each turn costs, cache the stable, cap the loops. Cost control is architecture, not accounting.

Budgets, coûts et limites

Le compteur et le disjoncteur : savoir ce que coûte chaque tour, mettre en cache le stable, plafonner les boucles. La maîtrise des coûts est une affaire d'architecture, pas de comptabilité.