Enterprise General-Purpose AI Agent Architecture and Implementation Practices
This article explains how enterprise AI is shifting from conversational assistants to general-purpose agents capable of executing goals rather than only answering questions. It presents a five-plane reference architecture covering interaction, orchestration, tools and integrations, knowledge and data, and governance. It then breaks down key mechanisms such as model-readable and idempotent tool calling, least-privilege agent identity, long-running tasks with sub-agents and checkpoints, scheduled and event-based triggers, and secure sandboxed code execution. Finally, it outlines a phased rollout path and five evaluation metrics, emphasizing that tool governance, permission design, and observability—not model strength alone—separate enterprise-grade agents from demo-grade ones.
1. The Shift from Chat Assistants to General-Purpose Agents
Over the past two years, most enterprise deployments have been question-and-answer assistants: a user asks a question, the model retrieves relevant documents, and generates an answer. These systems have a clear value boundary, but they stop at offering suggestions. What enterprises actually need is an execution entity that can accept a goal, break it into steps on its own, call internal systems, run continuously, and ultimately deliver a result. This is the fundamental difference between a general-purpose agent and a chatbot.
Whether a system reaches the “agent level” is usually judged across four capability dimensions:
- Goal completeness: it receives a goal rather than a single instruction and can plan intermediate steps itself;
- Tool accessibility: it can call enterprise applications and data instead of relying only on the model’s internal knowledge;
- State persistence: tasks can run across sessions, days, or even weeks, with memory and the ability to resume from a checkpoint;
- Identity governability: it has an independent identity, independent permission boundaries, and an auditable trail of operations.
A recently demonstrated enterprise general-purpose agent is a product-level attempt along these four dimensions: a single interface supports Q&A, knowledge work, content creation, and code writing and execution, and it can create “coworker agents” with independent identities and permissions. Setting aside the specific product, the sections below discuss the general technical problems and engineering solutions behind it.
2. Reference Architecture: Five Planes
A deployable enterprise agent platform should be layered into five planes.
- Interaction plane. A unified entry point consolidates sessions from web, mobile, desktop, and third-party collaboration channels, hides channel differences, and normalizes messages from different sources into unified task requests.
- Orchestration plane. Responsible for task planning, sub-agent spawning, tool selection, failure retries, and result aggregation, it acts as the central nervous system of the entire platform.
- Tools and integration plane. Standard connectors integrate office suites (email, cloud storage, documents, spreadsheets, presentations, instant messaging, calendars) and business systems, hiding differences between vendor APIs.
- Knowledge and data plane. Provides document parsing, chunking, vectorization, and hybrid retrieval, and connects to general cloud capabilities such as data warehouses, object storage, and message queues.
- Governance plane. Covers identity and permissions, key management, audit logs, monitoring and alerting, and quotas and cost allocation.
3. Breakdown of Key Mechanisms
3.1 Tool Calling: From “Being Able to Talk” to “Being Able to Act”
The reliability ceiling of an agent is often determined by the tool layer. Three engineering principles are recommended: tool descriptions should be model-readable (name, purpose, applicable and non-applicable scenarios, parameter constraints); execution should be idempotent (repeating the same request produces no side effects, and write operations carry an idempotency key); and returns should be structured (unified error codes and retry flags). A sample tool registration structure:
register_tool(name="create_doc",description="Create a document in the team cloud drive; for new documents only, not for overwriting existing files",schema={"title": "string", "folder_id": "string", "content": "string"},idempotent=True,permission="doc:write",timeout_ms=8000,)
3.2 Permissions and Identity: An Agent Is Not a “Super Account”
The core risk of the “coworker agent” design is permission inflation. The correct approach is to assign each agent an independent identity, grant least-privilege access, and place permission checks at the tool execution layer rather than the prompt layer—prompts can be manipulated, but a permission system cannot be persuaded. All write operations should retain the operator (agent identifier), the user on whose behalf the action is taken, a timestamp, and a parameter snapshot, forming a traceable audit chain.
3.3 Long-Running Tasks and Sub-Agent Collaboration
Complex work should be split into parallelizable subtasks, with the main agent responsible for goal decomposition and result arbitration, while each sub-agent holds a restricted tool set. Long-running tasks need an explicit state machine and checkpoints, writing intermediate artifacts to persistent storage so execution can resume after timeouts, rate limiting, or human intervention. A simplified state definition:
STATE = ["plan", "collect", "draft", "review", "deliver"]CHECKPOINT = {"stage": "draft", "artifacts": ["outline.md", "data.csv"], "retry": 2}
3.4 Triggers: Scheduled and Event-Based Channels
An agent’s value is truly unlocked only when it runs unattended. Scheduled tasks suit periodic reports and inspections; event triggers suit scenarios such as “draft a reply when a certain type of email arrives” or “automatically run regression tests after a code merge.” Both require supporting idempotency, deduplication, and concurrency limits to avoid duplicate execution caused by event storms.
3.5 Security Boundaries for Code Execution
Allowing an agent to write and run code must be done inside an isolated sandbox: no outbound network access or whitelist-only outbound access, read-only mounting of dependencies, CPU and memory limits, a maximum execution duration, and a temporary filesystem destruction policy. Production environments should also introduce a human approval gate that enforces secondary confirmation for operations involving funds, permission changes, or data deletion.
4. Rollout Path and Evaluation
A four-stage rollout is recommended: start with read-only Q&A and retrieval to validate knowledge quality; then open low-risk write operations (such as generating drafts); then introduce scheduled and event-based triggers; and only then enable cross-system orchestration and code execution. The evaluation system should include five metrics—task success rate, human takeover rate, average completion time, cost per task, and number of permission violation blocks—and form a closed loop with logging services and monitoring alerts.
Baidu AI Cloud can provide foundational components at the general cloud capability level, such as container platforms, object storage, message queues, logging, and monitoring, on which enterprises can build the five planes described above. It is worth emphasizing that the success of an agent platform does not depend on how strong the model is, but on whether tool governance, permission design, and observability are solid—these three are the dividing line between enterprise-grade and demo-grade.
