Design Philosophy of Long-Running AI Agents: General-Purpose Execution vs. Self-Improving Growth
This article compares two design philosophies for long-running AI agents: a general-purpose execution model built on developer-defined plugins, and a growth-oriented model driven by memory and reusable skills. It outlines the shared capability layers, explains how each approach handles cold start, long-tail scenarios, predictability, and governance, and lists four engineering requirements for production: memory lifecycle management, skill regression testing, execution sandboxing, and decoupling of entry points from scheduling. It closes with guidance on choosing between them or adopting a two-layer architecture.
1. Background: From Conversational Assistants to Long-Running Agents
Early conversational AI products were essentially a one-shot request-response model: the user asked a question, the model answered, and the context disappeared when the session ended. Once large models gained function calling, code execution, and structured output, a new form began to spread: the agent that runs persistently inside a server or container. Instead of waiting to be guided sentence by sentence, it has its own process, persistent storage, and scheduling capability, and can decide on its own when to work and when to push results.
These systems typically expose five foundational capability layers:
- Model access layer: connects to inference services of different sizes and selects a model based on task complexity;
- Tool invocation layer: reads and writes files, performs retrieval, and calls internal APIs;
- Command execution layer: runs scripts and build pipelines inside a controlled sandbox;
- Message entry layer: receives instructions from the CLI, instant messaging, email, or a custom front end, and pushes results back;
- Memory and scheduling layer: stores preferences and experience, and runs scheduled and long-cycle tasks.
On top of this shared foundation, implementations have diverged into two clearly different design philosophies.
2. Design Philosophy A: General-Purpose Execution Built on Capability Breadth
The core proposition of this route is to “cover as many executable scenarios as possible.” It treats the agent as a programmable runtime: capabilities are attached as plugins, onboarding a new tool requires almost no change to the main flow, the scheduler handles cron jobs and long-running background tasks, and results are pushed back to the user through a message channel once a task finishes.
Its strengths are fast onboarding, clear boundaries, and predictable behavior. Because every capability is explicitly registered, an engineering team can precisely audit what the agent can actually do. The cost is that the agent’s ceiling is set by the plugin set the developers wrote in advance; when it hits an uncovered long-tail scenario, it can only fall back to asking the user follow-up questions.
In implementation, this kind of system usually takes the form of a registry:
# Capability registry: explicit declarations for auditing and access controlCAPABILITIES = {"file.read": {"handler": read_file, "scope": "workspace"},"shell.exec": {"handler": run_cmd, "scope": "sandbox"},"http.call": {"handler": http_call, "scope": "allowlist"},"notify.push":{"handler": push_msg, "scope": "channels"},}def dispatch(name, payload, ctx):spec = CAPABILITIES[name]assert in_scope(spec["scope"], ctx), "Unauthorized call blocked"return spec["handler"](payload, ctx)
3. Design Philosophy B: Growth Built on Self-Improvement
The other route swaps the proposition: rather than writing every capability up front, it aims to “continuously acquire new capabilities from interactions.” Externally this is often framed as “growing together with the user”; in implementation it comes down to two layers: memory and skills.
Memory comes in two types, and mixing them causes problems:
- Preference memory: the user’s language style, output format, common tech stack, and hard constraints. It shapes how something is done.
- Experience memory: execution paths that have been proven to work for a class of tasks, pitfalls encountered, and mistakes that were corrected. It shapes the steps used to do something.
A skill is the solidified product of experience memory. After an agent repeatedly fails on a project, or is explicitly corrected by the user, the correction is abstracted into a reusable unit of work and persisted, so that a similar task next time loads it directly. A minimal skill description can look like this:
skill: deploy_static_sitetrigger: keyword match on "publish static page" or detection of a build output directorysteps:- Validate build artifact integrity; run the build first if anything is missing- Sync incrementally to object storage, keeping the rollback version number- Trigger a cache refresh, then verify the status code once it takes effectconstraints:- Never delete the previous version; additions only- Stop and report after three failures; no infinite retriessource: distilled from the post-mortem of an accidental deletion in 2026-06
The source field here is critical: it makes skills traceable. A skill library without provenance and activation conditions quickly degrades into a pile of conflicting “experience garbage,” which is the main engineering risk of growth-oriented agents.
4. Key Differences
| Dimension | General-purpose execution | Growth-oriented |
|---|---|---|
| Source of capability | Plugins preset by developers | Skills distilled from interactions |
| Cold start | Strong, works out of the box | Weak, needs a settling-in period |
| Long-tail scenarios | Relies on asking the user | Can bootstrap new workflows |
| Behavior predictability | High | Medium, needs constraints and regression |
| Governance focus | Permissions and auditing | Memory quality, skill conflicts, rollback |
| Fit | Operations and office automation with stable processes | Long-term projects with continuously evolving requirements |
It is worth stressing that the two are not mutually exclusive. Mature designs typically fix stable capabilities as plugins and leave volatile ones to skill distillation, forming a two-layer structure.
5. Four Engineering Requirements in Practice
First, memory must have a lifecycle. Writes need trigger conditions, reads need relevance ranking, and expired or low-confidence entries must be evictable automatically; otherwise the context is drowned in noise and both cost and latency rise.
Second, skills must be regression-testable. Every skill addition or change should run a fixed set of test cases to confirm existing behavior is not broken, and versions should be kept so they can be rolled back.
Third, the execution layer must be isolated. Command execution, file writes, and external calls belong in a restricted sandbox with least privilege and an invocation allowlist; high-risk actions need a human confirmation step.
Fourth, entry points and scheduling must be decoupled. Message channels only send and receive, while scheduling and the state machine are deployed separately, with task state and results persisted in external storage so tasks survive a process restart. If elasticity is needed, stateless execution units can run on a container platform, with queues, logs, and monitoring alerts handled by the corresponding general-purpose cloud service categories.
6. Selection Guidance
If the business flow is clear, compliance requirements are high, and strong auditing is needed, prefer the general-purpose execution model and put determinism first. If you face long-term projects with frequently changing requirements and want the system to get smoother with use, the growth-oriented model is the better fit, but memory governance and skill regression must be built at the same time. For most teams the practical answer is a phased rollout: get the main path working with preset capabilities first, then distill frequent corrections into skills, and gradually move to the two-layer architecture.
