Simple in-memory implementation of AgentMemory. Suitable for development and testing. For production, use a persistent implementation.

Implements

  • AgentMemory

Constructors

Methods

Constructors

Methods

  • Stores a value in agent memory

    Parameters

    • key: string

      The key to store the value under

    • value: unknown

      The value to store

    • type: "short" | "long"

      Type of memory: 'short' (session) or 'long' (persistent)

    Returns Promise<void>

  • Retrieves a value from agent memory

    Parameters

    • key: string

      The key to retrieve

    Returns Promise<unknown>

    The stored value, or null if not found

  • Searches memory semantically (requires vector store implementation)

    Parameters

    • query: string

      The search query

    • limit: number

      Maximum number of results

    Returns Promise<unknown[]>

    Array of relevant stored values

  • Clears memory of specified type

    Parameters

    • type: "short" | "long" | "all"

      Type of memory to clear: 'short', 'long', or 'all'

    Returns Promise<void>