AI Agent Cognitive Architecture
A model is only one part of an agent. A working system also needs task state, a plan, controlled tools and a way to decide whether the result is complete.
#Four components and one feedback loop
| Component | Responsibility | Typical failure |
|---|---|---|
| Decision layer | Interpret the objective and choose the next step | Answers before gathering necessary evidence |
| Memory | Retain relevant constraints and observations | Old assumptions are stored as facts |
| Planning | Order work and revise it after feedback | Repeats a failing action indefinitely |
| Tools | Read or change the external environment | Executes beyond the user's permissions |
The runtime supplies the current state, the model proposes an action, the application validates and executes it, and the observation updates state. Stop when acceptance criteria are met or a time, usage or step limit is reached.
#Decision layer
Evaluate instruction following, tool-call structure and the ability to use observations. A larger model is not a substitute for missing permissions, unreliable tools or an unclear objective. Routing, extraction and difficult analysis can have different model requirements.
#Short- and long-term memory
Recent messages, task summaries and explicit state keep a current task coherent. Durable knowledge may use retrieval, but exact facts such as user permissions, document versions and account configuration belong in structured records. Store source and verification status with important facts.
#Planning and tools
For a login bug, a useful plan is reproduce, inspect the relevant code, make a narrow change, run checks and inspect the resulting behavior. A plan must respond to failed tests; it is not a fixed script or proof that work happened.
Tools should have narrow schemas, bounded results and explicit error states. Distinguish a proposed write, an executed write and a read-back confirming the result. Logs should record observable decisions and actions without requiring hidden reasoning.
#Check the complete system
Test a missing document, a failed tool, an unauthorized operation and an interrupted run. A successful final paragraph is insufficient if the action never completed.