> ## 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.

# SurrealDb

> Store AgentOS sessions, memory, knowledge, evals, and traces in SurrealDB.

`SurrealDb` implements the `Db` interface with SurrealDB tables for Agent, Team, and Workflow sessions, memories, knowledge, metrics, evals, cultural knowledge, traces, and spans.

<Snippet file="db-surrealdb-params.mdx" />

## Methods

### `upsert_sessions`

Bulk upsert multiple sessions for improved performance on large datasets.

**Parameters:**

* `sessions` (List\[Session]): List of sessions to upsert
* `deserialize` (Optional\[bool]): Whether to deserialize the sessions. Defaults to `True`

**Returns:** `List[Union[Session, Dict[str, Any]]]`

### `upsert_memories`

Bulk upsert multiple memories for improved performance on large datasets.

**Parameters:**

* `memories` (List\[UserMemory]): List of memories to upsert
* `deserialize` (Optional\[bool]): Whether to deserialize the memories. Defaults to `True`

**Returns:** `List[Union[UserMemory, Dict[str, Any]]]`
