How thudm/autowebglm works
AutoWebGLM is a language-model-driven web-navigation system evaluated through WebArena and MiniWob++. The WebArena workflow runs benchmark tasks, builds an agent prompt from browser state, generates and parses an action, applies it in the browser, and evaluates the resulting trajectory. MiniWob++ has a parallel task loop with HTML simplification and action generation. The README also describes HTML simplification, hybrid human-AI training, reinforcement learning/rejection sampling, and a bilingual benchmark; the supplied tree does not expose training pipelines, so those are not drawn as implemented runtime components. Edges reflect shown imports, calls, or README claims; unsampled environment internals are not inferred.
Main entry points: run.py WebArena runner · prompt_constructor.py Prompt construction · main.py MiniWob task runner · agent.py Action agent
Components 21
Task execution
- WebArena runner
webarena/run.py - MiniWob task runner
miniwob++/main.py - Task evaluation
webarena/evaluation_harness/evaluators.py - Evaluation helpers
webarena/evaluation_harness/helper_functions.py
Agent reasoning
- Action agent
webarena/agent/agent.py - Prompt construction
webarena/agent/prompts/prompt_constructor.py
Browser interaction
- Browser environment
webarena/browser_env/envs.py - Browser actions
webarena/browser_env/actions.py - Observation processing
webarena/browser_env/processors.py - Browser HTML simplification
webarena/browser_env/html_tools/html_parser.py
Model interface
- Model configuration
webarena/llms/lm_config.py - Tokenization
webarena/llms/tokenizers.py - OpenAI provider
webarena/llms/providers/openai_utils.py
MiniWob++
- HTML simplification
miniwob++/html_tools/html_parser.py - Element identification
miniwob++/html_tools/identifier.py - HTML prompt formatting
miniwob++/html_tools/prompt.py - MiniWob actions
miniwob++/miniwob_tools/action.py
Other components
- Benchmark operator
- Benchmark websites
- Language model
- MiniWob++ tasks
Connections 23
- Benchmark operator → WebArena runner: starts tasks
README.md - WebArena runner → Action agent: requests actions
webarena/run.py - WebArena runner → Browser environment: sets up environment
webarena/run.py - WebArena runner → Task evaluation: uses evaluation
webarena/run.py - WebArena runner → Benchmark websites: runs against
- Action agent → Prompt construction: constructs prompt
webarena/agent/agent.py - Action agent → Browser actions: parses action
webarena/agent/agent.py - Prompt construction → Model configuration: uses configuration
webarena/agent/prompts/prompt_constructor.py - Prompt construction → Tokenization: uses tokenizer
webarena/agent/prompts/prompt_constructor.py - Prompt construction → Browser HTML simplification: uses browser utilities
webarena/agent/prompts/prompt_constructor.py - Browser environment → Browser actions: exposes actions
webarena/browser_env/__init__.py - Browser environment → Observation processing: exposes processing
webarena/browser_env/__init__.py - Task evaluation → Evaluation helpers: uses helpers
webarena/evaluation_harness/evaluators.py - Model configuration → OpenAI provider: selects provider
- Language model → Action agent: generates responses
- Benchmark operator → MiniWob task runner: starts tasks
README.md - MiniWob++ tasks → MiniWob task runner: supplies tasks
- MiniWob task runner → HTML simplification: simplifies HTML
miniwob++/main.py - MiniWob task runner → MiniWob actions: uses action tools
miniwob++/main.py - HTML simplification → Element identification: uses identifiers
miniwob++/html_tools/html_parser.py - HTML simplification → HTML prompt formatting: formats subtrees
miniwob++/html_tools/html_parser.py - Task evaluation → Browser environment: reads browser state
webarena/evaluation_harness/evaluators.py - WebArena runner → Language model: requests generation