Skip to content

vanishagupta05/web_browsing_agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

new_agent.py

An advanced, modular, and highly robust agent implementation designed for reliable web task automation and precise user interaction. Recommended for extensive automated web interaction scenarios and debugging-intensive tasks.

Features:

  • Hierarchical Planning and ReAct Framework Implemented an advanced hierarchical planning structure combined with a self-reflection loop (ReAct):
    • High-Level Planner:Breaks main goals into concise sub-goals.
    • Low-Level Planner:Further decomposes sub-goals into specific, actionable micro-tasks. Activated only when initiating new sub-goals.
    • Executor Agent:Processes micro-tasks to identify and execute the correct actions. Uses the Thought + Action framework
  • Verification and Self-Reflection:
    • Enhanced 4 level verification using DOM and screenshots to confirm task or action completion.
      • Action Error: When there is an error during action execution
      • Micro Task Verification: Verifies if the current micro task was successfully completed
      • Sub Goal Verification: Verifies if the current sub goal was successfully completed
      • Goal Verification: Verifies if the overall goal was successfully completed
    • If tasks fail, detailed reasoning about the failure is recorded in memory, enabling dynamic learning and adaptive behavior
    • Additionally if a plan fails, agent attempts to replan based on current state.
    • Enhanced detection of completed tasks (e.g., for Networkin-3).
    • Addressed issues where tasks like Dashdish-5 completed successfully but appeared as failures because explicit completion messages were missing.
    • Intelligent Error Diagnosis: Developed a verifier system to reason about errors if goals are not met, explicitly diagnosing issues (e.g., incorrect numeric input in Opendining-8).
  • Dynamic Replanning Mechanism: Integrated explicit sentinel replan() action to dynamically reset and update plans in response to state changes, preventing outdated irrelevant tasks from persisting after state drift.
  • Memory Integration: Agent maintains and utilizes a running scratchpad of all past thoughts, actions and reflections.
  • Structured Output Utilized structured JSON outputs for precise communication between planning, execution, and verification phases.

How to run:

# Install dependencies
pip install agisdk
playwright install --force
export OPENAI_API_KEY="your-api-key"

# Run with default configuration
python new_agent.py

# Run with custom parameters
python new_agent.py --model gpt-4o --task webclones.omnizon-1 --headless False --leaderboard True --run_id your-run-id

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages