> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agno.com/llms.txt
> Use this file to discover all available pages before exploring further.

# In-Memory Storage

> Use in-memory storage for testing and development.

`InMemoryDb` stores sessions, memories, metrics, evaluation runs, knowledge, and cultural knowledge in the current Python process.

<Warning>
  Data is lost when the process exits. Use `InMemoryDb` for demos and tests. Use a persistent database for production and for features that `InMemoryDb` does not implement, including tracing, spans, and learning storage.
</Warning>

## Usage

Install the `openai` package:

```shell theme={null}
uv pip install openai
```

```python theme={null}
from agno.agent import Agent
from agno.db.in_memory import InMemoryDb

db = InMemoryDb()

agent = Agent(db=db)
```
