AI Agents: From Conversation to Execution in Real Business Workflows
This article explains how to move AI agents beyond simple question-and-answer interactions into executing real tasks across business systems. It covers a reusable five-layer agent architecture, intent-to-tool mapping with slot filling and two-phase planning, common integration paths, voice outbound call requirements and compliance boundaries, permission and human-in-the-loop safeguards, observability metrics, and a phased rollout strategy. Readers will learn the key engineering decisions that determine whether an agent stays a demo or becomes production-ready.
1. Background: Why “Being Able to Chat” Is Not the Same as “Getting Things Done”
Most people’s first impression of AI is still limited to question answering: you enter a description and get back a piece of text. This kind of interaction is already valuable for writing copy, explaining concepts, and generating sample code, but it has a natural boundary: the model only outputs suggestions, and a human still performs the actual operations. After receiving instructions on “how you should book a flight,” the user still has to open the app, filter options, fill in details, and complete the payment themselves. The longer the chain, the greater the conversion loss.
Pushing AI into the execution layer is fundamentally about solving three engineering problems. First, how model output becomes deterministic calls to external systems. Second, how a single task spanning multiple business systems is orchestrated and rolled back on failure. Third, how to set permission boundaries and human confirmation points when execution involves funds and personal information. These three problems determine whether an agent stays in the demo stage or can enter a real production environment.
2. Capability Layers: A Reusable Reference Architecture for Agents
It is advisable to split the system into five layers that communicate through explicit contracts, avoiding the architecture trap of “one large model does everything.”
- Interaction layer: a unified entry point for text, voice, and multimodal input, responsible for session state and context management.
- Cognition layer: intent recognition and task planning, breaking vague expressions into a structured sequence of sub-goals.
- Tool layer: packaging business capabilities into tool descriptions that the model can call (name, purpose, parameter schema, return structure).
- Orchestration layer: a task state machine responsible for serial/parallel scheduling, timeout control, retries, and compensation.
- Governance layer: identity authentication, least privilege, audit logs, and secondary confirmation for sensitive operations.
The quality of tool descriptions in the tool layer is often underestimated. The model cannot “understand” a business system; it can only infer which tool to call and what parameters to pass based on the textual contract you provide. Vague descriptions directly lead to choosing the wrong tool or hallucinating parameters.
{"name": "create_travel_order","description": "Create a draft itinerary order based on city, date, and number of passengers; only creates a draft and does not trigger payment","parameters": {"type": "object","properties": {"origin_city": { "type": "string" },"destination_city": { "type": "string" },"depart_date": { "type": "string", "format": "date" },"passengers": { "type": "integer", "minimum": 1 }},"required": ["origin_city", "destination_city", "depart_date"]}}
3. From One Sentence to One Call: Mapping Intent to Execution
User expressions are usually elliptical. “Book me a high-speed train to Shanghai tomorrow afternoon” is missing the origin, the passenger, and seat class preference. The mature approach is not to have the model guess directly, but to introduce “slot filling plus a clarification strategy”: when a required slot is missing, fill it with one short follow-up question; when an optional slot is missing, use the user’s historical preferences or platform defaults, and explicitly state in the result which default assumptions were used.
For the planning stage, a two-phase approach of “produce the plan first, then execute” is recommended. First return a readable list of steps for the user to confirm, then proceed to the calls. This both reduces the cost of mistaken operations and makes troubleshooting easier: you can tell exactly which step had a parameter problem.
Plan preview1. Search for trains departing origin (Beijing) -> Shanghai on 2026-08-272. Select the earliest train after 14:00, second class3. Generate an order draft and wait for the user to confirm paymentContinue?
4. Ecosystem Integration: A General Engineering Path for Connecting Capabilities
The experience of “getting things done with one sentence” is not backed by a stronger model, but by a wider integration surface. There are generally three common integration paths: official open APIs, standardized identity authorization flows, and an adapter layer for legacy systems. The third is the most easily overlooked, yet it often determines coverage: many internal systems have no modern interfaces and require an adapter layer for protocol conversion and data mapping.
From an engineering standpoint, it is recommended to funnel everything through a unified gateway: all tool calls go through the same entry point, making it easy to apply rate limiting, authentication, auditing, and canary releases. Also annotate each tool with idempotency and rollback capability, and let the orchestration layer decide retry policies accordingly. Non-idempotent write operations (such as creating an order or initiating a payment) must be paired with an idempotency key; otherwise a single network hiccup can produce duplicate orders.
5. Voice Outbound Calls: Naturalness of Interaction and Compliance Red Lines
Having AI make a confirmation call in a real human voice is a leap in experience and the most risk-concentrated area. Technically, it requires solving streaming speech recognition, low-latency synthesis, interruption handling, and noise robustness. From an engineering standpoint, it requires solving the call state machine and exception branches (busy line, no answer, the other party requesting a human agent).
On compliance, several bottom lines must be held: clearly inform the other party at the start of the call that this is an automated assistant; do not use it for harassment, marketing bombardment, or bypassing human customer service; retain call records throughout for auditing; and provide a channel to transfer to a human at any time. Treating “the other party cannot tell” as a product goal is inappropriate; the correct goal is “efficient communication with transparent identity.”
6. Permissions, Security, and Human Fallback
The greater the execution power, the higher the governance requirements. Practical measures include: authorize at tool granularity, with sensitive tools classified separately; require secondary confirmation for funds-related operations, displaying a summary of the amount and the payee; record tamper-proof audit logs for all write operations, including the caller, a parameter summary, timestamp, and result; and set per-user and global call frequency limits to prevent abnormal amplification.
Fallback mechanisms are equally critical. It is recommended to set a timeout and failure threshold for each task chain; when exceeded, stop and hand over to a human, while outputting a structured failure reason rather than a generic “operation failed” message.
7. Observability and Performance Evaluation
Before launch, you need to establish a metric baseline: intent recognition accuracy, slot filling completeness, tool selection accuracy, first-attempt task success rate, average completion time, and human intervention rate. Logs and tracing should cover the full chain of “user input - planning result - tool call - business response,” making it easy to determine whether the problem is a comprehension error or an interface error.
Evaluation should distinguish two types of failures: comprehension failures are solved by optimizing prompts and clarification strategies; execution failures are solved by interface stability, retries, and compensation. Looking at metrics mixed together will cause the optimization direction to lose focus.
8. Supporting Capabilities from Baidu AI Cloud’s Perspective
In Baidu AI Cloud’s general capability system, this type of system is typically carried by several foundational components: the container platform handles elastic scaling for agent services and the adapter layer; a message queue is used to asynchronously decouple long-running tasks; object storage holds call recordings and audit files; log services and monitoring alerts provide full-chain observability; and identity and access management support least-privilege authorization at tool granularity. The orchestration logic for model capabilities, voice capabilities, and business interfaces is defined by the user according to their own scenarios, avoiding coupling too deeply with specific business.
9. Recommended Implementation Roadmap
In the first phase, choose a high-frequency, low-risk, rollback-capable scenario (such as generating a draft order after an information query) and connect the tool layer and orchestration layer. In the second phase, introduce voice and multi-turn clarification, and improve exception branches. In the third phase, gradually open up sensitive operations involving funds, and complete auditing and risk control at the same time. Always follow one principle: first let AI finish the preparation work, and leave the final confirmation to the human.
