MASAKA / Agent platform / Agent Harness
Agent platform

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

Local developmentCodex CLI app-serverReuses the signed-in local Codex session through one persistent process.
Consumer serviceOpenRouterUses a server-held key and the configured low-cost priced model catalog.
Same contractBrowser toolsBoth providers receive the same task-scoped schema and safety instructions.

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

ToolPurposeEvidence
browser_actionsnapshot, tabs, navigate, input, real tab lifecycle, human helpCommand receipt and returned state
browser_screenshotPersist a requested fresh PNGTask artifact ID
write_artifactSave bounded Markdown, TXT, CSV, or JSONImmutable version receipt
browser_select_fileSelect an existing task artifact into an owned page inputChunk 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.

Tool calls
{"kind":"tabs"}
{"kind":"tab_switch","handle":"<returned handle>"}
{"kind":"snapshot"}

Run locally

Local harness
cd agent-harness
npm install
npm test
npm start

# Web UI
open http://127.0.0.1:4192

Local provider credentials stay in the local Codex process. Consumer OpenRouter and MASAKA keys stay in backend configuration.