AI Agents Are Not Tools: Why Managing LLMs Is Like Managing a Court of Ministers
This article reframes large language models (LLMs) not as deterministic tools but as capable yet unpredictable "ministers" that developers must govern. It explains why the traditional tool metaphor fails in engineering practice, introduces a "Three Departments and Six Ministries" multi-agent architecture covering planning, review, and execution, and outlines core strategies such as context engineering, memory management, and observability. It concludes that human-in-the-loop oversight and clear accountability remain essential for building reliable AI-native systems.
AI Agents Are Not Tools: Why Managing LLMs Is Like Managing a Court of Ministers
When working closely with large language models (LLMs), many developers and enterprise architects develop a similar intuition: the relationship between humans and AI is undergoing a structural change. We initially treated AI as a “smarter code completion tool” or a “faster search engine,” but in real engineering practice, more and more people are realizing that this simplistic metaphor no longer holds.
A more insightful metaphor is this: we are dealing with a group of highly capable, well-read, but sometimes self-directed and occasionally nonsensical “intelligent ministers.” You are not operating a handy hammer; you are presiding over a court of officials. This metaphor is not only interesting but also accurately captures the core challenges in current AI application development: trust, control, and accountability.
This article explores the technical logic behind this “minister model,” analyzes why the traditional “tool theory” leads to failures in engineering practice, and provides architectural recommendations for building highly trustworthy AI collaboration systems.
1. Why the “Tool Theory” Fails
In traditional software engineering, tools are deterministic. You call a function with the parameter x=1, and it always returns y=2. Tools have no ambition and no misunderstandings; their behavior is strictly bounded by their code logic.
However, probability-based large models exhibit completely different characteristics:
- Intent Ambiguity: Just as a minister must interpret the ruler’s intent, AI must understand vague natural language instructions from humans. When you say “optimize this,” a tool will throw an error about missing parameters, but a “minister” will draw on its own knowledge and reasoning to guess your intent. It might optimize performance, optimize code formatting, or even “optimize” away your core business logic.
- Knowledge Boundaries and Hallucination: A well-read minister may quote classics, but he may also speak nonsense because he misremembers the content of a text. LLM hallucination is not an occasional bug but an inherent characteristic of its probability-based completion mechanism. If you treat it as a tool, you assume it will “stop on error”; if you treat it as a minister, it may seriously hand you a “memorial” that is logically self-consistent but factually completely wrong.
- Non-linear Capability Growth: Tool upgrades are usually linear (from version 1.0 to 1.1). The emergence of AI capabilities (Emergent Abilities) means it may suddenly acquire abilities beyond expectations on some tasks, while making basic mistakes on seemingly simple common-sense questions. This unpredictability requires managers (developers) to establish dynamic evaluation and monitoring mechanisms.
2. The “Three Departments and Six Ministries”: An Architectural Metaphor for AI Agents
Since AI is a “minister,” a single agent cannot handle complex modern software engineering requirements. We need architectural layering. Drawing on traditional governance structures, we can build a multi-agent collaboration architecture modeled after the “Three Departments and Six Ministries.” This is not simple role-playing, but a system design pattern based on the Separation of Concerns.
When building complex AI automation workflows, a single prompt is often insufficient. We need to assign different functions to different agent instances, forming a relationship of checks, balances, and collaboration.
1. The Secretariat: Drafting and Planning Layer
The Secretariat is responsible for pre-decision research and drafting proposals. In technical implementation, this corresponds to a Planner Agent or an Orchestrator Agent.
- Core Responsibility: Receive the user’s highest instruction, break it down into a sequence of executable subtasks, and select appropriate tools (Tool Selection).
- Technical Challenge: How to avoid “empty theorizing.” The plan proposed by the Secretariat must be technically feasible. This requires introducing the ReAct (Reasoning and Acting) pattern at this layer, allowing the model to not only perform chain-of-thought (CoT) reasoning but also reflect based on the external environment (such as the codebase and API documentation).
2. The Chancellery: Review and Risk Control Layer
This is the layer most easily overlooked by developers, yet it is the most critical for enterprise-grade applications. If there is only a Secretariat (execution) without a Chancellery (review), the AI’s output will be full of uncontrollable risks.
- Core Responsibility: “Reject and return” the code or proposals drafted by the Secretariat. This corresponds to a Critic Agent or a Guardrail Model.
- Implementation Practices:
- Static Review: Check generated code for obvious syntax errors and security vulnerabilities (such as SQL injection and sensitive information leakage).
- Compliance Review: Check whether the content complies with enterprise security policies and compliance requirements.
- Logical Debate: Use dual-model or even multi-model cross-validation, where one generates and the other critiques, approaching the correct answer through multiple rounds of dialogue.
3. The Department of State Affairs: Execution Layer
The Department of State Affairs is responsible for turning policies into concrete matters. In an AI system, this is the layer that truly interacts with the external world.
- Core Responsibility: Invoke specific toolchains, operate databases, modify files, and trigger container deployments. This corresponds to an Action Agent or a Tool-Use Agent.
- Security Boundary: The Department of State Affairs must be tightly constrained. Execute code in a sandbox environment, limit system permissions, and apply the Principle of Least Privilege to prevent a “minister” from accidentally deleting core data due to overconfidence.
3. Core Technical Strategies for Managing “Ministers”
To make these “ministers” work for you rather than hold you back or even “stage a coup” (cause system crashes), we need to implement a rigorous management mechanism.
1. Context Engineering: Handing the Right Memorial to the Minister
Do not expect a minister to remember all details from three months ago. Although the context window is growing larger, the “Lost in the Middle” phenomenon still exists.
- Strategy: Use RAG (Retrieval-Augmented Generation) technology to equip the agent with an external “history archive” (knowledge base). When a decision is needed, the system retrieves the most relevant document fragments (such as API documentation, historical commit records, and design pattern specifications) and dynamically injects them into the prompt.
- Code Example:
# Pseudocode: retrieve relevant context and build the promptcontext = retriever.search(query=user_input, top_k=5)system_prompt = f"""You are a rigorous architect assistant (a Secretariat official).Please answer based only on the following reference materials. If the materials are insufficient, answer "I do not know."Reference materials: {context}"""response = llm.generate(system_prompt + user_input)
2. Memory and State Management: Avoiding “Amnesia” and “Personality Splits”
In multi-turn interactions and long-cycle tasks, the agent needs to maintain context consistency.
- Short-term Memory: Maintain conversation history and the current task state.
- Long-term Memory: Store vectorized summaries of key historical interactions for future tasks. For example, remembering that “this user dislikes a specific design pattern” and avoiding it in future code generation.
3. Evaluation and Observability: Establishing a “Censorate”
We cannot blindly trust the verbal reports of “ministers”; we must have data support.
- Monitoring Metrics: Monitor not only token consumption and latency but also the agent’s success rate, tool invocation accuracy, and the frequency of human intervention (Human-in-the-loop).
- Log Tracing: Record the complete chain of every Thought, Action, and Observation. When an error occurs, precisely locate whether the Secretariat’s plan was wrong or the Department of State Affairs’ execution went astray.
4. The Ultimate Principle: The Final Authority of the Emperor (Developer)
No matter how AI capabilities evolve and no matter how complete the multi-agent architecture is, we must establish one bottom line: Human-in-the-loop.
Treating AI as a minister does not mean becoming a hands-off manager; it requires you to become a more advanced “manager” and “decision-maker.”
- Define Success Criteria: Developers no longer need to write every line of code, but they need to define clear acceptance criteria and test frameworks (Evaluation).
- Approval at Key Nodes: For high-risk operations involving core logic modifications, production environment deployments, and large-scale data deletion, human approval nodes must be set. AI provides proposals and impact analysis, and humans press the final approval button.
- Accountability: When code has a bug, the AI wrote it, but the responsibility lies with the person who committed the code and the person who approved the merge.
Conclusion
Simply viewing AI as a “tool” leads to frustration when facing its uncertainty; viewing AI as a group of “ministers” with varying abilities that need careful management helps us build more robust and scalable AI-native applications.
The future of software development architecture is essentially a human-AI collaborative governance structure. What developers need to master is no longer just programming syntax, but also prompt engineering, context management, agent orchestration, and risk assessment. Only by establishing a complete “Three Departments and Six Ministries” mechanism and firmly holding the final decision-making power can we truly harness this wave of AI technology and turn it into tangible productivity.
