From Conversational AI to Action-Oriented Agents: A Technical Overview

    This article examines the technical shift from conversational AI assistants to action-oriented AI agents that can execute tasks across external systems. It breaks down the core architecture of an agent—perception, planning, tool use, memory, and feedback—and walks through the typical observe-decide-act loop. The discussion covers critical design considerations such as permission boundaries, risk control, auditability, and common failure modes like prompt injection and cost overruns. A phased adoption path for enterprises is also outlined, along with practical implementation tips for developers building reliable and safe agentic systems.

    From “Talking” to “Doing”

    In recent years, the primary interaction mode for large language models has been question-and-answer. Users ask a question, and the model returns a text-based answer. In this mode, the model can only provide suggestions—tasks such as retrieving files, organizing spreadsheets, modifying configurations, or sending notifications still require manual human effort.

    The new direction in the industry is often described as giving models “hands.” The model not only understands intent but can also call external tools and complete multi-step tasks. The technical significance of this change is that the model’s output shifts from “text” to “state changes in external systems.” The value of the output increases, but so does the risk.

    Basic Architecture of an Agent

    An agent capable of executing tasks typically consists of five components.

    1. Perception Layer: Receives user instructions and reads environment information relevant to the task, such as file contents, API return values, or current system state.
    2. Reasoning and Planning Layer: Powered by the language model, responsible for breaking down vague goals into executable steps and deciding what to do next.
    3. Tool Layer: Encapsulates the ability to call external systems—file I/O, network requests, database queries, message sending, etc. Tool parameters and return values need to be clearly defined.
    4. Memory Layer: Maintains the context of the current task and the execution history. Short-term memory serves the current task, while long-term memory stores preferences and knowledge across tasks.
    5. Feedback Layer: Records the outcome of each step and feeds the result back to the reasoning layer, allowing the model to correct its subsequent plan.

    Among these five parts, the tool layer defines the agent’s capability boundary, while permission design defines its risk boundary. The two must be designed together; focusing only on model capability is insufficient.

    Typical Execution Loop

    The operation of an agent can be summarized as a cycle of “observe, decide, act, observe again.” The following is illustrative pseudocode to explain the logic, not a complete runnable implementation.

    1. function run_agent(goal, model, tools, max_steps):
    2. history = [user_message(goal)]
    3. for step in range(max_steps):
    4. decision = model.decide(history, tools.describe())
    5. if decision.type == "final_answer":
    6. return decision.content
    7. if not tools.has(decision.tool_name):
    8. history.append(error("unknown tool: " + decision.tool_name))
    9. continue
    10. result = tools.run(decision.tool_name, decision.arguments)
    11. history.append(observation(result))
    12. return "max steps reached, task incomplete"

    Three points in this loop deserve attention. First, the loop must have a clear termination condition. max_steps prevents the model from falling into repeated calls and caps the cost of a single task. Second, calls to unknown tools must be explicitly rejected, and the error message should be fed back to the model so it has a chance to correct itself. Third, the result of every tool invocation should be recorded in history—this is the foundation for later auditing and debugging.

    Permission and Security Boundaries

    Whether an agent can run safely depends on permission design. The following principles apply in most scenarios.

    • Least Privilege: Each tool only exposes the capabilities necessary to complete the task at hand. For example, a read-only task should not also have write permission.
    • Tool Whitelist: Only tools that have been registered can be invoked. Any operation not registered is denied by default.
    • Risk Classification: Rank tools by the destructiveness and blast radius of their operations. Read-type operations are lower risk; delete, send, deploy, and permission-modification operations are higher risk.
    • Human Confirmation: High-risk operations must be confirmed by the user before execution.
    • Sandbox Isolation: Code execution, file modification, and similar operations run in an isolated environment to limit access to the host system.
    • Audit Logs: Record task inputs, model decisions, tool arguments, and execution results for later traceability.

    The following pseudocode illustrates the basic logic of risk gating.

    1. RISK_LEVEL = {
    2. "read_file": "low",
    3. "search_docs": "low",
    4. "send_message": "high",
    5. "delete_file": "high",
    6. }
    7. function execute_with_gate(tool_name, args, confirm):
    8. level = RISK_LEVEL.get(tool_name, "high") // unregistered tools default to high risk
    9. if level == "high":
    10. if not confirm(tool_name, args):
    11. return "operation rejected by user"
    12. return tools.run(tool_name, args)

    There is a detail here that is easy to overlook: the default risk level for unregistered tools should be set to high. Defaulting to allow would give newly added tools execution permission before they have been assessed, which contradicts the principle of secure defaults.

    Main Risks and Countermeasures

    The risks associated with agents can be grouped into four categories.

    Prompt Injection. Content from web pages, documents, or tool responses may contain text disguised as instructions, tricking the model into performing unintended operations. The countermeasure is to distinguish “instructions” from “data” at the system design level—external content is treated only as material for analysis and does not directly trigger tool calls. Operations that could leak data should require an additional, independent verification step.

    Erroneous Operations. The model may misinterpret user intent and delete or overwrite the wrong target. Countermeasures include: showing the scope of changes before execution, requiring confirmation for irreversible operations, and automatically backing up important data before changes.

    Cost Overruns. Multi-step loops accumulate model inference costs and tool execution costs. The countermeasure is to set limits on steps, time, and budget for each task, and to alert on abnormal repeated calls.

    Accountability and Traceability. When an agent’s operation causes consequences, it must be possible to answer: “Who authorized this, what information did the model base its decision on, and what operations were executed?” A complete audit log is the prerequisite for addressing this issue.

    A Phased Path for Enterprise Adoption

    When rolling out agent applications, a three-stage approach that gradually expands permissions is recommended. Each stage should be validated with data before moving to the next.

    Stage Typical Tasks Permission Scope Gate to Next Stage
    Read-only assistance Retrieval, summarization, draft generation Read-only Output accuracy is stable; user adoption rate meets expectations
    Low-risk write operations Modifying configs in a test environment; generating draft content for review Reversible write access Rollback drills pass; error rate is manageable
    Controlled production operations Change execution and batch processing after approval Write access with approval Human intervention rate drops; audit trail is complete

    Recommended evaluation metrics include: task completion rate, human intervention rate, error rate, average cost per task, and average completion time. Metrics should be measured on real business samples, not on demonstration effects.

    Implementation Details for Developers

    First, tool descriptions need to be clear. Each tool should state its purpose, parameter types, value ranges, and return structure, since the model relies on these descriptions to select the right tool.

    Second, arguments must be validated. Arguments output by the model should never be executed directly. They should be type-checked and range-checked first, and validation failures should return structured errors.

    Third, error messages should be machine-actionable. For example, “parameter ‘path’ exceeds allowed directory scope” is much more useful to the model than a generic “execution failed.”

    Fourth, build a fixed test suite. Prepare a set of test cases covering normal tasks, edge cases, and malicious inputs. Every time the prompt or tools change, the suite must be re-run.

    Fifth, keep a replay capability. Store tool-returned data so issues can be reproduced without re-invoking external systems.

    A Rational Perspective on the Direction

    Agents expand the value of models from generating content to completing tasks, which broadens their applicability. At the same time, the risk surface expands accordingly. They are well-suited for scenarios where processes are well-defined, results are verifiable, and operations are reversible—such as document processing, information retrieval, repetitive data organization, and automated operations in test environments. For high-risk, irreversible decisions that lack human review, caution is warranted.

    Whether an agent solution is usable should be judged on reliability data, security design, and business constraints—not on a single successful demonstration.