Dedicated Foundation Models and Engineering Practices for Execution-Oriented AI Agents
Execution-oriented AI agents must do more than generate fluent responses: they need to plan tasks, call tools reliably, maintain state, recover from failures, and coordinate across systems. This article explains the common causes of agent failures, the capabilities required in dedicated foundation models, and the engineering practices needed to build reliable, observable, secure, and recoverable agent systems. It also covers visual team management, evaluation metrics, and practical deployment recommendations.
1. From “Can Chat” to “Can Get Things Done”
General-purpose large language models have demonstrated strong capabilities in conversation, writing, and knowledge-based question answering. However, once they are used for execution-oriented tasks, problems quickly become apparent: invalid tool-call parameters, lost context, failed cross-application coordination, repeated retries in long workflows, and state drift after running for hours.
Many teams are initially attracted by impressive demos and rapidly deploy general-purpose agents. They later discover that the actual experience is closer to using “a conversational assistant” than relying on “a cyber employee” that can complete work independently.
This is not simply a matter of insufficient model intelligence. The nature of the task has changed. Chat typically involves a single turn or a short multi-turn exchange, leaving considerable room for error. Execution-oriented tasks require the model to plan over a long chain, call tools, read results, revise strategies, and maintain state continuously. A single invalid API parameter, truncated context, or unhandled exception can cause the entire task to fail.
Therefore, moving an agent from a demo to production is not mainly about making it sound more human. It is about making it operate as reliably as an engineering system.
2. Common Root Causes of Failure: Unstable Execution Pipelines
2.1 Unreliable Tool Calling
Execution-oriented tasks often involve multiple tools, including retrieval, file processing, data queries, messaging, and code execution. The model must understand tool semantics, select the correct tool, generate valid parameters, and continue reasoning based on the returned result.
Common issues with general-purpose models include selecting the wrong tool, generating incompatible parameter types, omitting required fields, and failing to recover from tool errors. A single failed call may appear minor, but in a long workflow it can trigger cascading failures.
2.2 Insufficient Planning and Task Decomposition
“Help me complete a research report” is a generation task for a chat model, but it is a project for an agent. The agent must break down the objective, determine the workflow, assign subtasks, collect materials, validate results, and produce a consolidated output.
Without structured planning, a model may skip steps, repeat work, or overlook critical requirements. An execution-oriented agent needs project-manager-like decomposition capabilities that convert broad objectives into executable and verifiable subtasks.
2.3 Difficulty Maintaining State in Long-Running Tasks
Long-running tasks may continue for tens of minutes or even hours. During this time, they may involve multiple model calls, tool results, and exception retries. If state is stored only in the conversation context, it can be lost because of context-window limits, process restarts, or network instability.
A production-grade solution must externalize task state to persistent storage. Task IDs, step records, intermediate artifacts, and checkpoints enable execution to resume instead of starting over.
2.4 Missing Engineering Orchestration
Many failures are not caused by an individual model call. They result from the lack of an orchestration layer: no timeout controls, retry backoff, idempotency design, failure isolation, or human-intervention mechanism.
An agent is not a single model invocation. It is a distributed task system. Reliable execution requires both appropriate models and sound engineering practices.
3. Four Capabilities Required in Dedicated Foundation Models
A foundation model designed for execution-oriented agents should not focus only on general question-answering scores. It should be optimized for tool calling, task planning, long-running stability, and multi-agent collaboration.
First, tool calling must be reliable. The model should accurately understand tool descriptions, generate schema-compliant parameters, and make explainable corrections when a tool returns an error. In engineering practice, structured output, parameter validation, retries, and tool allowlists can reduce risk.
Second, planning must be executable. The model should decompose an objective into steps with clear dependencies, inputs, outputs, and acceptance criteria. A plan does not need to be perfect on the first attempt, but it must be iterative, correctable, and auditable.
Third, long-running tasks must remain consistent. With mechanisms such as intermediate summaries, checkpoint recovery, and exception-triggered replanning, the model should preserve the original objective instead of gradually losing track of what it needs to accomplish.
Fourth, multiple agents must be able to collaborate. Complex tasks can be divided among specialized sub-agents and executed in parallel, but this requires unified scheduling, result aggregation, and conflict resolution. Multi-agent systems do not simply add more roles; they also add orchestration complexity. Clear responsibilities and communication protocols are essential.
4. Engineering Practices: Treat Agents as Operable Systems
4.1 Task Orchestration and State Persistence
A practical approach is to model agent execution as three layers: tasks, steps, and tool calls. Each step should record its status, inputs, outputs, retry count, and error information, and should be periodically written to persistent storage.
When a task resumes, execution should continue from the latest checkpoint rather than restarting from the beginning. A simplified example is shown below:
task = create_task(goal, task_id)while not task.finished:step = planner.next_step(task.state)result = executor.run(step)if result.error:task.record_error(result.error)task.state = planner.recover(task.state, result.error)else:task.record_result(result)state_store.save(task.id, task.state)
4.2 Timeouts, Retries, and Idempotency
Every tool call should have a timeout and a maximum retry count, with exponential backoff applied between attempts. Write operations should use idempotency keys where appropriate.
Otherwise, a retry after a timeout could create duplicate orders, repeated notifications, or other unintended side effects. Failure isolation is equally important: a failed subtask should not bring down the entire workflow. Instead, the failed step can be marked for human review.
4.3 Observability and Auditing
A production-grade agent should record prompts, tool selections, parameters, returned results, execution time, and stack traces. Logs, monitoring alerts, and distributed tracing help teams determine why an agent selected the wrong tool or became stuck at a particular step.
Audit records should also be retained to support access control and compliance requirements.
4.4 Secure Sandboxes and Access Control
Execution-oriented agents may access files, databases, or external systems, so they must follow the principle of least privilege. High-risk operations such as code execution and file manipulation should run in isolated sandboxes. Sensitive actions should require human confirmation.
Tool-call parameters should pass both schema validation and business-rule validation before execution.
4.5 General Cloud Deployment Approach
On Baidu AI Cloud, container platforms can host the agent runtime, object storage can preserve intermediate artifacts and checkpoints, message queues can decouple task scheduling, and logging and monitoring services can provide observability.
These general cloud services do not change the agent’s core logic, but they can significantly improve elasticity, reliability, and operational efficiency.
5. Visual Team Management: Turning Agents from Black Boxes into Workstations
As the number of agents grows, the management challenge shifts from “Did this task succeed?” to “How does the team collaborate?”
A visual management system can map each agent to an observable “workstation,” displaying its current task, number of tool calls, execution time, failure rate, and output artifacts. It can also support task assignment, status transitions, and result aggregation across agents.
The value of this abstraction is not the anthropomorphic presentation. It is the reduction of troubleshooting costs. Developers can quickly identify which step an agent is stuck on, which tool keeps failing, and which subtask is waiting for a dependency.
For solo founders and small teams, this type of visualization can significantly lower the operational barrier to managing multiple agents.
6. Evaluation Metrics: Do Not Focus Only on Response Quality
Execution-oriented agents should be evaluated across multiple dimensions, including:
- Task success rate
- Average completion time
- Tool-call accuracy
- Retry rate
- Human-intervention rate
- Recovery success rate for long-running tasks
- Cost per task
For long-running tasks, teams should also evaluate whether the agent remains aligned with the original objective after recovering from a checkpoint.
Only by including these metrics in continuous evaluation can teams determine whether a dedicated foundation model or an engineering improvement has delivered meaningful results.
7. Recommendations for Deployment
First, start with a narrow scenario rather than pursuing full automation from the beginning. Choose tasks with clear boundaries, a limited number of tools, and well-defined acceptance criteria.
Second, address engineering shortcomings before switching to a more powerful model. Without state management and observability, even a stronger model may remain unreliable.
Third, separate planning from execution so that plans can be reviewed and modified.
Fourth, design checkpoints and human handoff points for long-running tasks.
Fifth, establish tool registration and schema-validation mechanisms to prevent the model from generating unconstrained actions.
The competition in execution-oriented agents will ultimately not be decided by demo videos, but by reliable delivery. Dedicated foundation models provide stronger capabilities for tool calling, task decomposition, and long-running consistency. Engineering orchestration provides state management, retries, idempotency, observability, and security boundaries.
Together, these capabilities can move agents from “appearing capable of work” to becoming systems that people can genuinely rely on.
