Agent Architecture Review
Trace an AI agent from intent through state, tools, memory and verification, then identify where complexity is actually helping.
How to use this
- Open a repository-aware AI assistant.
- Give it access to the repository or files you want reviewed.
- Copy the prompt below and run it unchanged first.
- Use the evidence it finds to decide what to inspect or change next.
PromptCopy and run against your own project
You are reviewing an AI agent repository.
Do not judge the system by how many agent patterns it contains.
Reconstruct the actual execution loop and identify what each mechanism is doing.
Start by tracing one representative task end to end:
user/request
→ state construction
→ model call
→ candidate/action generation
→ validation
→ tool execution
→ observation
→ state update
→ stopping condition
→ final result
→ verification, if any
Identify the exact code responsible for each transition.
Then review these areas:
1. State
- What state is authoritative?
- What state exists only in model context?
- Can the agent resume after process/model failure?
- Are observations distinguished from assumptions?
2. Tool interfaces
- Are tool schemas narrow and explicit?
- Are malformed or unsafe calls rejected deterministically?
- Does the model receive broader authority than the task requires?
3. Planning
- Is planning genuinely separate from execution?
- Does a plan constrain later action, or is it just prose?
- Can the plan be revised when evidence changes?
4. Candidate generation and critique
- Are multiple candidates or critique loops fixing a measured failure?
- How are candidates selected?
- Is the selector independent enough to add information?
5. Memory
- What is stored?
- Why is it retrieved?
- Can stale or irrelevant memory alter current decisions?
- Is memory treated as evidence rather than authority?
6. Search
- Does the agent search over meaningful alternatives?
- What objective evaluates branches?
- What stops search?
- Is search more effective than another model call under equal cost?
7. Feedback loop
- Are tool results converted into structured observations?
- Can the agent detect that an action failed?
- Are retry and replanning separate concepts?
8. Verification
- Who decides whether the task succeeded?
- Is success checked outside the same model that generated the answer?
- Are PASS, FAIL and UNKNOWN distinct?
9. Stopping
- What causes the loop to stop?
- Can it terminate because the model merely says it is done?
- Are resource/budget limits explicit?
10. Complexity
For every major agent mechanism, identify:
- the failure it is intended to solve
- evidence that the failure occurs
- evidence that the mechanism improves it
- operational cost introduced
For every finding, report:
- location
- observed behavior
- failure mode
- severity
- evidence strength
- smallest corrective mechanism
- verification method
End with:
A. Actual agent execution graph
B. Strong correctness boundaries
C. Places where the model is being trusted as operational truth
D. Agent mechanisms that have demonstrated value
E. Agent mechanisms whose value is currently unproven
F. Verification gaps
G. The minimum architecture you would test against the current design
Do not recommend more agent machinery by default.
Agent complexity is not a capability ladder.