How to Safely Connect Computer-Use Agents to Legacy Enterprise Systems

    This article explains how to evaluate and deploy computer-use agents that automate legacy enterprise systems without APIs. It covers four core capabilities—UI operation, web structure recognition, business rules, and file handling—along with state-machine execution, security boundaries independent of model judgment, business-level result verification, and realistic evaluation metrics for production readiness.

    1. Evaluate Capability by Delivery, Not by Demonstration

    Many enterprise systems still support critical business functions but expose no stable interfaces for external calls. Employees must open pages, look up records, fill in forms, upload documents, and confirm results through the interface. These systems may have run for years, and retrofitting them involves historical data, permission structures, and business approval chains, often at a cost far higher than adding a few endpoints.

    Computer-use agents offer an alternative for these scenarios: instead of requiring the business system to complete API modernization first, they use the existing human-facing interface to perform tasks.

    This does not mean “the model can use a mouse and keyboard, so automation is solved.” A successful run in a demo environment and reliable operation in production are two different requirements. What actually needs to be evaluated is whether the agent can understand the business objective, select the correct target, execute controlled operations, and provide evidence that the task was completed.

    Technical assessment should therefore shift from “operation capability demonstration” to “business outcome delivery.” A production-grade solution must answer at least these questions:

    • Are the input materials complete, and are key fields unambiguous?
    • Is the current target really the intended customer, order, or business record?
    • Which operations can run autonomously, and which require human confirmation?
    • How does the task recover after page changes, session expiry, or network errors?
    • Do the system’s returned results match expectations?
    • When an error occurs, can the cause be identified and the blast radius contained?

    These questions determine whether the agent is a demo aid or an automation unit that can be incorporated into enterprise processes.

    2. Four Capabilities Form a Complete Task Loop

    2.1 UI Operation: Turning Business Intent into Actions

    Computer use typically relies on observing screen state and performing actions such as clicking, typing, and scrolling. Its value lies in crossing application boundaries: a single task may require switching between a business backend, a file-viewing window, and a local application, none of which share interfaces.

    A typical execution flow can be summarized as: observe the current state → decide the next step → execute an action → observe again → verify the change.

    The “observe again” step cannot be skipped. Clicking a button only sends an operation request; it does not prove the system accepted it. The button may be obscured, the page may not have loaded, or a permission error may have appeared.

    For steps with small state changes and low risk, executing several actions consecutively can reduce interaction overhead. But the longer the consecutive action sequence, the more likely it rests on stale page state. At critical nodes—page navigation, record selection, final submission—the state should be re-acquired and verified rather than simply minimizing the number of actions.

    2.2 Web Structure Recognition: Reducing Dependence on Fixed Coordinates

    When a task stays within web pages, an execution approach that can read the page structure is usually worth prioritizing. It can locate targets using field labels, button text, element roles, and other structural information rather than relying solely on screen coordinates.

    For example, “enter the target number in the order ID field” expresses clearer business intent than “click a screen coordinate and type the number.” When the window is resized or the layout changes, structure-based location tends to remain correct.

    That said, structural location is not a guarantee of stability. Repeated buttons, dynamic lists, nested frames, custom-drawn areas, and permission pop-ups can all create ambiguity. A reliable implementation combines context: determine the target area first, then locate the control, and finally check the business identity of the object.

    Selection principles include:

    • If an authorized, stable business API exists, use it first.
    • If no API exists but the page structure is clear, prioritize structured web operation.
    • If the task spans applications, or key areas cannot be accessed through the page structure, use desktop visual operation.
    • For mixed tasks, different methods can be combined, but state recording, permission management, and result verification should be unified.

    These approaches are alternatives under different conditions, not substitutes for one another.

    2.3 Business Rules: Defining What Correct Processing Means

    Even if the agent finds the right button, it can still make the wrong business decision. How customer records are matched, whether attachments are complete, which fields are modifiable, and when escalation to human review is required all need explicit rules.

    Rules should cover at least three categories:

    1. Operating instructions: page entry points, field locations, and the normal processing sequence.
    2. Business constraints: e.g., amounts must not exceed the authorized range; incomplete materials cannot proceed to submission.
    3. Exception-handling policies: e.g., if multiple customers share a name, pause—never pick the record that merely “looks most similar.”

    Business rules also need version management. Each task should record which rule version was used, so historical decisions can be explained after process changes. For deterministic judgments such as amount ranges, required fields, and identifier consistency, programmatic validation should be used wherever possible rather than leaving everything to model inference.

    2.4 File Handling: Keeping Materials and Records Consistent

    File processing is not simply “download and re-upload.” Real workflows involve source verification, content extraction, version identification, access permissions, and archival relationships.

    Consider material registration: the agent must confirm the attachment belongs to the current business object, that the file is readable, that extraction covers the required fields, and that the uploaded file is correctly linked to the record. If any link in this chain is missing, you can end up with “form filled out, but the attachment attached to the wrong customer.”

    Files should carry traceable metadata: business identifier, source, receipt time, and checksum digest. Note that a checksum can only show whether file content changed—it cannot by itself prove the source is trustworthy.

    Sensitive materials also need access boundaries, retention periods, and cleanup policies, so that temporary files, screenshots, and execution logs do not become new data-leakage vectors.

    3. Start with Low-Risk Scenarios, Not Direct Takeover of Core Transactions

    The best candidates for a first pilot share five characteristics: high task frequency, clear decision rules, low operation permissions, independently verifiable results, and controllable error impact.

    For example, querying records and generating summaries, entering materials into drafts, and organizing attachment lists are good starting points. Directly executing payments, deleting records, or modifying critical account information is not.

    “Recoverable” also needs a concrete definition. A saved draft can usually be edited again, but a sent notification often cannot be recalled, and a submitted business application may create downstream obligations. Distinguish among:

    • Operations that can be directly undone;
    • Operations that require compensating processes to correct;
    • Operations that cannot be reliably reversed.

    For the third category, set up explicit human approval nodes. The agent can prepare materials and run validations, but “technically able to click” is not the same as “business authorization granted.”

    4. Orchestrate with a State Machine, Not Long Instructions

    A production process should not rely on a single long natural-language prompt executed from start to finish. A more robust approach is to break the task into explicit states and define entry conditions, completion evidence, and failure exits.

    For example, a material-entry task might be divided into:

    Pending → Material Validation → Record Location → Draft Entry → Human Review → Final Submission → Result Verification → Archival.

    Each stage carries limited responsibility. If material validation fails, record location must not proceed; if a query returns ambiguous results, entry must not begin; before final submission, required authorizations must be complete.

    This design also addresses a common problem: the agent does not know whether its previous operation succeeded. Suppose submission times out—the timeout does not mean the submission failed. Retrying directly could create duplicate records. The correct approach is to query system state first, using the business identifier, submission time, and record content to determine whether the operation already completed. Only if it is confirmed incomplete should re-execution be allowed.

    A local task identifier can help manage execution records, but it does not make a legacy system inherently idempotent. For systems without reliable duplicate detection, uncertain outcomes should go to human review rather than retrying indefinitely.

    Exception handling should also be classified: transient load failures can be retried a limited number of times; session expiry requires re-authentication; insufficient permissions should stop the process; conflicting business information requires human adjudication. Different exceptions must not all be covered by the same “try again” strategy.

    5. Security Boundaries Must Be Independent of Model Judgment

    The pages, files, and pop-ups encountered by a computer-use agent may contain incorrect information—or even text deliberately crafted to alter its behavior. Therefore, business materials must be treated only as data to be processed; they must never be granted the authority to modify execution rules or expand permissions.

    Security controls should include at least:

    • Least privilege. Use a dedicated identity granted only the access the task requires. Read, edit, and final submission should be separated where possible.
    • Execution scope limits. Restrict which applications, pages, and file locations are accessible. External redirects, unknown downloads, and operations unrelated to the task should be blocked or require confirmation.
    • Credential protection. Passwords and other credentials should be managed by a controlled mechanism, never written directly into task text or ordinary logs. Screenshots and logs should also be redacted as needed.
    • High-risk action interception. Deletion, payment, authorization changes, and similar actions must pass an independent policy check, not merely rely on the model’s promise not to do something dangerous.
    • Human takeover. When the page deviates from expectations, the target is ambiguous, or retry limits are exceeded, pause and preserve the scene instead of pushing forward.

    The core principle: permissions, approvals, and audit must not live only in the prompt. They must be enforced in the execution environment and the process-control layer.

    6. Verify Results Against Business Facts

    Reliable acceptance checks include at least three layers:

    1. UI layer: Does the page show a success state? Have error messages disappeared?
    2. Data layer: Do the written fields match the inputs? Are attachment counts and business associations correct?
    3. Business layer: Did the record enter the expected state? Was a queryable business number generated? Can downstream steps read the result?

    Seeing a “submission successful” message alone does not prove the business is complete. A safer approach is to reopen the record and verify key fields and attachments; if an authorized read-only query API exists, it can also be used for independent verification.

    Execution logs should record state transitions, key operations, and verification conclusions, while following data-minimization principles. Auditing requires sufficient evidence, but that does not mean permanently storing every screenshot and raw file.

    7. How to Evaluate Effectiveness Without Being Misled by a Single Demo

    Evaluation metrics should include not just completion time and success rate, but also human-intervention rate, erroneous-write rate, duplicate-submission rate, exception-recovery rate, and total cost per task.

    Cost should cover model calls, execution environment, human review, and failure remediation. A process that appears faster may deliver little real benefit if it requires frequent manual checks.

    Test sets should cover both the normal path and boundary conditions: missing materials, duplicate records, slow page loads, insufficient permissions, popup interference, and layout changes. Tasks of different risk levels should be reported separately—a large number of simple-task successes must not mask a small number of high-risk failures.

    For efficiency figures reported in external case studies, pay attention to the sample scope, task definitions, and verification methods. They cannot be directly transferred as a benefit commitment for your own business.

    A sensible rollout order: validate in an isolated environment first, then run in read-only or draft mode, then open a small number of low-risk writes, and finally expand scope based on continuous observation.

    Conclusion

    The value of a computer-use agent is to provide a new automation entry point for legacy systems that lack interfaces—not to remove engineering controls. UI operation solves execution, page-structure recognition solves locating, business rules constrain judgment, and file management maintains the material chain; state machines, permission controls, and result verification determine whether the entire process is trustworthy.

    When evaluating this kind of capability, the most important question is not how many times the agent can click in a row, but whether it completes the correct task under explicit authorization, proves the result, and stops safely when uncertain. Starting from low-privilege, recoverable, verifiable processes is how technical capability is gradually converted into reliable business capability.