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

# Device Memory

> Own your memory graph on-device while using Nebula as a stateless compute engine

## What is Device Memory?

In the standard Nebula model, your memory graph lives on Nebula's servers. Device Memory inverts this: **your application owns the canonical graph state**, and Nebula operates as a stateless compute engine.

Your app stores a portable snapshot locally -- on-device, in your database, wherever you choose. When new content arrives, you send it to Nebula. Nebula processes the content and returns an updated snapshot. Nothing is persisted server-side.

## When to Use Device Memory

* **Privacy** -- user data stays on-device or in your own infrastructure
* **Offline-first** -- local memory graph that syncs when connectivity is available
* **Portability** -- the snapshot is a self-contained file you can move anywhere
* **Edge deployments** -- no server-side state to manage

<Tip>If you're fine with Nebula managing your state, the standard hosted API is simpler. See the [Quick Start](/quickstart).</Tip>

## How It Works

The API is the same one you already know -- `memories.create` and `memories.search`. The only difference is you pass a `snapshot` instead of a `collection_id`.

For larger snapshots or server-side storage that remains customer-owned, pass a signed URL `snapshot_ref` instead of sending the snapshot inline. See [Device Memory API](/guides/device-memory-api#customer-owned-snapshot-objects).

**1. Bootstrap** -- Call `snapshots.export` to pull a snapshot from an existing collection. After this, your local copy is canonical.

**2. Store** -- Call `memories.create` with your snapshot and new content. Nebula processes it and returns an updated snapshot.

**3. Search** -- Call `memories.search` with your snapshot and a query. Nebula scores it and returns results. Nothing is stored server-side.

**4. Export / Import** -- Serialize the snapshot to portable bytes for backup or transfer between devices.

## Limitations

<Warning>
  Device Memory is a single-writer protocol. If multiple devices mutate the same snapshot concurrently, writes will conflict. Use one writer at a time.
</Warning>

## Next Steps

* [Device Memory Quickstart](/guides/device-memory-quickstart) -- Get up and running in 5 minutes
* [Device Memory API](/guides/device-memory-api) -- REST endpoint reference
