What Is an AI Agent? The Evolution from Chat to Goal-Driven Systems
AI agents are often overused as a label for any AI-powered feature, from chat boxes to automation scripts. This article separates the capability layer from the product layer and breaks down four stages: chat, workflows, agents, and wrapper applications. It explains that what defines an agent is runtime decision-making by the model, not the presence of a chat interface, and offers four questions to assess a system's technical substance, three engineering constraints for production, and practical guidance on choosing between chat, workflows, and agents.
Any feature with an AI connection is now labeled an “agent”: a web chat box, a scheduled automation script, a plugin that calls a model API for translation. This naming inflation has a direct consequence: technical discussions lose focus. Buyers cannot judge capability differences, and developers cannot estimate implementation costs. To make the concept useful again, the first step is to admit that these terms do not sit on the same dimension. Chat, workflows, and agents describe how a system organizes and schedules capabilities, which belongs to the capability layer. The so-called “wrapper application” describes how capabilities are packaged and delivered, which belongs to the product layer. Comparing the two categories on a single line is a classification error.
1. Separate the Layers: Capability vs. Product
The capability layer answers “what is the system’s decision and execution mechanism?” It determines the system’s capability ceiling, failure modes, and observability. The product layer answers “through what interface and payment model does the user obtain this capability?” It determines the experience and business form. The same capability implementation can be packaged as a chat window, embedded in a document editor, or built as a scheduled task. The same product form may be backed by the simplest single-turn call or a complex multi-agent orchestration.
Therefore, whether a system is an agent cannot be judged by whether it has a chat box, but by who determines its control flow.
2. Four Stages: From Single-Turn Response to Goal-Driven
1. Chat: Turn-Based Responses
The essence of the chat form is “input context, output text,” with the control flow entirely driven by the human. Each request is an independent model call, and the context window is the entire boundary of its memory. It excels at open-ended expression, information clarification, and content generation, but it has no persistent state across steps and does not actively change the external world.
In engineering terms, the complexity of a chat system concentrates on context management: history trimming strategies, summary compression, and assembling external fragments introduced by retrieval augmentation. A sketch:
def chat(user_input, history, max_turns=10):context = build_context(history[-max_turns:], user_input)return model.generate(context) # the human holds the control flow
2. Workflows: Deterministic Paths Pre-Orchestrated by Developers
A workflow hard-codes steps into a graph structure: nodes, edges, branch conditions, and retry policies are all determined at design time. The model often serves only as a “single-point capability,” such as classification, extraction, or rewriting, while the code determines the flow. Its advantages are predictability, testability, and controllable cost; the price is that when it encounters situations outside the preset design, it can only halt or take a fallback branch.
def workflow(doc):kind = classify(doc) # the model makes only a single-point judgmentif kind == "invoice":fields = extract(doc)return validate_and_save(fields)return route_to_manual(doc) # the fallback path must be explicitly designed
3. Agents: The Model Joins the Decision Loop
The watershed for an agent is that what to do next is decided by the model at runtime, rather than hard-coded by the developer at design time. It typically contains four elements: goals and constraints, a callable tool set, a stateful loop, and a termination check. The classic form is a “reason-act-observe” loop: the model outputs tool-call intent, the runtime executes it and feeds the result back into the context, until completion is determined or a budget limit is triggered.
def agent_loop(goal, tools, budget=20):state = {"goal": goal, "trace": []}for _ in range(budget):action = model.plan(state, tool_specs=tools) # decisions are produced at runtimeif action.type == "finish":return action.resultobservation = tools[action.name](**action.args)state["trace"].append((action, observation))raise BudgetExceeded(goal)
It is worth emphasizing that an agent is not “more advanced” and therefore more worth using. It trades determinism for flexibility and introduces new risks such as non-deterministic failures, non-converging loops, and incorrect tool calls.
4. Wrapper Applications: A Delivery Method at the Product Layer
A wrapper application refers to packaging an interface and scenario on top of existing model capabilities, without changing the nature of the control flow. It may be pure chat or a complete agent. Placing it alongside the previous three for comparison is a category error; the correct question is “which capability level is behind this product?”
3. Criteria: Four Questions to See the Technical Substance
- Control flow ownership: Are branches hard-coded, or produced by the model at runtime?
- State and memory: Is explicit state maintained across steps, rather than relying only on the context window?
- External action: Does it produce real side effects through tools, such as writing to a database, sending messages, or modifying files?
- Termination mechanism: Is there a clear completion check and budget constraint?
Only when three or more of the four questions are “yes” can it be called an agent; an interface without a loop is still essentially a chat product.
4. Three Constraints for Engineering Implementation
First, prioritize controllability. Least-privilege tool permissions, secondary confirmation for dangerous operations, and full-chain trace logging are prerequisites for an agent to enter production, not options. Second, make cost predictable. A loop structure means tokens and the number of calls cannot be statically estimated, so triple limits on steps, time, and cost must be set. Third, ensure observability. The input, decision, and tool return of each step need to be structured and persisted for replay and diagnosis, which can be carried by logging services and monitoring and alerting systems.
When implementing on the cloud, general categories are sufficient to cover the needs: container platforms host the runtime, object storage holds artifacts, message queues handle asynchronous decoupling, vector retrieval services provide long-term memory, and key management services host credentials. Baidu AI Cloud also provides these general capability categories in such scenarios; selection should be based on your own controllability requirements, not on the popularity of a concept.
5. Selection Advice
When requirements are clear and paths are enumerable, choose a workflow; when requirements are open and need clarification and generation, choose chat; only when the task goal cannot be decomposed in advance and must rely on external tool feedback to approach it step by step should you introduce an agent, with budget and rollback design to support it. Most so-called “agent requirements,” at the implementation level, are actually a workflow with a fallback branch—recognizing this can save a great deal of unnecessary complexity.
