ADK for TypeScript: API Reference
    Preparing search index...

    Class CallbackContext

    The context of various callbacks within an agent run.

    Hierarchy (View Summary)

    Constructors

    Properties

    eventActions: EventActions
    invocationContext: InvocationContext

    Accessors

    • get userContent(): Content | undefined

      The user content that started this invocation.

      Returns Content | undefined

    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 not provided, the latest version will be used.

      Returns Promise<Part | undefined>

      A promise that resolves to the loaded artifact.

    • Saves an artifact attached to the current session.

      Parameters

      • filename: string

        The filename of the artifact.

      • artifact: Part

        The artifact to save.

      Returns Promise<number>

      A promise that resolves to the version of the saved artifact.