Skip to main content
InMemoryStorage is the simplest storage driver. It keeps all data in a JavaScript Map—no external dependencies, no disk I/O. Data is lost when the process restarts. Use it for development, testing, or ephemeral workloads.

When to Use

Development

Fast iteration. No database setup required.

Testing

Isolated tests. No shared state between runs.

Demos

Quick prototypes. No infrastructure needed.

Not for Production

Data is lost on restart. Use Sqlite, Postgres, or MongoDB for persistence.

Installation

No additional packages required. InMemoryStorage is included in @agentium/core.

Usage


With Agent

Sessions need memory.storage. Bare Agent still keeps a tiny in-memory session for the current process, but it is gone on restart and is not a storage: field.

Limitations


API Reference