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 — BaseContextCompactor | ADK for TypeScript: API Reference - v2.5.0

  • BaseContextCompactor

Interface BaseContextCompactor

Interface for compacting the context history in an agent session.

interface BaseContextCompactor {
    trigger?: ContextCompactionTrigger;
    compact(invocationContext: InvocationContext): void | Promise<void>;
    shouldCompact(
        invocationContext: InvocationContext,
    ): boolean | Promise<boolean>;
}

Implemented by

  • AgentControlledContextCompactor
  • AnchoredContextCompactor
  • TokenBasedContextCompactor
  • TrajectoryThoughtPruningCompactor
  • TruncatingContextCompactor
  • Defined in core/src/context/base_context_compactor.ts:13

Properties

Optional Readonlytrigger

trigger?: ContextCompactionTrigger

The trigger associated with this compactor.

  • Defined in core/src/context/base_context_compactor.ts:15

Methods

compact

  • compact(invocationContext: InvocationContext): void | Promise<void>

    Compacts the context in place.

    Parameters

    • invocationContext: InvocationContext

      The current invocation context.

    Returns void | Promise<void>

    • Defined in core/src/context/base_context_compactor.ts:32

shouldCompact

  • shouldCompact(invocationContext: InvocationContext): boolean | Promise<boolean>

    Determines whether the context should be compacted.

    Parameters

    • invocationContext: InvocationContext

      The current invocation context.

    Returns boolean | Promise<boolean>

    A boolean or a promise resolving to a boolean indicating if compaction should occur.

    • Defined in core/src/context/base_context_compactor.ts:23
Properties
trigger
Methods
compactshouldCompact
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.