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

    Defines the interface for storage operations in the Agents platform.

    Storage providers persist state data across conversation turns, enabling agents to maintain context over time. Different implementations may store data in memory, databases, blob storage, or other persistence mechanisms.

    The interface is designed to be simple with just three core operations: read, write, and delete. All operations are asynchronous to support both in-memory and remote storage providers.

    interface Storage {
        delete: (keys: string[]) => Promise<void>;
        read: (keys: string[]) => Promise<StoreItem>;
        write: (changes: StoreItem) => Promise<void>;
    }

    Implemented by

    Index

    Properties

    Properties

    delete: (keys: string[]) => Promise<void>

    Deletes store items from storage.

    Type Declaration

      • (keys: string[]): Promise<void>
      • Parameters

        • keys: string[]

          The keys of the items to delete

        Returns Promise<void>

        A promise that resolves when the delete operation is complete

    read: (keys: string[]) => Promise<StoreItem>

    Reads store items from storage.

    Type Declaration

      • (keys: string[]): Promise<StoreItem>
      • Parameters

        • keys: string[]

          The keys of the items to read

        Returns Promise<StoreItem>

        A promise that resolves to the store items. Items that don't exist in storage will not be included in the result.

    If the keys array is empty or undefined

    write: (changes: StoreItem) => Promise<void>

    Writes store items to storage.

    Type Declaration

      • (changes: StoreItem): Promise<void>
      • Parameters

        • changes: StoreItem

          The items to write to storage, indexed by key

        Returns Promise<void>

        A promise that resolves when the write operation is complete

    If the changes object is empty or undefined, or if an eTag conflict occurs and optimistic concurrency is enabled