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

    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

    Properties

    The trigger associated with this compactor.

    Methods