actrone-memory
    Preparing search index...

    Class InMemoryStore

    Default in-process store implementing both tiers. Data lives for the lifetime of the process; it is the on-ramp for local development, testing, and small single-instance agents. Swap in Redis/Qdrant adapters for durability + scale.

    Implements

    Index
    • Parameters

      • agentId: string
      • sessionId: string
      • turn: Turn

      Returns Promise<void>

    • Recent turns, oldest → newest, capped at n (defaults to all retained).

      Parameters

      • agentId: string
      • sessionId: string
      • Optionaln: number

      Returns Promise<Turn[]>

    • Parameters

      • agentId: string
      • sessionId: string

      Returns Promise<number>

    • Parameters

      • agentId: string
      • sessionId: string

      Returns Promise<void>

    • SET-NX-EX equivalent: true for the first caller inside a TTL window.

      Process-local, like the Python in-memory store, because an in-process backend is single-instance by definition. Use the Redis or Postgres adapter for a fleet-wide lock.

      Parameters

      • agentId: string
      • sessionId: string
      • ttlSeconds: number

      Returns Promise<boolean>

    • Parameters

      • memoryId: string

      Returns Promise<void>

    • Delete every memory for an agent (local right-to-erasure).

      Parameters

      • agentId: string

      Returns Promise<void>