Description
For FY27Q1 (Apr - Jun 2026), one of our AIM commits is Google Agent Development Kit (ADK) instrumentation (@google/adk). ADK is similar to LangChain/LangGraph in that it allows you to easily create and manage complex AI agent ecosystems. As such, we will create tool and agent spans with coordinating LlmTool and LlmAgent events.
The relevant methods appear to be:
- For Agent events -
BaseAgent.prototype.runAsync: This is the public method on every agent — LlmAgent, SequentialAgent, LoopAgent, ParallelAgent, and custom agents all inherit it from BaseAgent. It's the method that gets called both by the Runner and by parent agents when invoking sub-agents, so wrapping it gives us coverage at every level of a multi-agent hierarchy.
- For Tool events -
BaseTool.prototype.runAsync: BaseTool is the tool class that more specific tool classes (e.g. FunctionTool, AgentTool, etc.) extend from. However, this might be problematic because the more specific tool classes e.g. AgentTool override runAsync (example) instead of just implementing it.
Acceptance Criteria
- For agent invocations, an
LlmAgent event and a Llm/agent/ADK/<agent_name> segment are created
- For tool calls, a
LlmTool event and Llm/tool/ADK/<tool_name> segment are created
Design Consideration/Limitations
Description
For FY27Q1 (Apr - Jun 2026), one of our AIM commits is Google Agent Development Kit (ADK) instrumentation (
@google/adk). ADK is similar to LangChain/LangGraph in that it allows you to easily create and manage complex AI agent ecosystems. As such, we will createtoolandagentspans with coordinatingLlmToolandLlmAgentevents.The relevant methods appear to be:
BaseAgent.prototype.runAsync: This is the public method on every agent —LlmAgent,SequentialAgent,LoopAgent,ParallelAgent, and custom agents all inherit it fromBaseAgent. It's the method that gets called both by theRunnerand by parent agents when invoking sub-agents, so wrapping it gives us coverage at every level of a multi-agent hierarchy.BaseTool.prototype.runAsync:BaseToolis the tool class that more specific tool classes (e.g.FunctionTool,AgentTool, etc.) extend from. However, this might be problematic because the more specific tool classes e.g.AgentTooloverriderunAsync(example) instead of just implementing it.Acceptance Criteria
LlmAgentevent and aLlm/agent/ADK/<agent_name>segment are createdLlmToolevent andLlm/tool/ADK/<tool_name>segment are createdDesign Consideration/Limitations
BaseTool.prototype.runAsync) that is being overriden?orchestrionhandle that?