The Evolution of AI Agent Frameworks: From Static Workflows to Self-Evolving Systems
This article examines why early general-purpose agent frameworks fall short in production, and how a new generation of designs addresses the gap through layered memory, reusable skills, and built-in governance. It outlines four core engineering capabilities to implement, a common cloud architecture to host them, and a phased adoption path, concluding that the choice between old and new frameworks depends on governance maturity rather than popularity.
1. The Starting Point: Why a “Working” Agent Is Not Enough
A class of general-purpose agent frameworks recently gained rapid traction in the open-source community. These frameworks free models from the chat window and connect them to instant messaging, email, calendars, and browsers, letting them run terminal commands, scrape web pages, and generate reports. Once such a framework reaches production, however, engineering teams quickly notice two things: the capability boundaries are clear, but maintainability is poor.
First, memory is static. Users write preferences, terminology, and processes into configuration files that are read once at runtime; when the session ends, the context is gone. The system never distills lessons from execution traces, and being corrected once does not make it behave correctly the next time.
Second, skills do not accumulate naturally. A workflow that has been proven to work still has to be described from scratch next time unless it is explicitly packaged as a reusable module. As the team grows, duplicated effort and prompt bloat happen at the same time.
Third, supply-chain trust is insufficient. When community skills number in the thousands and a significant share are found on audit to contain malicious or suspicious code, the risk shifts from “model hallucination” to “dependency poisoning.” Once the pace of vulnerability disclosure outruns the team’s pace of remediation, security debt accumulates quickly.
Together these three points lead to one conclusion: an agent’s competitiveness no longer depends on whether it can call tools, but on whether the three engineering threads of memory, reuse, and governance form a closed loop.
2. Design Direction of the New Generation: Turning Experience into an Asset
The reason comparable newer projects attracted attention and contributions quickly is that they treat the pain points above as first-class problems. Their design direction can be abstracted into four general principles that any in-house or selection effort can borrow.
Layered memory. Split information into short-term session context, mid-term task state, and long-term preferences and domain knowledge, each with different storage media and eviction policies. The long-term layer is written through summarization and structured extraction rather than by concatenating entire passages.
Execution as learning. At task completion, run a retrospective that turns the successful path, the causes of failure, and user corrections into candidate lessons, which are written to long-term memory or the skill library after a confidence assessment.
Skills-first reuse. Workflows are explicitly modeled as modules with input and output contracts, carrying versions, signatures, and dependency declarations. A match is retrieved and invoked, which avoids unbounded prompt growth.
Governance built in. Permissions, auditing, and sandboxing are not add-ons but capabilities enabled by default at runtime.
The following illustrative pseudocode expresses the “execute — reflect — consolidate” loop:
def run_task(task, ctx):plan = planner(task, ctx.memory.short_term)result = executor(plan, sandbox=ctx.sandbox) # least-privilege executionlesson = reflect(task, plan, result) # extract lessons in a retrospectiveif lesson.confidence > THRESHOLD:ctx.memory.long_term.upsert(lesson) # write to long-term memoryctx.skills.publish_if_reusable(lesson) # add candidate skill to the libraryctx.audit.write(task.id, plan, result) # end-to-end audit trailreturn result
What matters is not the function names but the order: execute under constraints first, then reflect, then consolidate above a threshold, and finally leave a trace. Miss any step and the system degrades into a collection of one-off scripts.
3. Four Engineering Capabilities That Must Be in Place
3.1 Read-Write Consistency for Memory
Once long-term memory becomes writable, concurrency and contamination have to be handled. Attach source, timestamp, confidence, and invalidation conditions to each memory entry, recall by weighting relevance to the current task, and support manual override. For conflicting information, prefer newer evidence but keep it labeled, so that silent overwrites do not cause terminology drift.
3.2 Contractual, Versioned Skills
Every skill should declare its input schema, output schema, scope of side effects, and required permissions, and carry a semantic version plus a content digest. Verify the digest before running and the output schema afterwards; on any anomaly, roll back and fall back to human confirmation.
{"name": "report_builder","version": "1.4.0","input_schema": {"date_range": "string"},"side_effects": ["read:storage", "write:storage"],"permissions": ["storage.read", "storage.write"],"digest": "sha256:..."}
3.3 Least Privilege and Sandbox Isolation
Route tool calls through a single gateway: all external access is decided by a policy engine that denies by default; file and network access happens inside containers or sandboxes; high-risk actions (deletion, transfers, external publishing) require a second confirmation. Credentials are held by a key management service and must never appear in prompts or logs.
3.4 Observability and Cost Control
Persist the plan, tool calls, token consumption, latency, and failure reasons of every task in structured form, feed them into logging and monitoring with alerts, and build a traceable call chain per task. On the cost side, set budget caps and a degradation policy that switches to a smaller model or human intervention when the cap is exceeded.
4. Deployment Shape: Building an Evolving Foundation in the Cloud
To put these capabilities onto infrastructure, a few general cloud product categories are usually enough, with no need to bind to a specific vendor’s interfaces: a container platform hosts sandboxes and elastic execution; object storage holds skill packages, memory snapshots, and audit files; a message queue decouples task scheduling from execution; logging and monitoring with alerts provide tracing and threshold notifications; a key management service centrally holds credentials; and a data warehouse or vector retrieval service supports long-term memory recall. What Baidu AI Cloud provides in these scenarios is exactly these general categories of capability, which teams can combine according to their own compliance requirements.
A practical phased path looks like this:
- Phase 1: connect existing tools and the account system, turn on the permission gateway and auditing first, do no automatic consolidation, and observe the real distribution of failures.
- Phase 2: introduce layered short-term and long-term memory, read-only at first, with candidate lessons reviewed by humans.
- Phase 3: open up skill consolidation and automatic reuse, with confidence thresholds and a canary percentage.
- Phase 4: complete the cost and quality dashboards, run regression evaluation per task, and close the iteration loop.
5. Conclusion: Replacement Depends on Governance Maturity
Back to the original question: can the new frameworks replace the old ones? The answer is not either/or. If a team’s core need is to connect models to existing channels quickly, mature solutions still have value; if the need is for agents to keep accumulating experience in production, reuse capabilities, and satisfy audit requirements, then the newer design with layered memory, skill contracts, and built-in governance is the better fit. The real dividing line is not the star count but whether you have established a sustainable engineering loop for memory, reuse, and security.
