Workflow patterns (reach for these before full agents)
Anthropic's catalog — most "agentic" products are one of these composable patterns, not an open-ended agent:
- Prompt chaining — decompose into a fixed sequence of steps, each an LLM call feeding the next (with optional validation gates). For tasks with clear sub-steps.
- Routing — classify the input, then dispatch to a specialized prompt/tool. (Support triage: billing vs technical vs refund.)
- Parallelization — run independent subtasks concurrently (sectioning) or the same task multiple times and aggregate (voting). Faster; more robust.
- Orchestrator–workers — a lead LLM breaks a task into subtasks, delegates to worker LLMs, and synthesizes. For tasks whose subtasks aren't known in advance.
- Evaluator–optimizer — one LLM generates, another critiques against criteria, loop until it passes. Great when you have clear quality signals (code that must pass tests, a translation that must preserve nuance).
Memory
Agents need state beyond a single context window:
- Short-term / working memory — the current conversation/loop state (in context, or a scratchpad).
- Long-term memory — durable facts across sessions, usually a vector store (embed and retrieve relevant memories) or a DB.
- Episodic memory — records of past experiences/trajectories the agent can learn from ("last time this tool failed, try X").
Practical rule: don't stuff everything in context — store durably, retrieve what's relevant for the current step.
Planning
For multi-step tasks, some agents plan first (generate a step list, then execute) rather than deciding purely step-by-step. Planning helps on complex tasks but can commit to a bad plan — the strongest systems re-plan as they learn (adjust the plan when an observation invalidates it). Balance upfront planning with the ability to adapt.