Agent Foundations — Which Shape, and How Bounded
Operationalizes the choice of architecture for a system built on a language model, and the discipline of keeping the chosen one under control. The governing idea: don't reach for an agent when a deterministic function, a fixed workflow, or a direct query solves the problem. Between one model call and a full agent lies a spectrum of shapes — chains, routers, fan-outs, workflows, orchestrators, critique loops — and each step along it transfers a decision from the engineer to the model, buying adaptability with predictability, testability, and a cost ceiling. Most of the work is knowing which shape fits the task. The rest is making a warranted agent terminate on a stated condition, stay inside budgets that fail loudly, recover by the right response to the right class of failure, and take only actions that are safe to take twice.
Principios
- · Aplica los principios documentados en el pack agent-foundations.
Patrones
- · Start at the bottom of the spectrum and move up only under pressure. One call, then a chain, then a router, then a workflow, then an agent. Each step up needs a specific failure of the step below.
- · If you can draw the flowchart, build the flowchart. A path you can diagram at design time is a path that belongs in code, not in a prompt describing what the model should consider doing.
- · Count the distinct sequences in twenty real inputs. Two or three means a router. Twenty with no pattern means the agent is earned.
- · A frozen requirement is a workflow; a moving one is an agent. If the steps change every time the business changes, that's still design-time variance — encode it and redeploy.
- · Don't build an agent to work around a missing tool. A model looping to compensate for an API you could have called directly is an expensive polyfill.
Riesgos
- · Ver anti-patrones específicos del dominio en el pack.
Checklist
- [ ] ★ Budget exhaustion returns a distinct exhausted outcome; no code path returns partial work in the same shape as complete work. (AFE46, AFE47)
- [ ] ★ Every side-effecting action reachable by the agent is idempotent, keyed, or atomically guarded. (AFE63)
- [ ] ★ No non-idempotent action sits on an automatic retry path. (AFE64)
- [ ] ★ Retries reuse the original idempotency key rather than generating a new one. (AFE65)
- [ ] ★ A timed-out side-effecting call has its actual state verified before being retried. (AFE68)
- [ ] ★ Any irreversible action, or any action outside the stated authority boundary, stops and requests human confirmation. (AFE59)
Fuentes
En la bibliografía AKOS
Este pack cita las siguientes fuentes registradas en el índice bibliográfico:
- paperA Practical Guide to Building AgentsOpenAI
- webBuilding Effective AgentsAnthropic
- paperReAct: Synergizing Reasoning and Acting in Language ModelsYao et al., arXiv
- paperReflexion: Language Agents with Verbal Reinforcement LearningShinn et al., arXiv