Agent-Generated Tools: An Engineering Path to Self-Evolving Interfaces

    Computer-use agents are constrained not only by model capabilities but also by the observations and actions their interfaces support. This article explains how agents can turn recurring interaction patterns into reusable tools through proposal, implementation, verification, and lifecycle management. It also covers the safeguards and metrics needed to make interface evolution reliable and measurable.

    1. When the Interface Becomes a Capability Ceiling

    Imagine a computer-use agent working with a spreadsheet. Instead of writing a processing script, it clicks a cell, enters a value, and moves to the next cell. Now imagine asking it to locate a function in a 2,000-line source file. Rather than running a search command, it prints the entire file in the terminal and reads through it.

    These behaviors are often interpreted as evidence that the model is not smart enough. A more precise diagnosis is that the agent’s capabilities are bounded by the observations and actions available through its interface. Even a powerful model can only combine the operations it has been given; it cannot invoke an action that the interface does not expose.

    A computer-use agent operates a computer much as a person does: observing the screen, clicking, and typing to complete tasks such as booking tickets, organizing files, or handling email. Its versatility comes from using the graphical interface as a general-purpose access layer. Its inefficiency often comes from the same source.

    2. The Three Costs of a Fixed Interface

    A common approach is for engineers to design the interaction interface before deployment—typically screenshots, mouse and keyboard controls, and a few hand-written tool functions—and then leave it largely unchanged. This creates three kinds of cost:

    • Observation mismatch: Occluded windows, shifting scroll positions, and rendering delays can cause the visible state to diverge from the actual state. The agent must repeatedly take screenshots to confirm what happened.
    • Missing actions: To execute a command, the agent may first have to open a terminal, type the command character by character, and inspect a screenshot to determine the result. The problem is not that the agent cannot perform the operation; it is that direct execution has been replaced by an unnecessarily long interaction sequence.
    • Outdated assumptions: The interface reflects assumptions about tasks made at design time. New applications, workflows, and models can make those assumptions obsolete.

    3. Two Remedies—and Their Limits

    The first remedy is more test-time compute. Additional attempts, reasoning, and multiple sampled execution paths can compensate for interface limitations. This can work, but it is expensive and fragile. When the same failure modes recur, more sampling improves the probability of success without removing the underlying defect.

    The second remedy is reusable skills. Successful workflows can be captured as reusable procedures. The benefits are real, but skills generally combine existing observations and actions. They do not expand what the interface can reach.

    The implication is that an agent’s interface should not be a constant fixed before deployment. Like software, it should improve continuously based on experience.

    4. Treat the Interface as Code

    Treating the interface as a software asset means giving it versions, tests, reviews, and retirement mechanisms. The agent should be able not only to use tools during execution, but also to produce them.

    A minimal tool description can be expressed as a structured declaration rather than an informal natural-language note:

    1. {
    2. "name": "locate_symbol",
    3. "description": "Locate the definition line of a symbol in a specified source file",
    4. "parameters": {
    5. "path": {"type": "string"},
    6. "symbol": {"type": "string"}
    7. },
    8. "returns": {"line": "integer", "snippet": "string"},
    9. "idempotent": true,
    10. "risk_level": "read_only"
    11. }

    This makes the tool’s purpose, inputs, outputs, idempotency, and risk classification explicit.

    5. The Four Stages of the Tool-Generation Loop

    1. Propose: Identify recurring patterns in failed execution traces. If the same intent repeatedly requires a long action sequence and multiple screenshots for confirmation, it is a candidate for a dedicated tool.
    2. Implement: Generate the implementation in a sandbox. Prefer existing atomic system capabilities over simulated graphical interactions.
    3. Verify: Test the tool against cases with checkable outcomes, including normal execution, boundary inputs, failure semantics, and idempotency. A tool that fails verification must not enter the catalog.
    4. Catalog and retire: Tag tools and track their usage and success rates. Automatically remove tools that remain unused for long periods or exhibit high failure rates.

    The following pseudocode illustrates the scheduling logic:

    1. while not done:
    2. tool = catalog.match(intent, context) # Check the agent's own tools first
    3. if tool and tool.verified:
    4. result = tool.run(args) # Invoke directly, bypassing the UI
    5. else:
    6. trace = agent.act_via_ui(goal) # Fall back to the general-purpose UI
    7. if repeated_pattern(trace, threshold=2):
    8. candidate = synthesize(trace)
    9. if verify(candidate, cases=gen_cases(trace)):
    10. catalog.add(candidate) # Extend the interface
    11. done = evaluate(goal, result)

    The central design is a two-path architecture: established intents take the fast tool path, while long-tail intents use the slower general-purpose interface. Reusable patterns discovered on the slow path feed back into the fast path.

    6. Engineering Requirements

    • Isolation and least privilege: Tool generation and execution must occur in isolated environments. Permissions should distinguish read-only, write, and destructive operations. Destructive actions require explicit confirmation.
    • Idempotency and replayability: Design write operations to support safe replay and compensation after failure, avoiding side effects from duplicate submissions.
    • Observability: Collect tool-call traces, screenshot-based assessments, and failure reasons in a unified way. Standard cloud logging, monitoring, and alerting services can support trend analysis.
    • Cost and latency controls: Apply timeouts and budgets to tool calls so that tool generation does not become another source of uncontrolled compute consumption.
    • Human review: Retain human approval gates for high-risk tools. The pace of interface evolution must match the strength of its governance.

    7. Measuring Interface Evolution

    Tool count alone does not show whether an interface is improving. Useful measures include:

    • Step efficiency: The reduction in average actions and screenshots required to complete the same task.
    • Tool match and reuse rates: The proportion of intents covered by the agent’s tools and the frequency of reuse across tasks.
    • Verification pass and rollback rates: Indicators of generated-tool quality rather than quantity.
    • Task success and tail latency: Final outcome measures that prevent optimization from focusing only on intermediate process metrics.
    • Growth in interface coverage: The expansion of the reachable action space enabled by new tools.

    8. Risks and Boundaries

    Agent-generated tools introduce supply-chain-like risks. A faulty abstraction can be reused frequently, turning a local error into systematic bias. A growing catalog can add retrieval noise, and generated code can contain hidden defects.

    Verification must therefore remain the admission gate, retirement must be routine, and human review must provide a backstop.

    Interface evolution also has limits. It cannot resolve misunderstandings of the task objective or determine accountability. Those issues still require clear task specifications and governance mechanisms.

    9. Conclusion

    The gap between clicking through a spreadsheet cell by cell and processing it with a script is not necessarily a gap in model intelligence. It may be a gap in whether the interface permits a more effective approach.

    Turning the interface from a fixed deployment-time choice into a software asset that can be proposed, verified, cataloged, and retired is an important step toward agents that can improve their own operating capabilities. When agents write their own tools, they take on part of the engineering iteration loop—not just the execution of an existing workflow.