The context of the tool.

This class provides the context for a tool invocation, including access to the invocation context, function call ID, event actions, and authentication response. It also provides methods for requesting credentials, retrieving authentication responses, listing artifacts, and searching memory.

Hierarchy (view full)

Constructors

Properties

_eventActions: EventActions

TODO: make this public for Agent Development Kit, but private for users.

_invocationContext: InvocationContext
functionCallId?: string

The function call id of the current tool call. This id was returned in the function call event from LLM to identify a function call. If LLM didn't return this id, ADK will assign one to it. This id is used to map function call response to the original function call.

Accessors

Methods

  • Loads an artifact attached to the current session.

    Parameters

    • filename: string

      The filename of the artifact.

    • Optionalversion: number

      The version of the artifact. If undefined, the latest version will be returned.

    Returns Promise<Part>

    The artifact.