Documentation - v1.2.0-alpha.3
    Preparing search index...

    Interface for memory operations that provides a way to store and retrieve values by path. Allows components to persist state data during a conversation.

    interface AppMemory {
        deleteValue(path: string): void;
        getValue<TValue = unknown>(path: string): TValue;
        hasValue(path: string): boolean;
        setValue(path: string, value: unknown): void;
    }

    Implemented by

    Index

    Methods

    • Gets a value from the specified path.

      Type Parameters

      • TValue = unknown

        The expected type of the value

      Parameters

      • path: string

        The path to get the value from

      Returns TValue

      The value at the specified path cast to type TValue

    • Checks if a value exists at the specified path.

      Parameters

      • path: string

        The path to check

      Returns boolean

      True if a value exists at the path, false otherwise

    • Sets a value at the specified path.

      Parameters

      • path: string

        The path where the value should be stored

      • value: unknown

        The value to store

      Returns void