-
Notifications
You must be signed in to change notification settings - Fork 117
Description
Feature Request
Add an optional filter_criteria parameter to CugaAgent that filters tools based on their metadata attributes.
Motivation / Problem
When working with large tool sets or multiple tool providers, there's currently no way to filter which tools are available to the agent based on metadata attributes. This becomes critical in scenarios like:
- Multi-domain benchmarks: Scope tools to specific domains (e.g., "hockey", "olympics") to prevent cross-contamination
- Environment isolation: Separate tools by environment (dev, staging, production)
- Regional compliance: Filter tools by geographic region
- Category-based access control: Limit tools by category or functional area
Use Case
In the M3 benchmark evaluation, we have tools from multiple domains (hockey, olympics, address) loaded simultaneously. Without filtering, the agent might use hockey tools when answering olympics questions. With this feature:
# Create agent scoped to hockey domain
evaluator.agent = CugaAgent(
tool_provider=tool_provider,
filter_criteria={"domain": "hockey"}
)
This ensures the agent only sees hockey-related tools, preventing cross-domain contamination.
Proposed Solution
The feature requires changes to three areas:
- CugaAgent: Add
filter_criteriaparameter to__init__() - Graph Creation: Update
create_cuga_lite_graph()to accept and passfilter_criteria - Tool Discovery: Update
create_find_tools_tool()to filter based on criteria
Alternatives Considered
No response
Priority
High - Important for my workflow
Implementation Complexity (if known)
Simple - Small change or addition
Additional Context
No response
Checklist
- I have searched existing issues and feature requests to ensure this is not a duplicate
- I have provided a clear use case and motivation for this feature
- I am willing to help test this feature once implemented
- I am interested in contributing to the implementation of this feature