> For the complete documentation index, see [llms.txt](https://docs.nimbalyst.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nimbalyst.com/open-safe-private-secure/session-and-window-state-storage.md).

# Session and Window State Storage

Where Nimbalyst stores AI session history and window state on your machine, including the local database location on macOS, Windows, and Linux.

Session history and window state are stored in a local database on your own machine. This page covers which database that is, where it lives, and what a session record contains.

### The database

**Backend:** SQLite on newer installs. Installs that predate the SQLite migration stay on PGLite until they migrate.

**Tables:** `ai_sessions` for the sessions themselves, `ai_agent_messages` for the message log behind each one.

**Location:** inside the Nimbalyst application data folder.

| Platform | Application data folder                   |
| -------- | ----------------------------------------- |
| macOS    | `~/Library/Application Support/Nimbalyst` |
| Windows  | `%APPDATA%\Nimbalyst`                     |
| Linux    | `~/.config/Nimbalyst`                     |

Development builds use an `@nimbalyst/electron` folder in the same platform-specific location.

The database itself is `sqlite-db/nimbalyst.sqlite` on SQLite, or the `pglite-db/` folder on PGLite.

### What a session record holds

* Session id, title, and workspace
* Provider and model
* Session type, mode, and agent role
* Document context and the last document state
* Draft input you typed but have not sent
* Parent, branch, and worktree links
* Status, pinned and archived flags, and created and updated timestamps

Conversation messages are stored separately in `ai_agent_messages` and linked back to the session id, so a long transcript does not have to be rewritten every time the session changes.

### Backups

Nimbalyst backs this database up every 12 hours by default and on quit, keeping two rolling copies by default. You can change the interval and keep one to three copies under **Settings > Application > Database**. See [Database Backups and Restore](/troubleshooting/database-backups-and-restore.md) for the backup locations and restore steps.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.nimbalyst.com/open-safe-private-secure/session-and-window-state-storage.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
