Computer-Use and Browser Agents › Working example: reconciling a task list

Michael BrenndoerferDecember 1, 20262 min read
Language AI HandbookAll chapters
Part 49 of 67Long-Horizon Agents and Interoperability
Chapter 373Computer-Use and Browser Agents › Working example: reconciling a task list
Reading section 10 of 15 · Working example: reconciling a task list · 2 minSection 10 of 15 · 2 min

Section 10 of 15 · 2 min read

Reading settings

Definitions

Choose how many terms have tooltips.

Article links

Make inline references clickable

Notes & comments

A compound objective marks task 2 done and archives task 1. The grant carries each operation and record separately. After marking task 2 done, the policy reads the accepted outcome, returns to the task list, takes a new view of task 1 and confirms the archive. It uses the same runtime for both writes. The success predicate checks both final task states.

PythonIn [33]
CollapseExpand
def compound_policy(obs, history):
    if obs.page == "confirm":
        return choose(obs, "Archive task", "Confirm archive")
    if "done" not in history:
        return choose(
            obs, "Open task 2" if obs.page == "tasks" else "Mark done"
        )
    if obs.page == "tasks":
        return choose(obs, "Open task 1")
    if history[-1] == "done":
        return choose(obs, "Back")
    return choose(obs, "Archive")
PythonIn [34]
CollapseExpand
app = MockApp()

compound_grant = Grant(done=frozenset({2}), archive=frozenset({1}))

finished = lambda local: (
    local.tasks[2] == "done" and local.tasks[1] == "archived"
)

success, outcomes = run_episode(app, compound_policy, compound_grant, finished)
ConsoleOut [35]
CollapseExpand
Compound goal complete: True | outcomes: ('open', 'done', 'back', 'open', 'ask_archive', 'archive')
Final local tasks: {1: 'archived', 2: 'done', 3: 'done'}

A final result can describe each operation separately. If the first write succeeded and the archive was denied, report a partial outcome. A single failed label loses information about a completed write. A single done label can conceal an unmet part of the request. The fixture is sequential. An application that promises an atomic multi-record change needs transactional support or a specified compensation policy at its own boundary.

Comments

Add to the conversation

A question, a correction, or an example from your own work.

No comments yet. Be the first to share your thoughts!

Newsletter

Stay up to date

Get new articles, book updates, and notes on AI and technology.

Unsubscribe at any time. Privacy policy