Skip to main content

In-Memory Storage

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

When you don’t provide a storage option, Agentium defaults to InMemoryStorage:

With Memory


Limitations


API Reference