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

# In-Memory Storage for Workflows

> Store workflow sessions and run history in the current Python process with InMemoryDb.

`InMemoryDb` stores a Workflow's sessions and run history in the current Python process. Data is lost when the process exits.

## Usage

Install dependencies:

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

```python theme={null}
from agno.agent import Agent
from agno.db.in_memory import InMemoryDb
from agno.models.openai import OpenAIResponses
from agno.tools.hackernews import HackerNewsTools
from agno.workflow.step import Step
from agno.workflow.workflow import Workflow

db = InMemoryDb()

research_agent = Agent(
    name="Research Agent",
    model=OpenAIResponses(id="gpt-5.2"),
    tools=[HackerNewsTools()],
)

content_agent = Agent(
    name="Content Agent",
    model=OpenAIResponses(id="gpt-5.2"),
)

research_step = Step(name="Research", agent=research_agent)
content_step = Step(name="Content", agent=content_agent)

workflow = Workflow(
    name="Content Workflow",
    db=db,
    steps=[research_step, content_step],
)

workflow.print_response("Recent AI trends")
```
