Overview
Nested architecture decouples reasoning from page content extraction.
Core Technique
Nested Loop Structure:
# Outer loop: reasoning
reasoning = outer_agent.think(state)
tool_call = outer_agent.select_tool()
# Inner loop: extract relevant content
relevant_content = inner_agent.extract(page, goal)
# Return minimal content to reasoning
When to Use
Use when: Information-seeking agents, large-scale web interaction, efficiency critical.
References
- Nested outer/inner loop architecture
- Minimal browser toolkit
- Content filtering before context injection