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

# SQL

> Store workspace files in SQL tables.

SQL stores workspace files in a database's tables, laid out as
[AgentFS](https://github.com/tursodatabase/agentfs)'s. The files last as long
as the database does. One database holds one filesystem.

## Configuration

For Python or Node, set `path` to the SQLite file. Leave it out to keep the
database in memory:

```yaml theme={null}
mounts:
  /data:
    vfs: sql
    mode: write
    config:
      path: ./workspace.db
```

A Postgres server, a Durable Object's storage or a D1 database mounts from
code, through its driver. See the SDK guides.

Add `capacity: 100MB` under `config` to cap the bytes the files hold. See
[capacity](https://docs.mirage.strukto.ai/home/configuration.md#capacity).

## SDK guides

* [Python SQL VFS](https://docs.mirage.strukto.ai/python/vfs/sql.md)
* [TypeScript SQL setup](https://docs.mirage.strukto.ai/typescript/setup/sql.md)


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