Skip to content

Conversation

imenelydiaker
Copy link
Collaborator

@imenelydiaker imenelydiaker commented Oct 6, 2025

This PR adds 3 agents for the paper FocusAgent: Simple Yet Effective Ways of Trimming the Large Context of Web Agents:

  • EmbeddingRetrieverAgent: Retrieves relevant parts of the AxTree using an embedding model.
  • BM25RetrieverAgent: Retrieves relevant parts of the AxTree using a BM25.
  • FocusAgent: Uses an LLM to retrieve relevant parts of AxTree.

All 3 agents use then GenericAgent as the executor.

Description by Korbit AI

What change is being made?

Add BM25RetrieverAgent, EmbeddingRetrieverAgent, and FocusAgent (including their retrievers, configs, utilities, and tests), along with dependency updates to support BM25 and LangChain features.

Why are these changes being made?

Introduce retrieval-augmented agents to improve content filtering and context selection using BM25, embedding-based similarity, and line-based focus strategies; provide configurable presets and tests to ensure correct behavior across agents.

Is this description stale? Ask me to generate a new description by commenting /korbit-generate-pr-description

Copy link

korbit-ai bot commented Oct 6, 2025

Korbit doesn't automatically review large (3000+ lines changed) pull requests such as this one. If you want me to review anyway, use /korbit-review.

@imenelydiaker imenelydiaker requested a review from recursix October 6, 2025 01:17
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to have the the bm25_agent and embedding_agent in the focus_agent subdirectory, as they are related baselines. @recursix Do you have any thoughts about this?

def make_model(self):
return MockEmbeddingRetriever(self)


Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make the focus-agent tests optional if the dependencies are not not installed.

from agentlab.experiments.loop import EnvArgs, ExpArgs
from agentlab.llm.chat_api import CheatMiniWoBLLMArgs


Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make the focus agent tests optional if dependencies are not installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants