AI Agents Enter the Self-Evolution Era: From Execution to Continuous Learning

    This article examines the shift in AI agent development from task execution to continuous learning and user modeling. It compares three categories of agents, breaks down the architecture of a continuous learning loop—layered memory, skill accumulation, user modeling, and reflection scheduling—and explains the engineering challenges of native instant messaging integration. It also covers governance requirements for autonomous systems and offers a three-stage adoption path based on team maturity.

    1. The Shift: Agent Competition Moves From Execution to Growth

    The growth rate of agent projects has been widely discussed recently. Some solutions went from zero to roughly 40,000 GitHub stars in about two months, while more aggressive implementations reached similar traction in around six weeks, attracting several times the attention of comparable projects within the same short window. Setting aside specific projects and community rankings, what these numbers really show is that user expectations for agents have changed.

    Early users asked whether an agent could run at all. Next, they asked whether it could connect to messaging platforms and operate beyond a local environment. The core demand now is whether the agent understands them better the longer they use it. The first two stages solved usability and accessibility. The third stage is about the compounding effect. An agent that does not accumulate experience is essentially a temporary worker starting from scratch every time, no matter how many channels it connects to.

    The same trend appears on the invocation side. Public data from aggregated model routing platforms shows that leading agent solutions already reach daily invocation volumes in the trillions of tokens, with highly heterogeneous models being called. This means an agent’s value is no longer tied to a single model; it depends on the stability and learning capability of the orchestration layer.

    2. Comparison: Capability Boundaries of Three Agent Categories

    The fastest way to understand a “growth-capable” agent is to place it in the existing technical landscape.

    Category 1: In-repository AI coding tools. These read code, write patches, run tests, and submit changes. They perform best on coding tasks. However, they are naturally limited to a single session. They do not run persistently, cannot trigger scheduled tasks while you are offline, and cannot proactively push results through instant messaging.

    Category 2: Persistent task execution frameworks. These solve the “leaving the laptop” problem. They can be deployed on servers or container platforms, connect to messaging channels, execute terminal commands, manage schedules, and drive headless browsers. Their key weakness is that state is volatile. Workflows are written in configuration files and reset to zero when the session ends. They do not distill experience from execution, nor do they automatically avoid a mistake after you correct it once. Every process must be explained manually and repeatedly.

    Category 3: Agents with a built-in learning loop. On top of persistent execution, these place the learning mechanism at the core of the execution engine rather than bolting it on with external plugins. The two biggest differences are learning capability and user modeling: skills are automatically refined through usage, while preferences and constraints are captured in a structured form.

    3. Architecture: Components of a Continuous Learning Loop

    Turning “smoother with use” from a slogan into an engineering reality requires at least four layers of design.

    3.1 Layered Memory

    Split memory into three types to avoid stuffing everything into the context window and inflating noise:

    • Working memory: temporary context for the current task, reclaimed when the task ends;
    • Episodic memory: what happened, such as a failed command or a rejected approach;
    • Semantic memory: abstracted, stable conclusions, such as “the deployment script for this project must include a timeout parameter.”

    Before writing to semantic memory, content must go through distillation and deduplication. Otherwise, the memory store degrades into a pile of logs.

    3.2 Skill Accumulation

    After a successful execution, abstract the “problem characteristics → effective action sequence” into a reusable skill. After a failed execution or a user correction, generate a negative constraint. Skills need versioning and hit-rate tracking. Skills that go unmatched for a long time should be archived to prevent skill library growth from slowing retrieval.

    Illustrative skill structure (pseudocode, expressing structure only, not any specific product interface):

    1. skill:
    2. name: deploy-with-timeout
    3. trigger: ["deployment script timeout", "release stuck"]
    4. steps:
    5. - run: "execute the release process with a timeout limit"
    6. - verify: "confirm the health check passes"
    7. negative_constraints:
    8. - "never run a release without a timeout setting"
    9. hit_count: 12
    10. version: 3

    3.3 User Modeling

    A user model is not a chat summary. It is structured preferences and boundaries: commonly used tech stacks, acceptable scope of changes, high-risk operations that require manual confirmation, and output format preferences. Every correction should become an explicit field in the model and take effect as a pre-check in subsequent tasks.

    3.4 Reflection and Scheduling

    Introduce periodic reflection tasks: review recent execution traces, merge duplicate experience, and retire outdated conclusions. The scheduling layer handles scheduled jobs, event triggers, and priority queues, ensuring output even during offline periods.

    4. Native Instant Messaging Integration: What Is Actually Hard

    Capabilities like “connect by scanning a QR code, support for both direct and group chats, full coverage of images, videos, files, and voice, long-polling direct connection with no public IP required” involve several engineering points worth expanding on.

    • No public IP required: use long-polling or a persistent connection to establish the channel from inside out, avoiding inbound port exposure. This works on home broadband and internal networks while significantly reducing the attack surface.
    • Message type normalization: rich media formats differ greatly across platforms. A unified message model must be abstracted to convert images, voice, and files into standard structures with type markers and storage references before passing them to the model.
    • Session and group chat isolation: group chats need to distinguish “speaking to everyone” from “responding when named,” with trigger words and permission boundaries set to avoid accidental activation.
    • Idempotency and deduplication: message channels commonly redeliver messages. Processing logic must be idempotent by message identifier; otherwise, high-risk actions may be executed repeatedly.
    • Consistent state across channels: when the same user switches from a direct chat to a group chat, the user model and memory must be shared; otherwise, personality and preferences will split.

    5. Risks and Governance: The More Autonomy, the More Constraints Must Come First

    Learning capability amplifies both benefits and risks. Once a wrong experience is stored, it will be reused repeatedly. Therefore, the following is recommended:

    1. Least privilege: high-risk operations (deleting data, changing production configurations, sending external messages) require manual confirmation by default;
    2. Sandboxing and rollback: containerize the execution environment, snapshot changes, and support one-click rollback;
    3. Full-chain observability: structured logs, call tracing, metrics monitoring, and alerting should all be in place, so anomalous behavior can be traced to a specific skill and memory entry;
    4. Auditable and clearable memory: support viewing, editing, and deleting individual memory entries to meet compliance and correction needs;
    5. Cost guardrails: set token and invocation budgets to prevent reflection and polling tasks from spiraling out of control.

    For cloud deployment, the typical combination is: a container platform hosting the persistent execution engine, object storage holding memory and skill snapshots, a message queue for task buffering and peak shaving, logging and monitoring services for observability, and a key management service for credentials. Baidu AI Cloud offers corresponding product categories for these general capabilities, which can be combined as needed without being locked to a single model provider.

    6. Adoption Advice: A Three-Step Path by Team Maturity

    • Starting stage: first use in-repository AI coding tools to improve coding efficiency, and establish baselines for testing and code review;
    • Expansion stage: introduce a persistent execution framework to automate repetitive processes such as releases, inspections, and reports, and connect instant messaging as the interaction entry point;
    • Mature stage: add layered memory, skill accumulation, and user modeling, and establish governance and cost guardrails so the agent becomes a true long-term partner.

    To assess whether an agent has growth potential, use three self-check questions: after you correct its mistake, does it automatically avoid it next time? For a process you have repeated, does the second run require no further explanation? When you switch to a different messaging channel, does it still remember who you are? Only when all three answers are “yes” does it deserve to be called a partner.