Skip to content

Instrument @google/adk #3817

@amychisholm03

Description

@amychisholm03

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

  • How will we subscribe to a function (BaseTool.prototype.runAsync) that is being overriden?
  • Every class is a TypeScript export; how will orchestrion handle that?

Metadata

Metadata

Assignees

Type

No type

Projects

Status

In progress: Issues being worked on

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions