How lockerdocx/firefox-ai-agent works
This is a local Firefox AI agent: a user submits a goal in the sidebar, the extension relays it to the Python host, and the host routes it to browser interaction or a broader tool loop. Browser missions observe a live tab, ask a model for a constrained action, execute it, and repeat; broader missions use tools such as web search, file/document operations, and terminal commands. The README documents permissions, model configuration, optional Laya routing, and isolated Neko browsing. Some of those subsystem links are based on README descriptions rather than sampled implementation excerpts.
Main entry points: background.js Extension bridge · firefox.py Firefox host · orchestrator.py Mission routing · agent.py Browser agent loop
Components 22
Firefox interface
- Agent sidebar
extension/sidebar/sidebar.js - Extension bridge
extension/background.js - Page snapshot
extension/snapshot.js - Tab actions
extension/content.js
Host runtime
- Firefox host
jev_ultrafast/firefox.py - Mission routing
jev_ultrafast/orchestrator.py - Browser agent loop
jev_ultrafast/agent.py - Browser driver
jev_ultrafast/browser.py
Decision and models
- Local router
jev_ultrafast/laya_local.py - Skill selection
jev_ultrafast/skills.py - Action policy
jev_ultrafast/model.py - Model providers
jev_ultrafast/providers.py - Model settings
jev_ultrafast/parameters.py
Tools and safeguards
- Tool registry
jev_ultrafast/tools.py - Permission checks
jev_ultrafast/permissions.py - Audit records
jev_ultrafast/permissions.py
Browser integrations
- Neko browser
jev_ultrafast/neko.py
Other components
- User
- Firefox tab
- Web pages
- Model APIs
- Laya engine
Connections 25
- User → Agent sidebar: submits goal
- Agent sidebar → Extension bridge: sends request
- Extension bridge → Firefox host: relays messages
- Firefox host → Mission routing: routes mission
- Firefox host → Browser agent loop: starts browser run
- Mission routing → Local router: tries local route
- Local router → Laya engine: classifies mission
- Mission routing → Skill selection: selects skill
- Mission routing → Tool registry: runs tool loop
- Tool registry → Permission checks: checks access
- Permission checks → Audit records: records decisions
- Tool registry → Model providers: requests reasoning
- Browser agent loop → Browser driver: observes and acts
- Browser agent loop → Action policy: requests action
- Action policy → Model providers: resolves model
- Model providers → Model APIs: sends inference
- Extension bridge → Page snapshot: requests snapshot
- Extension bridge → Tab actions: dispatches action
- Page snapshot → Firefox tab: reads page
- Tab actions → Firefox tab: executes action
- Browser driver → Extension bridge: uses bridge
- Browser driver → Neko browser: can drive instead
- Agent sidebar → Extension bridge: updates model settings
- Firefox host → Model settings: loads settings
- Browser agent loop → Web pages: interacts through tab