Four Capability Building Blocks for Agents Taking Over Legacy Systems

    This article explains why legacy systems without external APIs are hard to automate and how AI agents can close the gap by combining four capabilities: computer use for on-screen actions, browser structure parsing for reliable element targeting, Skills-based rule injection for business logic, and file handling for input and output continuity. It includes a reference state-machine implementation, a practical rollout strategy focused on least privilege, rollback, and verification, and a realistic view of where the efficiency gains come from.

    1. The Root Problem: Legacy Systems Lack Orchestratable Interfaces, Not Compute

    Many enterprise intranets still run legacy backends with no external interfaces. Login, form submission, attachment uploads, and report exports can only be completed through the UI. Traditional automation offers two paths. One is to modify the system to add interfaces, which means long timelines and high regression costs. The other is to record fixed operation scripts, which break as soon as the page changes slightly. A third path is to let an agent with visual and operating capabilities directly “see the screen and drive the mouse and keyboard,” treating the interface as a programmable surface.

    But being able to click is far from enough. Real business workflows have at least four common failure points: not knowing the numbering rules and review criteria, being unable to obtain customer materials, producing files that cannot flow back, and losing element targets when the page structure changes. Four capabilities map to these one by one: interface operation handles the actions, page structure parsing handles targeting, task rule injection handles business knowledge, and file handling handles input and output continuity.

    2. How the Four Capabilities Form a Closed Loop

    • Interface operation (computer use capabilities): Takes screen captures as input and outputs actions such as mouse movement, clicks, typing, and scrolling. More mature implementations allow a single model response to return multiple sequential actions, reducing the overhead of “one click, one round trip.” This has a significant impact on latency and cost for long workflows.
    • Page structure parsing (browser use capabilities): Beyond visual information, reads the web accessibility tree and element semantics to target fields and buttons directly, reducing reliance on fixed pixel coordinates. This is better suited to forms, lists, and multi-step wizards.
    • Task rule injection (Skills capabilities): Loads team SOPs, field mappings, and validation criteria into the task as reusable assets, so rules are not hard-coded in prompts and can be versioned and audited.
    • File handling (Files capabilities): Lets input attachments and output files travel along the same chain, avoiding manual shuffling between directories.

    The choice boundary can be compressed into one sentence: use interface operation across desktop applications, and evaluate structure parsing first when the work stays within a web page. It is worth emphasizing that page structure also changes. Pop-ups, nested canvases, and permission prompts can still cause failures, so production workflows cannot skip result checks and exception branches.

    3. Reference Implementation: A Closed Loop as an Auditable State Machine

    1. # Illustrative code: state machine + rule assets + file context + result verification
    2. def run(task, ctx):
    3. rules = load_skills("claim_review_v3") # versioned rules and field mappings
    4. files = ctx.input_files # input materials travel along the chain
    5. for step in plan(task, rules):
    6. if step.target.type == "web":
    7. loc = resolve_by_structure(step.target) # prefer structure-based targeting
    8. else:
    9. loc = resolve_by_vision(step.target) # vision-based targeting across apps
    10. obs = act(loc, step.action) # may return multiple sequential actions
    11. if not verify(obs, rules):
    12. return rollback(ctx.snapshot(), reason=step.name)
    13. return submit(files.output, rules.field_map)

    There are three key design points. First, take a snapshot before each step to guarantee rollback. Second, keep the verification function independent of the execution logic and driven by business rules. Third, log all targeting and actions to make failure attribution easier.

    4. Rollout Strategy: Start with Least Privilege, Rollback, and Verifiability

    1) Least privilege: Assign the agent a dedicated account, open only the menus and data scope required by the target workflow, and prohibit operations involving funds, permissions, and bulk deletion.
    2) Workflow tiering: Start with read-only queries and draft form filling, then gradually open submission actions; keep human confirmation at high-risk nodes.
    3) Idempotency and rollback: Check for duplicates before submission actions and restore from snapshots on failure to avoid duplicate records.
    4) Verifiable results: Outputs must include verifiable evidence (transaction IDs, exported files, page screenshots) and be written to logging services and monitoring alerts to form a traceable chain.
    5) Resilience design: Prepare explicit exception branches for pop-ups, CAPTCHAs, timeouts, and permission prompts instead of letting the model improvise.

    If the enterprise already has common cloud infrastructure such as a container platform, object storage, a message queue, and log monitoring, agent runtime, file staging, task scheduling, and auditing can each land in the corresponding category, avoiding tight coupling with business systems.

    5. Where the Gains Come From: Trading “Time” for “Stability”

    Publicly reported cases commonly show three types of gains: significantly compressed duration for long workflows (for example, claims processing dropping from around half an hour to the low tens of minutes), roughly a 30% reduction in cost per task, and higher completion rates without changing the prompt. These numbers deserve a rational reading: they come from scenarios with high workflow standardization and relatively stable interfaces and cannot be directly extrapolated to all legacy systems.

    The truly sustainable gain is not just “faster.” It is making the implicit rules once maintained by human memory explicit as versionable assets, and turning non-reproducible operations into auditable logs. When rules, files, and execution traces can all be verified, automation becomes qualified to enter core business production.