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

# MemoryStoreOptions

> Interface exported by @botmesh/core.

Defined in: [store/MemoryStore.ts:39](https://github.com/andresayac/botmesh/blob/main/packages/core/src/store/MemoryStore.ts#L39)

Options of [MemoryStore](https://botmesh.afaya.com.co/api/core/classes/MemoryStore.md).

## Properties

### maxMessagesPerChat?

```ts theme={null}
maxMessagesPerChat?: number;
```

Defined in: [store/MemoryStore.ts:48](https://github.com/andresayac/botmesh/blob/main/packages/core/src/store/MemoryStore.ts#L48)

Max messages retained per chat; older ones are dropped on save. Default
**1000** — unlike the persistent stores, where the cap is opt-in, because
this log lives in the process's RAM and is never persisted: an unbounded
default would grow memory forever on a long-running bot. Pass `Infinity`
to disable it. Must be a non-negative integer or `Infinity`, else the
constructor throws a `RangeError`.

***

### file?

```ts theme={null}
file?: string;
```

Defined in: [store/MemoryStore.ts:50](https://github.com/andresayac/botmesh/blob/main/packages/core/src/store/MemoryStore.ts#L50)

Optional JSON file for persistence across restarts.

***

### autoSaveInterval?

```ts theme={null}
autoSaveInterval?: string | number;
```

Defined in: [store/MemoryStore.ts:52](https://github.com/andresayac/botmesh/blob/main/packages/core/src/store/MemoryStore.ts#L52)

Auto-save interval: a duration (`'1m'`) or ms. Set 0 to disable. Default 60\_000.

***

### logger?

```ts theme={null}
logger?: MemoryStoreLogger;
```

Defined in: [store/MemoryStore.ts:54](https://github.com/andresayac/botmesh/blob/main/packages/core/src/store/MemoryStore.ts#L54)

Optional logger for load/persist failures. Falls back to silence when omitted.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.