# Memory

> Memory - A memory space groups related sessions and memories together, providing an isolation
> boundary for conversational, semantic, and episodic memories in agentic applications.

This Markdown file sits beside the HTML page at the same path (with a `.md` suffix). It summarizes the topic and lists links for tools and LLM context.

Companion generated at `2026-04-24T16:03:56.524050+00:00` (UTC).

## Primary page

- [Memory](https://docs.datarobot.com/en/docs/api/reference/sdk/memory.html): Full documentation for this topic (HTML).

## Sections on this page

- [classdatarobot.models.memory.MemorySpace](https://docs.datarobot.com/en/docs/api/reference/sdk/memory.html#datarobot.models.memory.MemorySpace): In-page section heading.
- [classmethodcreate(description=None, llm_model_name=None)](https://docs.datarobot.com/en/docs/api/reference/sdk/memory.html#datarobot.models.memory.MemorySpace.create): In-page section heading.
- [classmethodlist(offset=None, limit=None)](https://docs.datarobot.com/en/docs/api/reference/sdk/memory.html#datarobot.models.memory.MemorySpace.list): In-page section heading.
- [classmethodget(memory_space_id)](https://docs.datarobot.com/en/docs/api/reference/sdk/memory.html#datarobot.models.memory.MemorySpace.get): In-page section heading.
- [update(description=, llm_model_name=)](https://docs.datarobot.com/en/docs/api/reference/sdk/memory.html#datarobot.models.memory.MemorySpace.update): In-page section heading.
- [delete()](https://docs.datarobot.com/en/docs/api/reference/sdk/memory.html#datarobot.models.memory.MemorySpace.delete): In-page section heading.
- [classdatarobot.models.memory.Session](https://docs.datarobot.com/en/docs/api/reference/sdk/memory.html#datarobot.models.memory.Session): In-page section heading.
- [classmethodcreate(memory_space_id, participants, lifecycle_strategies=None, description=None, metadata=None)](https://docs.datarobot.com/en/docs/api/reference/sdk/memory.html#datarobot.models.memory.Session.create): In-page section heading.
- [classmethodlist(memory_space_id, offset=None, limit=None, participants=None, description=None)](https://docs.datarobot.com/en/docs/api/reference/sdk/memory.html#datarobot.models.memory.Session.list): In-page section heading.
- [classmethodget(memory_space_id, session_id)](https://docs.datarobot.com/en/docs/api/reference/sdk/memory.html#datarobot.models.memory.Session.get): In-page section heading.
- [update(description=, metadata=)](https://docs.datarobot.com/en/docs/api/reference/sdk/memory.html#datarobot.models.memory.Session.update): In-page section heading.
- [delete()](https://docs.datarobot.com/en/docs/api/reference/sdk/memory.html#datarobot.models.memory.Session.delete): In-page section heading.
- [post_event(body, emitter, event_type=None)](https://docs.datarobot.com/en/docs/api/reference/sdk/memory.html#datarobot.models.memory.Session.post_event): In-page section heading.
- [events(offset=None, limit=None, last_n=None, event_type=None)](https://docs.datarobot.com/en/docs/api/reference/sdk/memory.html#datarobot.models.memory.Session.events): In-page section heading.
- [update_event(sequence_id, body=, event_type=, emitter=, created_at=None)](https://docs.datarobot.com/en/docs/api/reference/sdk/memory.html#datarobot.models.memory.Session.update_event): In-page section heading.
- [classdatarobot.models.memory.Event](https://docs.datarobot.com/en/docs/api/reference/sdk/memory.html#datarobot.models.memory.Event): In-page section heading.

## Related documentation

- [Developer documentation](https://docs.datarobot.com/en/docs/api/index.html): Linked from this page.
- [API reference](https://docs.datarobot.com/en/docs/api/reference/index.html): Linked from this page.

## Documentation content

# Memory

### class datarobot.models.memory.MemorySpace

A container for chat sessions and their events.

A memory space groups related sessions and memories together, providing an isolation
boundary for conversational, semantic, and episodic memories in agentic applications.

Added in version v3.15.

- Variables:

#### classmethod create(description=None, llm_model_name=None)

Create a new memory space.

Added in version v3.15.

- Parameters:
- Returns: The newly created memory space.
- Return type: MemorySpace

#### classmethod list(offset=None, limit=None)

List memory spaces accessible to the current user.

Added in version v3.15.

- Parameters:
- Returns: The available memory spaces.
- Return type: list of MemorySpace

#### classmethod get(memory_space_id)

Get a memory space by its ID.

Added in version v3.15.

- Parameters: memory_space_id ( str ) – The ID of the memory space to retrieve.
- Returns: The requested memory space.
- Return type: MemorySpace

#### update(description=, llm_model_name=)

Update the memory space.

If called without arguments, there is no effect. Pass `None` to clear a field.

Added in version v3.15.

- Parameters:
- Return type: None

#### delete()

Delete the memory space.

Added in version v3.15.

- Return type: None

### class datarobot.models.memory.Session

A chat session within a [MemorySpace](https://docs.datarobot.com/en/docs/api/reference/sdk/memory.html#datarobot.models.memory.MemorySpace).

Sessions track conversations between participants and store the sequence of [Event](https://docs.datarobot.com/en/docs/api/reference/sdk/memory.html#datarobot.models.memory.Event) objects that reflect either a single message or a state.

Added in version v3.15.

- Variables:

#### classmethod create(memory_space_id, participants, lifecycle_strategies=None, description=None, metadata=None)

Create a new session in a memory space.

Every session must have at least one lifecycle strategy. If `lifecycle_strategies` is not provided or is an empty list, the server attaches a default strategy.

Added in version v3.15.

- Parameters:
- Returns: The newly created session.
- Return type: Session

#### classmethod list(memory_space_id, offset=None, limit=None, participants=None, description=None)

List sessions within a single memory space.

Added in version v3.15.

- Parameters:
- Returns: The matching sessions.
- Return type: list of Session

#### classmethod get(memory_space_id, session_id)

Get a session by its ID.

Added in version v3.15.

- Parameters:
- Returns: The requested session.
- Return type: Session

#### update(description=, metadata=)

Update the session.

If called without arguments, there is no effect. Pass `None` to clear a field.

Added in version v3.15.

- Parameters:
- Return type: None

#### delete()

Delete the session.

Added in version v3.15.

- Return type: None

#### post_event(body, emitter, event_type=None)

Create an event in this session.

Added in version v3.15.

- Parameters:
- Returns: The newly created event.
- Return type: Event

#### events(offset=None, limit=None, last_n=None, event_type=None)

List events in this session.

Provide either `offset` or `last_n`, but not both.

Added in version v3.15.

- Parameters:
- Returns: The matching events.
- Return type: list of Event

#### update_event(sequence_id, body=, event_type=, emitter=, created_at=None)

Update an event by its sequence ID.

When `created_at` is provided, the server uses it for optimistic concurrency
control. Specifically, if the event has been modified since that timestamp, the server rejects
the update. The caller must handle this error and reload the event before retrying.

Added in version v3.15.

- Parameters:
- Returns: The updated event, or None if called with no changes.
- Return type: Event or None

### class datarobot.models.memory.Event

A single action or chat message within a [Session](https://docs.datarobot.com/en/docs/api/reference/sdk/memory.html#datarobot.models.memory.Session).

Events are always scoped to a session. Use [Session.post_event()](https://docs.datarobot.com/en/docs/api/reference/sdk/memory.html#datarobot.models.memory.Session.post_event), [Session.events()](https://docs.datarobot.com/en/docs/api/reference/sdk/memory.html#datarobot.models.memory.Session.events), and [Session.update_event()](https://docs.datarobot.com/en/docs/api/reference/sdk/memory.html#datarobot.models.memory.Session.update_event) to manage them.

Added in version v3.15.

- Variables:
