# botdb > End-to-end encrypted, local-first SQL databases for AI agents. Every device keeps a full SQLite copy, works offline, and syncs encrypted through botdb cloud (hosted, free during beta), a self-hosted relay, or a shared folder. One CLI (`botdb`), an MCP server (`botdb mcp`) and an agent skill. Install: `curl -fsSL botdb.dev/install.sh | sh`. Then `botdb login` (creates a vault, a recovery phrase and a botdb cloud account) and `botdb create `. ## Agent skill - [SKILL.md](https://botdb.dev/skill.md): when and how agents should use botdb ## start - [Introduction](https://botdb.dev/docs/): What botdb is, how it works, and the concepts used throughout these docs. - [Installation](https://botdb.dev/docs/getting-started/installation/): Install the botdb CLI, verify it, and set up shell completions. - [Quickstart](https://botdb.dev/docs/getting-started/quickstart/): Create a vault and a database, define a table, write and query rows, and undo changes. - [Multiple machines](https://botdb.dev/docs/getting-started/multiple-machines/): Restore your vault on a second machine, share one database with someone else, and set up agents. ## guides - [botdb cloud](https://botdb.dev/docs/guides/cloud/): The hosted relay botdb syncs through by default, what it stores, accounts, plan limits and how to leave. - [Using with agents](https://botdb.dev/docs/guides/agents/): Give agents persistent SQL tables through the botdb skill, the MCP server, or the CLI in headless environments. - [Sharing and invites](https://botdb.dev/docs/guides/sharing/): Share a single database with another person or agent, make it read-only, and remove members with key rotation. - [Backups and recovery](https://botdb.dev/docs/guides/backups/): The layers that protect your data, the recovery phrase, local snapshots, encrypted archives, plain exports, and how to recover from common mistakes. - [Self-hosting a relay](https://botdb.dev/docs/guides/self-hosting/): Run botdb relay with the binary, Docker or systemd behind a TLS reverse proxy, and point clients at it. - [Syncing through a folder](https://botdb.dev/docs/guides/folder-sync/): Use iCloud Drive, Dropbox, Google Drive, OneDrive, Syncthing or a USB drive as a botdb remote instead of a relay. ## reference - [CLI reference](https://botdb.dev/docs/reference/cli/): Every botdb command, argument and option. - [SQL support and table rules](https://botdb.dev/docs/reference/sql/): The SQL dialect botdb accepts, which statements and schema features are allowed, and why. - [Conflict resolution](https://botdb.dev/docs/reference/conflicts/): How botdb merges concurrent changes from devices that edited offline, for rows, columns, deletes and schema. - [Configuration and environment](https://botdb.dev/docs/reference/configuration/): botdb's home directory, keystores, environment variables, automatic sync, output formats and defaults. - [Relay protocol](https://botdb.dev/docs/reference/relay-protocol/): The HTTP API between botdb clients and relays, request signing, and how batches, cursors and snapshots work. ## security - [Threat model and cryptography](https://botdb.dev/docs/security/threat-model/): What botdb protects, what relays and folder hosts can see and do, and the cryptographic design behind it.