AG-011Agent · Taking the pathlayaeval.ToolRedundancy
Tool Redundancy
Did the agent ask for the same thing twice?
Simulation state:
When it passes
Each call is new.
Threshold satisfied: evaluation score <= 0.30.
When it fails
Repeated an old call.
Violation detected: execution flagged for human review or fallback routing.
SDK Specification
| Parameter | Value | Description |
|---|---|---|
| Class | ToolRedundancy | Python evaluator class in layaeval |
| Required Fields | "task", "prior_tool_calls", "current_tool_call" | Arguments expected in the call signature |
| Default Threshold | <= 0.30 | Passes when risk score is at or below this value |
| Category | Agent Evaluation | Taking the path (Sensible order, no repeats, no going in circles.) |
Python Example
tool-redundancy.py
1from layaeval import ToolRedundancy23metric = ToolRedundancy(threshold=0.30) # passes when risk is at or below 0.3045res = metric(6 task="Book a hotel in Paris for 2 guests on Mar 4.",7 prior_tool_calls=["get_price(id=12)"],8 current_tool_call="book(id=12)",9)1011print(res.passed, res.value, res.confidence)
Related Agent Checks