oc.browser(), the browser you drive with Playwright, exists only in the TypeScript SDK.
What you need
- An Outcrawl API key in
OUTCRAWL_API_KEY. - The portal’s sign-in in
NORTHGATE_EMAILandNORTHGATE_PASSWORD. The script types them itself; the agent never sees them. npm install @outcrawl/sdk playwright. Playwright is only the driver; the browser runs on Outcrawl.
How it works
1
2
Script the part that never changes
Sign in with the SDK’s human-input methods, then read the exceptions table row by row with Playwright through
page.raw. The list is read exactly, not interpreted by a model.3
Close the browser and pass the profile on
An agent run cannot attach to a browser you opened. What it can share is the profile: closing the browser frees your browser slot and the profile, and the agent run starts signed in to the same account.
The program
finally, whatever happens in between. A browser that is never closed keeps holding one of your account’s browser slots until its lease runs out, six hours later. The agent runs go one after another because a profile holds one session at a time.
What you get back
console.table(report) prints one row per exception (a sample):
What it costs
A browser you drive yourself is 1 credit a minute, plus proxy usage. The scripted part takes about 45 seconds: under 1 credit. An agent run is billed for the model’s usage, browser time and proxy usage, and a typical run costs about 15 credits a minute all in, proxy usage included. A shipment takes about 50 seconds (the shipment, the carrier’s tracking page, one detail view): about 13 credits per exception, with acaps.budget of 25 for each run. That is an estimate: the real figure depends on the task, and a heavy tracking page costs more.
Twelve exceptions a morning is about 157 credits, or about 3,450 over 22 working days. Reading the table with an agent as well would add about 30 seconds, 8 credits a day, and the list would come from a model instead of from the page.
Make it yours
- Run the script from a scheduler at 07:00 and post the table to your team’s channel with a Slack incoming webhook.
- Filter in the script: send only exceptions older than a day to an agent.
- Use
page.extract(instruction, schema)inside the scripted session for a one-off read that is not worth a whole agent run. - When the portal changes its sign-in form, only the four sign-in lines change; the agents do not care.
Related
Browsers
oc.browser(), page.raw and human input.Profiles
The login the script and the agents share.
Agents
Schemas, caps and statuses.
Rules
Guardrails for each run.