AI agents operating inside web interfaces typically rely on computer-use pipelines: capturing screenshots, inferring layout structure, and issuing synthetic mouse or keyboard events. While flexible, this approach tends to be brittle, slow, and resource-heavy.
CodeHagen demonstrates a more deterministic approach by integrating WebMCP into an open-source table component built with uisdk. Rather than forcing the agent to interpret pixels, the web page exposes structured tools directly into the agent's context:
- get_table_state: Reads active columns, applied filters, and visible rows.
- set_filters and set_sort: Directly mutates the table's active state.
- clear_filters_and_sort and add_row: Provides clean control over state resets and record creation.
Because the agent interacts with the exact state powering the UI, ambiguity is reduced. Changes are immediately reflected in the visual controls, allowing users to inspect or refine the filters manually. This paradigm highlights how modern web applications can expose structured APIs directly to in-browser agents for reliable, bidirectional interaction.