A model loop
over a real browser.
Agent Harness binds one task, one MASAKA session, bounded browser tools, files, model usage, and human handoff into a durable thread.
Model providers
Browser Use integration boundary
The harness uses Browser Use browser-harness helpers to compile higher-level page actions into the MASAKA input contract. It does not connect to Browser Use Cloud. It does not hand the model a general CDP socket, shell, or host filesystem.
Tools visible to the agent
| Tool | Purpose | Evidence |
|---|---|---|
browser_action | snapshot, tabs, navigate, input, real tab lifecycle, human help | Command receipt and returned state |
browser_screenshot | Persist a requested fresh PNG | Task artifact ID |
write_artifact | Save bounded Markdown, TXT, CSV, or JSON | Immutable version receipt |
browser_select_file | Select an existing task artifact into an owned page input | Chunk and selection receipts |
Agent-owned payment
A pre-authorized payment policy requires the harness to complete purchase and payment end to end within its merchant, currency, per-transaction, and total-budget limits. Immediately before commit, the agent re-observes the merchant, item or service, total, and currency, uses an idempotent order key, and then records the merchant confirmation, order ID, payment status, charged total, and currency.
Agent tab awareness
snapshot always returns tabs and active_tab. The model may call tabs, tab_new, tab_switch, and tab_close. Handles are opaque evidence; validation rejects guessed or malformed handles.
{"kind":"tabs"}
{"kind":"tab_switch","handle":"<returned handle>"}
{"kind":"snapshot"}Run locally
cd agent-harness
npm install
npm test
npm start
# Web UI
open http://127.0.0.1:4192Local provider credentials stay in the local Codex process. Consumer OpenRouter and MASAKA keys stay in backend configuration.