GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • ADK for TypeScript: API Reference

This view

  • Original page
  • New address

GeezerVison is showing adk.dev — ExitLoopTool | ADK for TypeScript: API Reference - v2.5.0

  • ExitLoopTool

Class ExitLoopTool

Tool for exiting execution of a LoopAgent.

When called by an LLM agent inside a LoopAgent, this tool sets the escalate and skipSummarization flags on the event actions, causing the LoopAgent to stop iterating and exit the loop.

Hierarchy (View Summary)

  • BaseTool
    • ExitLoopTool
  • Defined in core/src/tools/exit_loop_tool.ts:20

Constructors

constructor

  • new ExitLoopTool(): ExitLoopTool

    Creates an ExitLoopTool with its fixed name and description.

    Returns ExitLoopTool

    Overrides BaseTool.constructor

    • Defined in core/src/tools/exit_loop_tool.ts:22

Properties

Readonly[BASE_TOOL_SIGNATURE_SYMBOL]

"[BASE_TOOL_SIGNATURE_SYMBOL]": true

A unique symbol to identify ADK base tool class.

Inherited from BaseTool.[BASE_TOOL_SIGNATURE_SYMBOL]

  • Defined in core/src/tools/base_tool.ts:83

Readonlydescription

description: string

Inherited from BaseTool.description

  • Defined in core/src/tools/base_tool.ts:86

ReadonlyisLongRunning

isLongRunning: boolean

Inherited from BaseTool.isLongRunning

  • Defined in core/src/tools/base_tool.ts:87

Readonlyname

name: string

Inherited from BaseTool.name

  • Defined in core/src/tools/base_tool.ts:85

Accessors

apiVariant

  • get apiVariant(): GoogleLLMVariant

    The Google API LLM variant to use.

    Returns GoogleLLMVariant

    Inherited from BaseTool.apiVariant

    • Defined in core/src/tools/base_tool.ts:198

Methods

_getDeclaration

  • _getDeclaration(): FunctionDeclaration

    Returns the function declaration for this tool.

    Returns FunctionDeclaration

    Overrides BaseTool._getDeclaration

    • Defined in core/src/tools/exit_loop_tool.ts:31

checkRequireConfirmation

  • checkRequireConfirmation(
        _args: Record<string, unknown>,
        _toolContext?: Context,
    ): Promise<boolean>

    Whether this tool needs a human to approve args before it runs.

    The gate itself lives in the tool that owns it (see FunctionTool), but the resume path has to ask the same question a turn later, to check that an approval it is about to honour belongs to a tool that gates at all. A tool that never gates returns false here, which is the safe default: an approval naming it is meaningless and gets rejected rather than executed. Mirrors Python's BaseTool.check_require_confirmation.

    Parameters

    • _args: Record<string, unknown>

      The arguments the tool would run with.

    • Optional_toolContext: Context

      The context of the call, when there is one.

    Returns Promise<boolean>

    Whether the call requires confirmation.

    Inherited from BaseTool.checkRequireConfirmation

    • Defined in core/src/tools/base_tool.ts:144

processLlmRequest

  • processLlmRequest(request: ToolProcessLlmRequest): Promise<void>

    Processes the outgoing LLM request for this tool.

    Use cases:

    • Most common use case is adding this tool to the LLM request.
    • Some tools may just preprocess the LLM request before it's sent out.

    Parameters

    • request: ToolProcessLlmRequest

      The request to process the LLM request.

    Returns Promise<void>

    Inherited from BaseTool.processLlmRequest

    • Defined in core/src/tools/base_tool.ts:160

runAsync

  • runAsync(request: RunAsyncToolRequest): Promise<unknown>

    Sets escalate and skipSummarization on the event actions, signalling the LoopAgent to stop iterating.

    Parameters

    • request: RunAsyncToolRequest

      The tool request containing the current tool context.

    Returns Promise<unknown>

    An empty string response.

    Overrides BaseTool.runAsync

    • Defined in core/src/tools/exit_loop_tool.ts:45
Constructors
constructor
Properties
[BASE_TOOL_SIGNATURE_SYMBOL]descriptionisLongRunningname
Accessors
apiVariant
Methods
_getDeclarationcheckRequireConfirmationprocessLlmRequestrunAsync
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.