---
title: "Embedded and edge | Use cases | SurrealDB"
description: "Run SurrealDB on edge devices, in the browser with WASM or embedded in your application: one binary, offline-first, with full ACID guarantees."
url: https://surrealdb.com/use-cases/embedded-edge
---

# Embedded and edge

[Start free with SurrealDB](https://studio.surrealdb.com/current/instances/deploy) [Embedded docs](https://surrealdb.com/docs/build/embedding)

**Embedded.** One binary inside your application, with the full engine.

**Edge and WASM.** On devices and in browsers, offline-ready.

**One API.** The same queries from edge to cloud.

1. ![Babcock](https://surrealdb.com/assets/static/babcock.lo4rnVg1.svg)
2. ![ING](https://surrealdb.com/assets/static/ing.X3I6S3_V.svg)
3. ![British Airways](https://surrealdb.com/assets/static/british-airways.KEsZiwV-.svg)
4. ![Nvidia](https://surrealdb.com/assets/static/nvidia.DaIEuMil.svg)
5. ![Apple](https://surrealdb.com/assets/static/apple.D5pq4flY.svg)
6. ![SpaceX](https://surrealdb.com/assets/static/spacex.CQJEk-IL.svg)
7. ![Samsung](https://surrealdb.com/assets/static/samsung.CH-vQgnb.svg)
8. ![adidas](https://surrealdb.com/assets/static/adidas.DdTC5qhk.svg)
9. ![Tencent](https://surrealdb.com/assets/static/tencent.paQmLxyy.svg)
10. ![Alibaba](https://surrealdb.com/assets/static/alibaba.B16idgfM.svg)
11. ![PolyAI](https://surrealdb.com/assets/static/poly-ai.c3w_fAg6.svg)
12. ![Later](https://surrealdb.com/assets/static/later.Ds736jFO.svg)
13. ![Verizon](https://surrealdb.com/assets/static/verizon.BI7CajdX.svg)
14. ![Liberty Mutual](https://surrealdb.com/assets/static/liberty-mutual.B7qOU1pd.svg)
15. ![Walmart](https://surrealdb.com/assets/static/walmart.BjDg_Sr8.svg)
16. ![Carrier](https://surrealdb.com/assets/static/carrier.D21gC6NX.svg)
17. ![Saks Fifth Avenue](https://surrealdb.com/assets/static/saks-fifth-avenue.COIDpLSb.svg)
18. ![San Francisco Compute Company](https://surrealdb.com/assets/static/sfcc.B7jlImq4.svg)
19. ![Shield AI](https://surrealdb.com/assets/static/shield-ai.pINZ0KJr.svg)
20. ![Wix](https://surrealdb.com/assets/static/wix.DvHhmoBi.svg)

01 |SINGLE BINARY

## One binary, any device

### Embedded mode

SurrealDB as a library, in-process, so a query is a function call.

### WASM runtime

The full query engine in the browser as WebAssembly, offline-capable, in the same SurrealQL.

### Edge devices

IoT devices, mobile applications and edge nodes, serving data where it is generated.

02 |OFFLINE-FIRST

## Offline-first, with full ACID guarantees. Replication to a central instance runs through your application.

OFFLINE

### Offline-first

Reads and writes happen locally, with full ACID guarantees, whatever the connection.

REPLICATION

### Replication through your application

Edge instances run offline with full ACID guarantees; replication to a central instance runs through your application, on the connection and schedule it chooses.

API

### Same API everywhere

The same SurrealQL, SDKs and data model from a WASM browser instance to a cloud cluster.

SCALE

### Scale from edge to cloud

Embedded, then single-node, then a distributed cluster, on the same application code.

PLATFORMS

### Every platform

Linux, macOS, Windows and the browser via WebAssembly. The Rust SDK runs embedded, the JavaScript SDK ships a WASM engine.

QUERIES

### Same queries, edge and cloud

The same SurrealQL, data model and API in every deployment mode, so code written for an embedded instance runs identically on a cluster.

03 |AI AT THE EDGE

## Agent context at the edge. From a WASM agent to a cluster, on the same code.

CONTEXT

### Local context, full queries

Agents reason over locally stored context with multi-model queries, with or without a connection.

MEMORY

### Memory that travels

What an agent learns offline is committed locally with full ACID guarantees; your application replicates it to the central instance, into the same engine.

CODEBASE

### [One codebase, every scale](https://surrealdb.com/use-cases/ai-agents)

From an embedded WASM agent to a distributed cluster on the same application code.

Explore AI agents

## Your questions, answered

What platforms does SurrealDB support for embedded and edge?

SurrealDB runs on Linux, macOS, Windows and in the browser through WebAssembly. The Rust SDK provides an embedded mode for in-process use, and the JavaScript SDK includes a WASM engine for browser deployment.

Can I use the same queries on the edge and in the cloud?

THE PLATFORM

## Everything an application and its agents know. Five surfaces, one engine.

Database

Document, graph, vector, time-series and relational in one engine.

![Five data models as dotted tiles: documents, graph, vector, time-series and relational](https://surrealdb.com/assets/static/platform-database.DUdumYDz.avif)

Read more

[Database](https://surrealdb.com/surrealdb)

Agent Memory

What an agent learns, with its source and its time, in the same engine.

![A timeline of remembered facts, each with its source](https://surrealdb.com/assets/static/platform-agent-memory.Cvv8D5Wl.avif)

Read more

[Agent Memory](https://surrealdb.com/agent-memory)

Cloud

Managed clusters in the regions you choose, scaled on demand.

![Clusters in three regions on a world map, each running or scaling](https://surrealdb.com/assets/static/platform-cloud.--QZnaVi.avif)

Read more

[Cloud](https://surrealdb.com/cloud)

Studio

Query, explore and design the schema from the browser.

![A SurrealQL query in Studio and the schema graph under it](https://surrealdb.com/assets/static/platform-studio.7ykBFNLq.avif)

Read more

[Studio](https://surrealdb.com/studio)

MCP

Every model that speaks MCP reaches the database and the memory directly.

![Three models connected through MCP to the database and Agent Memory](https://surrealdb.com/assets/static/platform-mcp.D_oH0_wm.avif)

Read more

[MCP](https://surrealdb.com/mcp)

IN PRODUCTION

## Trusted at scale. Samsung, Nvidia, Verizon, Tencent, and Walmart run on SurrealDB.

14,000+

Developers building on SurrealDB Cloud

4M+

Developers building on SurrealDB worldwide

FROM THE TEAMS

> SurrealDB gives us a foundation where we can unify semantic search, knowledge graphs, and AI-driven decision making without stitching together multiple systems. Collapsing responsibility into SurrealDB has become our default engineering posture.

*Justin Foley*

VP of Engineering, Later

GET STARTED

## Run SurrealDB at the edge. Single binary, WASM and offline-first, with one API from embedded to cloud.

[Start free with SurrealDB](https://studio.surrealdb.com/current/instances/deploy) [Embedded docs](https://surrealdb.com/docs/build/embedding)

```json
{"@context":"https://schema.org","@type":"Organization","@id":"https://surrealdb.com/#organization","name":"SurrealDB","url":"https://surrealdb.com","logo":"https://surrealdb.com/assets/static/logo.BG7_TG2b.svg","description":"SurrealDB is the context and memory layer for AI agents. A multi-model database for documents, graphs, vectors, and time-series.","foundingDate":"2022","legalName":"SurrealDB Ltd","identifier":{"@type":"PropertyValue","propertyID":"GB-COH","value":"13615201"},"address":{"@type":"PostalAddress","streetAddress":"3rd Floor, 1 Ashley Road","addressLocality":"Altrincham","addressRegion":"Cheshire","postalCode":"WA14 2DT","addressCountry":"GB"},"contactPoint":[{"@type":"ContactPoint","contactType":"customer support","email":"support@surrealdb.com","url":"https://surrealdb.com/contact","availableLanguage":"English"},{"@type":"ContactPoint","contactType":"sales","email":"info@surrealdb.com","url":"https://surrealdb.com/contact","availableLanguage":"English"},{"@type":"ContactPoint","contactType":"security","email":"security@surrealdb.com","url":"https://surrealdb.com/.well-known/security.txt","availableLanguage":"English"},{"@type":"ContactPoint","contactType":"legal","email":"legal@surrealdb.com","url":"https://surrealdb.com/legal","availableLanguage":"English"}],"hasCertification":[{"@type":"Certification","name":"SOC 2 Type 2"},{"@type":"Certification","name":"GDPR"},{"@type":"Certification","name":"Cyber Essentials Plus"},{"@type":"Certification","name":"ISO 27001"}],"owns":[{"@type":"SoftwareApplication","name":"SurrealDB","url":"https://surrealdb.com/surrealdb"},{"@type":"SoftwareApplication","name":"Agent Memory","url":"https://surrealdb.com/agent-memory"}],"knowsAbout":["multi-model databases","document databases","graph databases","vector search","time-series databases","SurrealQL","Agent Memory","real-time databases","embedded databases","context layer","graph ontology","distributed database","knowledge graphs","distributed transaction protocols","highly-scalable databases"],"sameAs":["https://www.wikidata.org/wiki/Q124316308","https://github.com/surrealdb/surrealdb","https://twitter.com/surrealdb","https://www.youtube.com/@surrealdb","https://www.linkedin.com/company/surrealdb","https://discord.gg/surrealdb","https://www.reddit.com/r/surrealdb","https://www.instagram.com/surrealdb","https://medium.com/surrealdb","https://dev.to/surrealdb"]}
```

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://surrealdb.com"},{"@type":"ListItem","position":2,"name":"Embedded edge","item":"https://surrealdb.com/use-cases/embedded-edge"}]}
```

```json
{"@context":"https://schema.org","@type":"FAQPage","mainEntity":[{"@type":"Question","name":"What platforms does SurrealDB support for embedded and edge?","acceptedAnswer":{"@type":"Answer","text":"SurrealDB runs on Linux, macOS, Windows and in the browser through WebAssembly. The Rust SDK provides an embedded mode for in-process use, and the JavaScript SDK includes a WASM engine for browser deployment."}},{"@type":"Question","name":"Can I use the same queries on the edge and in the cloud?","acceptedAnswer":{"@type":"Answer","text":"Yes. SurrealDB uses the same query language, SurrealQL, the same data model and the same API whatever the deployment mode. Code written for an embedded instance works identically on a cloud cluster."}}]}
```
