From Large Language Models to the Runtime Foundation for AI Agents
AI applications are evolving from systems that answer questions into systems that complete tasks. This article explains the roles of large language models, AI agents, persistent assistants, and runtime governance platforms, covering tool use, memory, scheduling, permissions, observability, fault recovery, and a practical path for adopting agent-based workflows.
1. AI Applications Are Moving from Answering Questions to Completing Tasks
In the past, people mainly used AI by entering a question, waiting for an answer, and then deciding whether the result was usable. The core value of this model was understanding and generation: a model could summarize text, write code, explain concepts, or generate proposals. However, it would not normally access business systems or continuously track a goal that spanned multiple steps.
As model reasoning, tool-calling, and systems engineering continue to improve, AI applications are beginning to develop into several layers:
- Large language models handle understanding and generation;
- AI agents plan tasks and call tools;
- Persistent AI assistants run over longer periods, retain context, and trigger actions proactively;
- The runtime foundation provides permissions, security, scheduling, observability, and multi-agent coordination.
These layers do not replace one another. Instead, they form an increasingly complete engineering system. Models provide cognitive capabilities, agents provide the ability to act, persistent assistants provide continuous service, and the runtime foundation ensures that the entire system remains controllable, auditable, and extensible.
2. Large Language Models: Engines of Cognitive Capability
The core capabilities of a large language model can be grouped into three categories:
- Semantic understanding: Identifying user intent, extracting key information, and understanding context;
- Content generation: Producing text, code, structured data, or operational recommendations;
- Knowledge-based reasoning: Summarizing, comparing, and analyzing information based on the input and the model’s existing knowledge.
The following is a minimal program that does not depend on an external service. It is not a real large language model; it only demonstrates how a traditional program might process user requests:
def respond(text):text = text.strip()if "summary" in text.lower():return "Please provide the content you want to summarize."if "code" in text.lower():return "Please specify the programming language, input, and expected output."return "I understand your question, but I need more context."while True:user_input = input("You: ")if user_input.lower() in {"quit", "exit"}:breakprint("System:", respond(user_input))
A real language model uses probabilistic modeling to generate more natural and detailed results, but it still has several inherent limitations.
1. It cannot inherently access real-time information
Model parameters are generally based on historical training data. Unless a system is connected to search services, databases, or business APIs, it cannot reliably know the latest inventory, schedule, or business status.
2. It cannot inherently perform real-world operations
A model can generate text that says “send an email” and can even produce the data required for an API call. Whether the email is actually sent, who receives it, and whether approval is required must all be controlled by external software.
3. Generated output is not the same as verified fact
A model generates text that is plausible in a probabilistic sense. It does not automatically produce facts verified by business systems. For financial operations, access control, production configuration, and other important decisions, validation mechanisms are essential.
From an engineering perspective, a large language model resembles a powerful engine. It provides strong reasoning and generation capabilities, but without tools, an execution environment, and security boundaries, it remains limited to producing recommendations.
3. AI Agents: Giving Models Planning and Execution Capabilities
The key change introduced by an AI agent is the shift from “answering a question” to “taking action toward a goal.”
A typical agent includes the following modules:
- Task understanding: Identifying the goal, constraints, and completion criteria;
- Task planning: Breaking a complex goal into multiple steps;
- Tool calling: Accessing databases, search services, calculation programs, or business APIs;
- Result observation: Reading tool results and deciding what to do next;
- State management: Storing intermediate results, errors, and execution progress;
- Termination judgment: Confirming that the task is complete or requesting human intervention.
An agent can be abstracted as the following loop:
Receive a goal↓Analyze the task↓Select a tool↓Execute an operation↓Read the result↓Continue planning or finish
The following simplified example demonstrates tool calling. To keep it directly executable, the tools are implemented as local functions:
from datetime import datedef calculator(expression):allowed = set("0123456789+-*/(). ")if not set(expression) <= allowed:return "The expression contains unsupported characters"try:return str(eval(expression, {"__builtins__": {}}, {}))except Exception:return "Calculation failed"def get_today():return date.today().isoformat()def execute_task(task):if task == "Get today's date":return get_today()if task.startswith("Calculate"):expression = task.replace("Calculate", "", 1).strip()return calculator(expression)return "This task is not supported"tasks = ["Get today's date", "Calculate 12 * (8 + 2)"]for task in tasks:result = execute_task(task)print(f"Task: {task}\nResult: {result}\n")
In a production system, tool calling should not depend only on natural-language output from the model. A structured protocol should be used instead. For example, the system may require the model to return:
{"tool": "calculator","arguments": {"expression": "12 * (8 + 2)"}}
The application can then validate the tool name, parameter types, and permission scope before deciding whether to execute the request. This prevents the model from generating arbitrary and uncontrollable operations.
The Main Value of AI Agents
Agents are suitable for tasks with a clear goal, multiple steps, and dependencies on external tools, such as:
- Organizing data according to business rules;
- Querying multiple systems and generating an analysis;
- Identifying possible causes of a failure based on test results;
- Reading documentation and generating an implementation plan;
- Preparing operational recommendations according to an approval workflow.
However, an agent is still usually invoked on demand. A user submits a goal, the system begins execution, and the process may exit after the task is completed. An agent can act, but it does not necessarily provide long-running service.
4. Persistent AI Assistants: From One-Time Execution to Continuous Service
The core of a persistent AI assistant is not simply keeping a model online. It is building a mechanism for continuous operation. The assistant needs to know:
- Which tasks it is currently tracking;
- Which tasks remain incomplete;
- Which conditions should trigger an action;
- Which actions require user consent;
- How to store and update long-term memory;
- How to retry, pause, or escalate a failed task.
For example, “arrange a business trip next week” is not a single-step task. It may involve:
- Collecting the departure and destination information;
- Reading the schedule for the following week;
- Searching for suitable transportation options;
- Comparing time, price, and constraints;
- Generating candidate plans;
- Requesting user confirmation;
- Completing a booking or submitting a request;
- Updating the calendar and sending reminders.
If users must repeat the same background information every time, the experience becomes inefficient. Persistent assistants therefore usually need three types of memory.
1. Short-Term Memory
Short-term memory records the goal, context, and intermediate results of the current conversation. It is useful for tasks that are still in progress.
2. Long-Term Memory
Long-term memory stores user preferences that have been explicitly authorized, such as a preferred departure location, working hours, or notification method. It must be searchable, editable, and deletable. Not every conversation should be retained permanently.
3. Working Memory
Working memory stores temporary data generated during task execution, such as options that have already been queried, retry counts, and items awaiting confirmation. After the task is complete, this data can be archived or removed.
Persistent systems also require event-triggering mechanisms. Triggers may include:
- Scheduled jobs;
- New messages;
- File changes;
- Database state changes;
- Callbacks from external systems;
- Monitoring alerts.
It is important to distinguish proactive behavior from unauthorized action. A system may proactively remind a user, but actions involving payments, data deletion, production configuration changes, or formal notifications should include a human confirmation step.
5. The Runtime Governance Foundation: Managing Agents Safely at Scale
Once an organization has multiple agents, the main question changes from “Can the task be completed?” to “Can tasks be managed reliably and securely?”
A runtime governance foundation usually needs to address the following areas.
1. Identity and Permissions
Every agent should have a clear identity and access resources according to the principle of least privilege. An agent that reads reports should not automatically be allowed to delete data. Likewise, an agent operating in a test environment should not directly modify production systems.
2. Task Scheduling
The system must determine when a task should run, which agent should run it, and how different tasks depend on one another. High-priority tasks may require preemption, rate limiting, and resource isolation.
3. State and Memory Management
Memory should be categorized, expired, and audited. Injecting all historical context into every request increases cost, reduces accuracy, and creates privacy risks.
4. Security Interception
Policy checks should be placed before and after tool calls, including checks for:
- Whether the parameters are valid;
- Whether the target resource is within the permitted scope;
- Whether sensitive data is involved;
- Whether human approval is required;
- Whether the result matches expectations.
5. Observability and Auditing
The system should record the task ID, trigger source, model decisions, tool calls, returned results, approval records, and final status. Only a complete execution trail makes it possible to identify responsibility and determine the cause of a failure.
6. Fault Recovery
Agents may encounter network timeouts, changes in data formats, unavailable tools, or abnormal model output. A production system should support timeouts, limited retries, checkpoint recovery, idempotent execution, and human takeover.
A robust task state machine can be designed as follows:
Pending → Running → Awaiting confirmation → Completed↓Failed↓Retry or human takeover
This design is more reliable than allowing a model to loop freely until it decides that a task is complete. Each state has explicit entry and exit conditions.
6. Moving from Traditional Development to AI-Assisted Development
This shift does not mean that traditional development roles will disappear immediately. Instead, the focus of development work is moving toward different capabilities.
In the past, developers spent significant time writing repetitive code, connecting APIs, and converting data formats. In the future, more important skills will include:
- Breaking ambiguous requirements into executable tasks;
- Designing clear tool interfaces and data protocols;
- Establishing permission boundaries for agents;
- Designing observable and recoverable workflows;
- Verifying the correctness of model output;
- Turning human experience into rules, knowledge, and evaluation datasets.
Frontend, backend, and testing professionals can all build intelligent workflows based on their existing skills. For example:
- Frontend developers can design human-in-the-loop interfaces, approval screens, and task-status views;
- Backend developers can build tool services, task orchestration, and permission systems;
- Test developers can create prompt tests, tool-calling tests, and security regression tests;
- Operations engineers can focus on runtime monitoring, resource isolation, and fault recovery.
The most competitive developers will not simply hand every task to a model. They will understand which steps are suitable for automation, which steps require human confirmation, and how to design the entire process as a verifiable system.
7. Practical Adoption: Start with Small Tasks and Evolve Gradually
Organizations and individuals building agent systems should not pursue full autonomy from the beginning. A more reliable path is to proceed in stages.
Step 1: Select Low-Risk, Clearly Bounded Tasks
Examples include document summarization, log classification, test report organization, and knowledge retrieval. These tasks are relatively easy to evaluate and are less likely to cause serious consequences.
Step 2: Define the Inputs and Outputs
Specify the fields, formats, error-handling behavior, and completion criteria. The clearer the structural constraints, the easier the system is to test.
Step 3: Introduce Read-Only Tools
Initially, allow the agent to query information without modifying data. After the results become stable, limited write capabilities can be introduced gradually.
Step 4: Add Human Approval
Operations involving external notifications, data changes, or resource consumption must require confirmation. Approval information should include the operation, its scope of impact, and relevant risk warnings.
Step 5: Establish an Evaluation System
Use fixed examples to evaluate accuracy, completion rate, incorrect tool-call rate, average execution time, and the proportion of tasks requiring human intervention. Without evaluation, it is impossible to determine whether the system is actually improving.
Step 6: Consider Long-Running Execution and Multi-Agent Collaboration Last
Only after individual tasks are stable, permissions are clearly defined, and logs are complete should the system expand to scheduled execution, cross-system collaboration, and division of labor among multiple agents.
Conclusion
The evolution from large language models to AI agents, persistent AI assistants, and runtime governance foundations represents a broader shift from generating content to managing tasks. Models address understanding, agents address action, persistent assistants address continuous service, and the governance foundation addresses security, coordination, and operation at scale.
The key is not simply to add more models. It is to establish a complete engineering loop: define goals, plan appropriately, call tools under control, maintain continuous observability, recover from failures, and retain human oversight. By mastering these general methods, developers can turn isolated model capabilities into intelligent systems that are runnable, maintainable, and auditable.
