How armankhan8/ai_browser_agent_end_to_end works
AI Browser Agent accepts a natural-language task in its Gradio UI, runs an OpenAI Agents SDK agent, and executes one browser tool at a time against a persistent Playwright-controlled Chromium session. Each action returns a fresh, compact page state for the agent to choose its next step, ending in a brief result or blocker. The graph covers the documented workflow and browser capabilities; browser.py was only partially excerpted, so its individual session internals are represented together.
Main entry points: browser.py Browser session · agent.py Agent runner · app.py Session lifecycle · config.py Settings
Components 12
Task interaction
- Gradio UI
app.py - Session lifecycle
app.py
Agent orchestration
- Agent runner
agent.py - Browser tools
browser_tools.py - OpenAI Agents SDK
Browser runtime
- Browser session
browser.py - Page inspector
browser.py - Playwright
- Chromium
Runtime settings
- Settings
config.py
Other components
- User
- Target website
Connections 16
- User → Gradio UI: submits task
app.py - Gradio UI → Session lifecycle: runs task
app.py - Session lifecycle → Settings: loads settings
app.py - Session lifecycle → Browser session: starts session
app.py - Session lifecycle → Agent runner: starts agent
app.py - Agent runner → OpenAI Agents SDK: runs agent
agent.py - Agent runner → Browser tools: registers tools
agent.py - Agent runner → Browser session: reads initial state
agent.py - Browser tools → Browser session: invokes actions
browser_tools.py - Browser session → Playwright: controls browser
browser.py - Playwright → Chromium: drives
README.md - Chromium → Target website: browses
README.md - Browser session → Page inspector: extracts page state
browser.py - Page inspector → Browser tools: returns updated state
browser_tools.py - Settings → Browser session: configures session
browser.py - Settings → Agent runner: sets agent limits
agent.py