Agent Task Abstraction and Pluginization: A Path to Self-Evolution?

    Agent systems often collapse Subagent, Job, and Goal into one generic Task. This article explains why those objects have different ownership, completion, cancel, and recovery semantics, how to choose among them, how to keep a unified observation layer, and why plugins and skill packs are infrastructure for verifiable self-evolution rather than evolution itself.

    Agent Task Abstraction and Pluginization: A Path to Self-Evolution?

    1. The problem is not “async,” but what the system actually manages

    In Agent systems, “async task” is one of the most misleading design terms. Async only says whether the caller waits for a result; it does not say what object the system owns. Asking another Agent to research, running a command in the background, and advancing a goal over multiple turns all look like “creating a task.” If the system then uses one generic Task object for every case, the interface looks tidy at first: identity, status, result, cancel. Once recovery, permissions, failure handling, and human intervention appear, the cracks show:

    • Who owns conversation history and model-turn context?
    • Who only stores execution state and output?
    • Who is allowed to decide whether the next turn continues?
    • After cancel, what is kept, what is stopped, and what is cascaded?
    • Does “complete” mean a delegation finished, a producer lifecycle settled, or a goal was explicitly judged done?

    A unified interface is not a unified ontology. You can expose a common observation surface for list, read, wait, and terminate. You should not smash Subagent, Job, and Goal into one mixable Task entity. Otherwise you get a clean API early and lose recovery semantics, permission boundaries, and failure attribution later.

    2. Three objects: what Subagent, Job, and Goal each own

    A Subagent is about delegation, not async. Work is handed to a child Agent. The core assets are the child session, the child Agent’s capability boundary, parent–child relationship, output, and the settlement of one activation. Use Subagent when you need an independent model turn, tool scope, or conversation context.

    A Job is a background lifecycle. It hosts identity, state, output, wait, and terminate for a background work segment. The producer may be a command runner or a Subagent. Use Job when a background execution segment must be listable, readable, waitable, and terminable.

    A Goal is goal progress in the same session. It persists the goal, stage, revision, and started turns; a continuation policy decides whether to enter the next turn. Use Goal when the current Agent must keep advancing one goal over multiple turns and retain stage, budget, and blocking reasons.

    Object Stable identity Primary state Typical meaning of complete
    Subagent Child session or child-activation id Dialogue, activation, parent–child, output One delegation finished, or child activation settled
    Job Kind-N background task id running/stopping/completed/killed/failed Producer released resources and submitted a terminal state
    Goal Goal id + revision active/paused/blocked/complete Goal explicitly marked complete

    The point of the table is not field count. “Complete” means different things. A finished Subagent does not mean the parent goal is done. A finished Job only proves that producer lifecycle settled. Goal complete is an explicit judgment of goal state, not a process exiting on its own. If the three are merged into one Task, recovery cannot tell conversation from execution from goal; cancel cannot tell whether to stop a child session, a background producer, or only pause goal progress.

    3. Choose with three questions, not “is it async?”

    Engineering can start with three questions:

    1. Does another Agent need its own model turns, tool scope, or conversation context? If yes, choose Subagent.
    2. Does a stretch of work need to be exposed as a listable, readable, waitable, terminable background lifecycle? If yes, choose Job.
    3. Does the current Agent need to continue multiple turns around one goal in the same session, keeping goal stage and turn budget? If yes, choose Goal.

    Illustrative pseudocode for the decision only, not a concrete implementation:

    1. def choose_object(need_agent_context, need_background_lifecycle, need_goal_continuation):
    2. if need_agent_context:
    3. return SubagentSpec(...)
    4. if need_background_lifecycle:
    5. return JobSpec(...)
    6. if need_goal_continuation:
    7. return GoalSpec(...)
    8. return DirectCallSpec(...)

    The function returns different object specs, not one generic Task stuffed with every field. What is unified is the selection entry, not the underlying state machine.

    4. Unify the observation surface, not the entity

    “Everything is a plugin” easily becomes “everything is a task.” A safer approach is to keep Subagent, Job, and Goal as independent objects below, and expose a unified read-only observation surface and operation facade above. For example, TaskView only projects identity, kind, status summary, and links for listing and monitoring. Recovery, permission, and failure semantics still belong to the underlying objects.

    1. class TaskView:
    2. id: str
    3. kind: str # subagent / job / goal
    4. status: str
    5. summary: str
    6. links: dict
    7. # Read-only projection; not responsible for recovery, permission, or failure semantics

    Two benefits follow. Frontends and ops tools can observe work consistently. The system does not lose object boundaries because of a unified display. Cancel should also be interpreted in layers: canceling a Goal may pause progress, and whether child Jobs terminate is a policy; terminating a Job only settles the producer lifecycle; canceling a Subagent stops the child session or activation and should not automatically declare the parent goal failed.

    5. Composition over substitution: how the three objects work together

    The three objects can compose; they cannot replace each other. A typical pattern: a Goal drives multi-turn exploration; each turn may dispatch a Subagent for independent research; when a step needs long-running background execution, the Subagent or Goal creates a Job; after the Job finishes, output is written back as evidence; the Goal’s continuation policy decides continue, pause, block, or complete.

    Keep these engineering boundaries explicit:

    • Permissions: child Agents and background Jobs should inherit necessary rights and be least-privileged. They must not share a wide permission set just because “they are all tasks.”
    • Cancel propagation: whether a parent cancel cascades to children needs an explicit policy, not a guessed meaning of a generic Task cancel field.
    • Failure handling: Job failed is evidence that an execution segment failed, not that the Goal failed. Subagent failure is one delegation result. Goal blocked needs an explicit reason.
    • Recovery: Jobs restore execution state; Subagents restore parent–child relations and context boundaries; Goals restore goal stage and revision. After mixing, recovery actions cannot be distinguished.

    6. Plugins and skill packs: evolution infrastructure, not evolution itself

    Pluginization and skill packs do provide important groundwork for Agent self-evolution. Plugins decouple tools, model routing, executors, storage, policies, and evaluators from the kernel so new capabilities can be registered, composed, and rolled back. Skill packs wrap instructions, tool combinations, constraints, failure modes, and evaluation examples into reusable units so experience can be stored and shared.

    More plugins and more skill packs are not self-evolution. A real evolution loop at least includes: observing task results, cost, latency, failure reasons, and permission events; attributing delegation failure vs. background failure vs. goal blocking; generating candidate skills or plugin combinations; validating with replay, shadow runs, canaries, and offline evaluation; then versioning, compatibility checks, audit, and rollback. Without evaluation and governance, pluginization becomes config bloat. Without task-object boundaries, the loop cannot locate failures stably.

    A more accurate claim: plugins and skill packs are necessary infrastructure for verifiable Agent self-evolution, and a clear split among Subagent, Job, and Goal is the execution skeleton of that infrastructure. A unified observation surface can lower usage cost, but a generic Task object should not flatten recovery, permission, failure, and completion semantics. Only when capability extension, task abstraction, feedback evaluation, and safety governance form a closed loop can Agents move from configurable to evolvable.