Problem Statement
There is no way to distinguish between a regular tool and an agent wrapped as a tool (e.g., via agent.as_tool()). This prevents differentiated handling, logging, and security policies for agent-based tools.
Proposed Solution
Provide a detection mechanism:
- A property on tool objects indicating if they wrap an agent
- A type or interface for agent-tools vs regular tools
- Metadata accessible in hooks to identify tool type
Use Case
In multi-agent orchestration:
- Apply different timeout policies for agent-tools vs regular tools
- Log agent-tool invocations with additional context
- Apply security policies specific to agent delegation
- Track agent-to-agent calls separately from tool calls for observability
Alternatives Solutions
We currently use naming conventions or wrapper detection heuristics, which are fragile.
Additional Context
No response
Problem Statement
There is no way to distinguish between a regular tool and an agent wrapped as a tool (e.g., via agent.as_tool()). This prevents differentiated handling, logging, and security policies for agent-based tools.
Proposed Solution
Provide a detection mechanism:
Use Case
In multi-agent orchestration:
Alternatives Solutions
We currently use naming conventions or wrapper detection heuristics, which are fragile.
Additional Context
No response