Most browser automation tools break the moment a dynamic DOM changes, a class name gets auto-generated, or a React portal shifts layout states.
I got tired of fixing brittle selectors, so I spent the last few months solo-building AIBA (Autonomous Internet Browsing Agent) from the ground up.
It is a production-grade, open-source engine designed to execute complex web workflows completely unattended. Instead of relying on fragile DOM trees, AIBA treats the browser as eyes, not just hands—combining parallel execution with visual reasoning.
Here is how the architecture and optimizations work under the hood.
1. Swarm Intelligence & Parallelism
When you give AIBA a high-level research goal, it doesn't just run a single linear agent loop. It coordinates a parallel swarm:
- Phase 1 (Decomposition): An orchestrator analyzes your prompt and breaks the goal down into independent research tasks.
- Phase 2 (Parallel Execution): It dispatches up to 50 sub-agents in parallel. Each agent runs on its own independent loop: Think -> Plan -> Discover -> Execute -> Synthesize -> Report.
- Phase 3 (Cross-Verification): Findings from every sub-agent are cross-referenced across multiple sources. Contradictions are flagged and isolated to completely eliminate hallucinations, outputting a single, high-signal intelligence brief.
2. Bypassing the DOM: Coordinate-Based Interaction
To prevent UI changes from breaking the agent, AIBA uses a combination of visual models and spatial execution:
- Set-of-Marks (SOM) Injection: It injects a client-side JS canvas overlay dynamically into the active DOM. This highlights interactable elements with visual tags that the agent's vision model can immediately read.
- Dual-Layer 50px Visual Grids: If DOM elements are completely detached or buried in portals, AIBA overlays a coordinate grid. It interacts with the page via pixel-perfect, relative coordinates, mimicking how a human physically moves a mouse.
- High-Scale Engineering Optimizations
Running 50 parallel agents can destroy your context window and your budget. Here is how AIBA handles efficiency at scale:
- Dynamic DOM Compression (
--tree-pruned): Raw HTML is massive. AIBA uses custom tree-pruning algorithms to compress and strip useless background nodes, keeping the context window strictly capped at 3k tokens. - Shared Browser Runtime (
--shared-runtime): To avoid launching 50 resource-heavy Chromium instances, all parallel agents route through a single core browser process while running within strictly isolated, sandboxed browser contexts. - Scheduled Beats: You can define cron-scheduled runs using a simple
beats.yamlfile. AIBA wakes up entirely headless, runs the research swarm, and emails the final markdown brief to your inbox.
beats:
- name: "competitor watch"
schedule: "0 8 * * *"
template: default
prompt: "Check competitor pricing and update our database..."
mode: swarm
effort: balanced
Code Quality & Project Status
This isn't a prototype wrapper. I built this with production-grade stability in mind:
- Licensed under the APL (Apache-style open-source license).
- 100% unit and integration test coverage validated across 257 test suites.
- Strict Pyright static typing and Ruff formatting enforced on every commit via GitHub Actions.
The code is completely open, and I would love to get the community's feedback on the architecture, token optimization strategies, and the coordinate execution engine.
If you find the project interesting or want to use it in your workflows, please consider giving us a star! 🌟
- GitHub Repository: github.com/hamza-mughal1/AIBA
- Documentation: docs.aibacli.tech
- Live Site: aibacli.tech






Top comments (0)