# `ClaudeAgentSDK.SessionStore.InMemory`
[🔗](https://github.com/nshkrdotcom/claude_agent_sdk/blob/v0.18.0/lib/claude_agent_sdk/session_store/in_memory.ex#L1)

In-memory SessionStore reference adapter.

This adapter is intended for tests, local development, and examples. It keeps
opaque transcript entries in append order and maintains summary sidecars via
`ClaudeAgentSDK.SessionStore.Summary.fold_session_summary/3`.

# `t`

```elixir
@type t() :: %ClaudeAgentSDK.SessionStore.InMemory{server: pid()}
```

# `append`

```elixir
@spec append(t(), ClaudeAgentSDK.SessionStore.Key.input(), [map()]) :: :ok
```

# `delete`

```elixir
@spec delete(t(), ClaudeAgentSDK.SessionStore.Key.input()) :: :ok
```

# `list_session_summaries`

```elixir
@spec list_session_summaries(t(), String.t()) :: [map()]
```

# `list_sessions`

```elixir
@spec list_sessions(t(), String.t()) :: [%{session_id: String.t(), mtime: integer()}]
```

# `list_subkeys`

```elixir
@spec list_subkeys(t(), ClaudeAgentSDK.SessionStore.Key.input()) :: [String.t()]
```

# `load`

```elixir
@spec load(t(), ClaudeAgentSDK.SessionStore.Key.input()) :: [map()] | nil
```

# `new`

```elixir
@spec new() :: {:ok, t()} | {:error, term()}
```

Starts a new in-memory store and returns the adapter struct.

# `new!`

```elixir
@spec new!() :: t()
```

Starts a new in-memory store and raises on failure.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
