Anatomy of a single run
Every task, such as downloading last month's statement from a supplier portal, runs through the same controlled path. A scheduler or a request places the job in a queue with its inputs. A worker starts a fresh, isolated browser session, fetches the right credentials from the vault for that portal and logs in. Scripted steps handle the known screens; when the agent reaches a screen that varies, a model reads the page and proposes the next action from an allowed list. A verifier then checks the outcome in code: the file exists, it has the expected period and row count, the status text matches what was recorded. Anything that will submit, file or pay stops at an approval step. The session is destroyed at the end, and the run record is written to the audit store.
How the agent sees the page
An agent can observe a page in different ways, and the choice affects reliability and running cost.
| Observation | Strengths | Weaknesses |
|---|
| DOM and accessibility tree | Precise, lightweight, gives exact element references for clicks | Poor on canvas-drawn screens, some legacy pages and desktop apps |
| Screenshots with a vision model | Works on anything visible, including desktop software and PDFs in viewers | Slower and costlier per step; coordinates can drift on layout change |
| Combined | Uses structure where it exists and vision where it does not | More engineering to build and test |
For most web portals we start from the accessibility tree and fall back to screenshots for specific screens. Desktop applications usually need the vision route, running in a virtual desktop. Background on the model side is in our glossary entry on the computer-use agent.
Sessions, files and data handoff
Much portal work is really file work: statements, challans, acknowledgments and reports. We handle downloads inside the session's sandbox, rename files to a standard convention, record a checksum and move them to your storage, such as a cloud bucket, SharePoint or Google Drive, with the run ID attached. Extracted data is parsed in code and validated before it reaches your systems, using the same checks as our data extraction agents. Session cookies are never shared between runs or between tasks, and each portal account is used by one task type, which makes access reviews simple and limits the effect of a compromised session.
Throughput, scheduling and running cost
Screen agents are slower than API calls, so planning matters when volumes grow. We batch work into windows that suit each portal, run parallel sessions only where the portal's terms and rate limits allow, and spread month-end peaks across days where the deadline permits. Running cost is driven mainly by the number of model-driven steps per task, so every time a screen proves stable we move its steps from the model to a script. The aim is that, over time, the model handles only the exceptions while scripts do the routine work.
Exception categories and what happens in each
"Escalate to a person" is not enough as an exception rule. We classify the exceptions each task can meet and define the response for each, so the agent behaves predictably and the person who picks up the case knows what to do.
- Portal unavailable or slow: retry with backoff within the task's time window, then reschedule and notify if the deadline is close.
- Login or session problem: stop immediately, never retry passwords repeatedly, and alert the account owner, since repeated failures can lock an account.
- Human step required: OTP or CAPTCHA screens pause the run and notify the named person, who completes the step in a shared view.
- Unexpected message on screen: capture a screenshot, have the model summarize it, and hold the case for review rather than guessing a response.
- Data mismatch: when portal values differ from your records, record both and send the case to the process owner with the evidence.
Each category is counted in reporting, which shows whether problems come from the portals, your data or the agent itself.
Keeping agents healthy as portals change
Portals change without notice. Instead of waiting for a month-end failure, we run a light canary task on each portal on a schedule, such as logging in and opening the key screens, and alert when a step fails or a screen no longer matches what scripts expect. Failed scripted steps fall back to the model where safe, and the failure is logged so the script can be updated. A monthly report lists each portal's success rate, average steps per run, manual interventions and the changes made, so your process owner can see which tasks are stable and which still need attention.
A sensible first project
Good first tasks are frequent, read-mostly and easy to verify: downloading statements, checking statuses, collecting reports from several portals into one place. They build trust in the audit trail and the exception handling before any task involves submitting data. Tasks with filings or payments come later, always with approval. Indian tax and compliance work often has an API route through licensed intermediaries, which we check first; our finance and accounts page and the Tally integration page describe how portal data typically flows into accounting.