Building and Using Agent Capability Chains in Practice

    This article explains why short question-and-answer tests hide the real gains of newer large models, and how to evaluate them on end-to-end tasks instead. It presents a five-layer capability chain—live information, documents, state, expression, and execution—and gives practical guidance for each layer: building verifiable source trails, auditing batches of documents before summarizing, governing memory and reusable skills by scope, and letting models work with real files and commands under sandboxing and least privilege. It also covers cost and cache design, observability, and a staged rollout path.

    1. Why Shallow Q&A Hides the Real Gains of a Model Upgrade

    When teams evaluate a new generation of large models, they often reuse the same questions they have asked many times before. The answers come back slightly faster and slightly smoother, so they conclude that the upgrade makes no noticeable difference. The problem is not the model; it is the task length. Short Q&A involves a small context window, few tool calls, and almost no verification, which compresses generational differences to the point where they cannot be observed.

    Stretch the task out and the picture changes completely. In a loop that requires reading a repository, drafting a plan, editing twenty files, running tests, and fixing errors, the waiting time saved in each round accumulates into a continuous, uninterrupted work session. Evaluation therefore needs to shift from “quality of a single answer” to “end-to-end task completion rate, number of manual rework rounds, and total elapsed time.”

    2. A Layered Model of Capability Chains

    The valuable way to use these models is to connect “information that just appeared” to “the work you are doing right now,” and then push an answer forward into a deliverable that can be checked. This chain has five layers:

    1. Live layer: real-time information retrieval with source tracing;
    2. Document layer: private files, batch documents, and knowledge collections;
    3. State layer: long-term memory, project context, and reusable skills;
    4. Expression layer: image, audio, video, and continuous media generation;
    5. Execution layer: real file systems, command lines, API calls, and billing.

    Each layer down, the model takes over more complete work, and the responsibility you carry for permissions, verification, and cost grows heavier.

    3. Live Layer: Turning Search into a Verifiable Evidence Chain

    For breaking information, the right move is not to ask for a conclusion but for a path that can be traced back: first locate the earliest original statement from the people directly involved, then add evidence from official channels and multiple news outlets, and finally output a three-part structure of timeline, points of dispute, and unconfirmed items.

    1. Output template:
    2. - Timeline: timestamp + event + source link
    3. - Confirmed: consistent across at least two independent sources
    4. - Disputed: sources conflict; list each side's claim
    5. - Unconfirmed: single source only, or cannot be verified

    In engineering terms, treat “number of sources, completeness of timestamps, whether the source is primary” as hard fields. Missing any of them means the output fails, rather than letting the model paper over the gaps with vague natural language.

    4. Document Layer: Inventory Before Summary

    When you feed in a dozen documents at once, what you need first is not a summary but a health check: which files parsed completely, which scanned pages were not recognized, which numbers conflict with each other, and on which page each conflict sits. Making the model go back to the original text by page number is one of the most effective ways to suppress hallucination.

    A workable verification order is: parse coverage statistics → extraction of key metrics → cross-document consistency comparison → conflict list → item-by-item reference back to the source. Once private material is placed in a unified knowledge collection, you also need permission isolation and version management so that outdated documents do not contaminate conclusions.

    5. State Layer: Govern Memory, Projects, and Skills Separately

    Long-term state must be layered: temporary context within a session, persistent context at the project level, and preferences and conventions that span projects. Mixing the three produces a common failure: the model treats a one-off agreement as a permanent rule.

    Give each memory entry a type, a scope of effect, and an expiry time, and keep an auditable read/write log. Reusable skills should be written as templates with explicit input and output contracts, not as a vague prompt.

    6. Execution Layer: Let the Model Touch Real Files and Commands

    For coding and computer-use tasks, the key is to let the model read directories, modify files, run tests, and iterate on failure messages. Integration can come through AI coding tools, general API calls, or model services from cloud vendors; the focus should be sandbox isolation, least privilege, and operation auditing.

    1. # Example: execution wrapper with approval and logging
    2. def run_task(task, sandbox, approver, logger):
    3. plan = task.plan()
    4. for step in plan:
    5. if step.needs_approval and not approver(step):
    6. logger.reject(step)
    7. break
    8. logger.record(step)
    9. sandbox.execute(step)

    7. Cost and Caching: Design the Bill In

    The real risk of long tasks is a bill that spirals out of control. Separate four cost types—input, output, cache hits, and tool calls—cache repeated prefixes, compress retrieval results into summaries, and set a maximum number of rounds and a budget cap for loops. Observability should cover task success rate, average rounds, cache hit rate, and cost per task, with monitoring and alerting attached. Baidu AI Cloud, with general capabilities in model services, container platforms, object storage, and log monitoring, can serve as a common choice for hosting this kind of long-running task.

    8. Rollout Path

    Phase one covers retrieval and document verification only. Phase two adds project-level memory and skill templates. Phase three opens file and command execution. Phase four connects external collaboration channels and completes budget governance. You can stop at any layer, but do not sentence a new generation of models to death after three lines of small talk.