# any docs > Documentation for the any local-first database, encrypted sync, and agent runtime. Each link below returns complete Markdown as UTF-8 text, without JavaScript or navigation. The `.md.txt` URLs use `text/plain` on static hosts; `.md` aliases contain identical Markdown. All pages in one file: [llms-full.txt](https://docs.any.org/llms-full.txt). ## Documentation - [any docs](https://docs.any.org/index.md.txt): Documentation for any — the reactive, local-first, end-to-end encrypted database with built-in chat and editor CRDTs, and a sandboxed runtime for jobs and agents that live in your data. - [Understanding any](https://docs.any.org/understanding/index.md.txt): The three pieces — an encrypted local database, sync between devices and members, and a sandboxed runtime for programs and agents — and how data flows through them. - [Preview status and license](https://docs.any.org/understanding/preview.md.txt): What "developer preview" means for the API, the MIT license, what runs on your device, and what still needs a network. - [Local-first](https://docs.any.org/understanding/local-first.md.txt): Every device holds the whole database; writes commit locally, sync happens when a peer is reachable, and convergence is guaranteed by the data model rather than by a server — plus which operations still need a network. - [Architecture](https://docs.any.org/understanding/architecture.md.txt): The layered stack under the HTTP API — any-store, the any-sync protocol and its node roles, the SDK's record CRDT, the any server, and the clients and runtime on top — and what each layer owns. - [Spaces and trees](https://docs.any.org/understanding/spaces-and-trees.md.txt): A space is one ACL plus many object trees; an object is a DAG of signed, encrypted changes with heads; how a change is authored and applied, how peers head-sync, what derived ids are, and what the coordinator does versus the sync nodes. - [The record CRDT](https://docs.any.org/understanding/record-crdt.md.txt): How the SDK turns encrypted changes into rows — datasets, records and per-path ops, the `_ver` gate, content-addressed record ids, handlers that run on every peer, tombstones and delivery counters — with a worked merge. - [The tech space](https://docs.any.org/understanding/tech-space.md.txt): The account's private, owner-only derived space — what it stores (space list, profile, devices, settings, account-scoped values, identities), how the space list and its live stream are views over it, the mirrors that feed it, and why "my devices" semantics fall out of it. - [Versioning and re-index](https://docs.any.org/understanding/versioning-and-reindex.md.txt): The account-wide CRDT version mark, handler versions and wire data versions, the version-driven re-index that rebuilds rows from the DAG (lazy per object plus a background sweep), what clients see during the window, why no migration is ever written, and how the search index follows the space generation. - [Encryption](https://docs.any.org/understanding/encryption.md.txt): The end-to-end model — changes are signed and encrypted on the device, keys are derived from account keys and ACL state, and the nodes in between relay ciphertext only. - [CRDTs and consistency](https://docs.any.org/understanding/crdt-and-consistency.md.txt): Writes are changes in a per-object DAG; fields merge by per-path last-writer-wins on DAG order, deletes are sticky, and there is no total order — an honest comparison with transactional databases. - [The zen of any](https://docs.any.org/understanding/zen-of-any.md.txt): The invariants the API keeps — one HTTP surface, reads through query/subscribe, writes through handlers, endpoints 1:1 with the SDK, loopback-only, uniform errors — and the reasoning behind each. - [Developer workflow](https://docs.any.org/understanding/dev-workflow.md.txt): The day-to-day loop — init an account, run the server, drive it from the CLI or curl, watch it in the web UI, and know what lives in the data dir. - [Best practices](https://docs.any.org/understanding/best-practices.md.txt): Eleven call patterns that keep a client correct and cheap — where writes go, how reads page, how subscriptions recover, and how to budget the live surface. - [Programs and effects](https://docs.any.org/understanding/programs-and-effects.md.txt): anybao in one page — Python programs stored in your space, executed by anyrt inside a wasm cage, touching the world only through a recorded effect boundary, replayable bit-exact, scheduled by trigger records. - [Quickstart](https://docs.any.org/quickstart/index.md.txt): Install `any`, create an account, run the server, and make your first space, object, query, and live subscription — from curl, the CLI, JavaScript, Python, Android, iOS, or the anyrt runtime. - [Install](https://docs.any.org/quickstart/install.md.txt): Get the `any` binary from a release tarball or build it from source, pick a data root and network, create your first account, and start the server. - [curl](https://docs.any.org/quickstart/curl.md.txt): Create a space, create an object, query the space, and read a live subscription — four raw HTTP calls against the local server. - [CLI](https://docs.any.org/quickstart/cli.md.txt): The any command is a thin HTTP client — one subcommand per endpoint, pretty JSON on stdout — shown here for the create → query → subscribe loop. - [JavaScript](https://docs.any.org/quickstart/javascript.md.txt): A fetch-based client with no dependencies — create a space and an object, query, read the SSE subscription from a streaming POST, and keep an ordered window that survives a dropped stream. - [Python](https://docs.any.org/quickstart/python.md.txt): The create → query → subscribe loop with the standard library only — urllib for calls, http.client for the streaming SSE subscription, plus a per-object dataset read with an absolute cursor. - [Android](https://docs.any.org/quickstart/android.md.txt): Embed the any server inside an Android app process with any.aar — start it on a loopback port, read the bound address, and talk HTTP to it from the app. - [iOS](https://docs.any.org/quickstart/ios.md.txt): Embed the any server in an iOS app with any.xcframework — a C-archive with five exported functions — then talk HTTP to it on loopback. - [anyrt](https://docs.any.org/quickstart/anyrt.md.txt): Run the anybao agent runtime next to your `any` server — write anybao.toml, seed an LLM key, start anyrt serve, and schedule your first program with a trigger record. - [Networks](https://docs.any.org/quickstart/networks.md.txt): Which any-sync network a server talks to — the embedded production default, a staging or local nodeconf via ANY_NETWORK_NODECONF_PATH, and the placeholder that joins nothing — and how the choice reaches embedded builds. - [Tutorial](https://docs.any.org/tutorial/index.md.txt): Four parts that build on each other — an object, then properties, then a dataset, then the parts, bundles and miniapps that turn it into an app — so you can stop at any level and use only what you have learned. - [1. Objects](https://docs.any.org/tutorial/objects.md.txt): The first level — create a plain page with a name and a description, read it back, subscribe to changes, rename it and delete it. No schema of your own. - [2. Properties](https://docs.any.org/tutorial/properties.md.txt): The second level — a type with typed properties gives objects columns you can validate, filter and sort on; a collection categorises objects that keep their type, with columns of its own. Built here as a small password manager. - [3. Datasets](https://docs.any.org/tutorial/datasets.md.txt): The third level — a dataset is a table inside one object; when to use it instead of many objects, and how it holds thousands of records with an enforced schema, idempotent import, paging, search and aggregation. Built here as a mailbox of 10 000 emails. - [4. Apps](https://docs.any.org/tutorial/apps.md.txt): The fourth level — parts let an object inherit a module's behaviour, a bundle makes every device converge on one definition, filing it under the miniapp collection puts it in the sidebar, and the catalog installs the well-known apps with one call. - [Database](https://docs.any.org/database/index.md.txt): How data is organised in any — spaces, objects, types, datasets — and the one query primitive that reads all of it. - [Data model](https://docs.any.org/database/data-model.md.txt): An object has one type, any number of collections and any number of datasets — one shared objects row for its property values plus its own record storage collections, each with a discoverable JSON Schema and per-field scope. - [Spaces](https://docs.any.org/database/spaces.md.txt): Create, list, update and delete spaces — the encrypted, shareable containers every object lives in. - [Objects](https://docs.any.org/database/objects.md.txt): Create objects with one type and any number of collections, seed their properties, place them in the wiki tree, find what links to them, and delete them. - [Types and properties](https://docs.any.org/database/types-and-properties.md.txt): Every object has exactly one type — its layout, its parts and a property namespace; define types and collections with a stable xKey and patch their property definitions in place. - [Collections](https://docs.any.org/database/collections.md.txt): A collection is what an object is filed under — a group of property definitions and nothing else; create one, give it columns, file objects under it and query its members. - [Property lifecycle](https://docs.any.org/database/property-lifecycle.md.txt): How a property definition is born, what is pinned on first write, what can be patched, how values relate to definitions, and what removal does — all under CRDT convergence. - [Data types](https://docs.any.org/database/data-types.md.txt): Property kinds, the xFormat descriptor and its slug vocabulary, the datetime instant on the wire, and the synced / local / account / derived scopes every field belongs to. - [Reading data](https://docs.any.org/database/reading-data.md.txt): The one read path — POST /query over objects or a dataset — with mongo-style filters, array matching, sort, limit/offset and cursor paging. - [Writing data](https://docs.any.org/database/writing-data.md.txt): Property writes keyed by propId, the generic /modify endpoint with $set/$unset/$inc/$addToSet/$pull ops, local-scope writes, record deletes, and the ModifyResult receipt every write returns. - [Indexes](https://docs.any.org/database/indexes.md.txt): Which fields are indexed, which queries are scans, and how to keep hot reads cheap — no create-index API is needed for the built-in paths. - [Runtime datasets](https://docs.any.org/database/runtime-datasets.md.txt): Declare a schema-enforced dataset on your own type at runtime — required fields, write-once vs author-mutable, author-only delete, derived stamps, user-supplied ids. - [Upsert](https://docs.any.org/database/upsert.md.txt): Idempotent batch ingest into a runtime dataset with user-supplied ids — re-running the same batch writes nothing. - [Aggregation](https://docs.any.org/database/aggregation.md.txt): MongoDB-style pipelines — $match, $group, $unwind, $sort and friends — computed in one snapshot read over objects or a per-object dataset. - [Version history](https://docs.any.org/database/version-history.md.txt): Every object keeps its full change history locally — list changes, view the object at any version, read one record at a cut, and diff. - [Markdown import & export](https://docs.any.org/database/markdown-import-export.md.txt): Read a document as markdown, replace it wholesale, patch it by quoting text, or append — a lossless bridge over the editor's block records. - [System fields](https://docs.any.org/database/system-fields.md.txt): The fields any stamps for you — `_ver`, `_addSeq`, `_deletedAt`, `createdAt` / `modifiedAt`, `author` / `modifiedBy`, and the built-in `any.*` properties. - [Derived objects](https://docs.any.org/database/derived-objects.md.txt): Ids computed from keys and a seed instead of minted at random — how any makes every device converge on the same space, root or metadata object with no coordination. - [Realtime](https://docs.any.org/realtime/index.md.txt): How any pushes live data to clients — windowed subscriptions, sync state, the live space list, and the ephemeral event bus. - [Subscribe](https://docs.any.org/realtime/subscribe.md.txt): The windowed query/subscribe primitive — one POST returns a snapshot and then streams added/updated/removed deltas until the stream closes. - [Sync status](https://docs.any.org/realtime/sync-status.md.txt): Read whether a space or object has converged with peers, and stream state transitions over SSE. - [Live space list](https://docs.any.org/realtime/space-list.md.txt): Query and subscribe to the account's own space list as raw rows — joins, role changes, settings and push keys arrive as row updates. - [Event bus](https://docs.any.org/realtime/event-bus.md.txt): An ephemeral, at-most-once event bus for transient signals — publish with one POST, receive over filtered SSE, across this device, the account's devices, or a space's members. - [Auth](https://docs.any.org/auth/index.md.txt): How an any server is bound to an account, how devices and contacts are identified, and where your profile lives. - [Accounts](https://docs.any.org/auth/accounts.md.txt): Create or restore an account from a mnemonic, authorize a running server over HTTP, and lay out several accounts in one data dir. - [Devices](https://docs.any.org/auth/devices.md.txt): The account's synced device registry and the deterministic election that names which device runs an app. - [Identities](https://docs.any.org/auth/identities.md.txt): The account-global directory of every account you have encountered, and why a contact's name resolves only after their key arrives. - [Profile](https://docs.any.org/auth/profile.md.txt): Read your own account id and metadata, publish the encrypted name, description and icon other members see, and redeem an alpha access code. - [Collaboration](https://docs.any.org/collaboration/index.md.txt): How a space gets shared — members and roles, invites, ACL operations, direct one-to-one spaces, derived spaces and bundles. - [Members and roles](https://docs.any.org/collaboration/members-and-roles.md.txt): The authoritative per-space roster — who is in a space, with what permission and status — and the live member stream. - [Invites](https://docs.any.org/collaboration/invites.md.txt): Mint, share, list and revoke invite tokens; the request-to-join flow; public read-only guest keys. - [ACL](https://docs.any.org/collaboration/acl.md.txt): Owner and admin operations on a space's access-control list — accept or decline requests, change permissions, remove, add by identity, transfer ownership, stop sharing. - [One-to-one](https://docs.any.org/collaboration/one-to-one.md.txt): Direct spaces between two identities, derived from both account keys — no invite, no owner — with a device-local accept/decline gate. - [Derived spaces](https://docs.any.org/collaboration/derived-spaces.md.txt): Well-known per-account spaces derived from the account keys and a fixed seed, so every client and device converges on the same space — permanent by design. - [Bundles](https://docs.any.org/collaboration/bundles.md.txt): Register what a space has installed — one root per bundle, adopted or installed, optionally derived so it can never fork — and resolve the losers when two devices installed apart. - [Modules](https://docs.any.org/types/index.md.txt): The CRDT modules any ships with — chat and editor blocks — the type parts that declare them, the built-in hidden types, and the any:// link grammar that ties records together. - [Chat](https://docs.any.org/types/chat.md.txt): The messenger module — sending, editing, reacting, mentions, and account-private read tracking on the chat_messages collection. - [Editor](https://docs.any.org/types/editor.md.txt): Block-structured documents in an editor storage collection — atomic block writes, live subscriptions, and a lossless markdown bridge for imports, exports and LLM edits. - [Page](https://docs.any.org/types/page.md.txt): How a document is declared — a type whose part shares the editor module — what fields a page is made of, and how to list and file pages. - [Links](https://docs.any.org/types/links.md.txt): The canonical any:// link grammar — one self-describing URI for objects, dataset records, mentions, spaces, property values and files — and the link index behind backlinks. - [Files](https://docs.any.org/files/index.md.txt): Files as space data — encrypted, synced and access-controlled like every other record, with local-first storage tiers and background network backup. - [Uploading](https://docs.any.org/files/uploading.md.txt): Attach a file to an object with a raw-body POST — what gets stored, the inline and DAG tiers, and how variants like thumbnails work. - [Downloading](https://docs.any.org/files/downloading.md.txt): Read file bytes as a regular HTTP resource — mime, filename, Range/206, on-demand network fetch — and list files with names or as live rows. - [Status and durability](https://docs.any.org/files/status-and-durability.md.txt): The three durability states, the per-file and per-space status reads, the local transition stream, and how a receiver learns a remote file is fetchable. - [Cache](https://docs.any.org/files/cache.md.txt): Local file bytes as a cache once a file is durable — pin for offline, offload to reclaim space, and the account-wide free and sweep controls. - [Deleting](https://docs.any.org/files/deleting.md.txt): Delete a file for every member in one synced change — variant cascade, what live views see, and what happens to local and network bytes. - [Search](https://docs.any.org/search/index.md.txt): A local BM25 + vector search index over every space, built from the change feed and queried through one endpoint. - [Full-text search](https://docs.any.org/search/full-text.md.txt): The BM25 lexical leg — always on, no external dependency, with phrase, prefix, require and exclude operators. - [Vector search](https://docs.any.org/search/vector.md.txt): The semantic leg — embeddings computed on-device, an ANN index per space, and what the similarity scores do and don't mean. - [Hybrid ranking](https://docs.any.org/search/hybrid.md.txt): The default mode fuses the lexical and semantic legs by reciprocal rank, degrades gracefully, and tells you what actually ran. - [How indexing works](https://docs.any.org/search/indexing.md.txt): Chunkers turn dataset records into index documents; the indexer consumes the change feed, evicts what disappears, and never blocks a write. - [Embedders](https://docs.any.org/search/embedders.md.txt): The five index.embedder settings — auto, local, ollama, openai, none — their prerequisites, and what happens when one is unreachable. - [Evaluation](https://docs.any.org/search/evaluation.md.txt): What was measured — chunk sizes, BEIR benchmarks, ANN index modes, the similarity floor — and why the defaults are what they are. - [Notifications](https://docs.any.org/notifications/index.md.txt): Getting a user's attention when any is not on screen — end-to-end-encrypted mobile push for chat, and the process helper for reporting long-running work. - [Push notifications](https://docs.any.org/notifications/push.md.txt): End-to-end-encrypted mobile push for chat — how the sender pushes, the topic vocabulary, notifyMode settings, the keys receivers cache, and configuration. - [Processes](https://docs.any.org/notifications/processes.md.txt): Report long-running work — agent runs, index passes, imports — as live progress over the event bus, with heartbeats, staleness expiry, and an owner-addressed cancel flow. - [Programs](https://docs.any.org/programs/index.md.txt): Sandboxed Python that runs next to your data — every side effect recorded, every run replayable bit-exact. - [Effects](https://docs.any.org/programs/effects.md.txt): The complete host syscall surface a program can reach, how each call is classified, and why the boundary is where the truth lives. - [Writing a program](https://docs.any.org/programs/writing-a-program.md.txt): File layout, the docstring convention, tool declaration with @span, result-shape rules and the import allowlist. - [Modules and overlays](https://docs.any.org/programs/modules-and-overlays.md.txt): How use() resolves a program from a space, why import can't do it, and how repos are published and joined as overlays. - [Traces and replay](https://docs.any.org/programs/traces-and-replay.md.txt): The append-only run log — where it is stored, record kinds, canonical keys, spans, blob spills — and the strict and loose replay modes built on it. - [Credentials](https://docs.any.org/programs/credentials.md.txt): Secret refs, host-side header injection, the synced secrets store, and OAuth grants whose tokens guest code never holds. - [Testing](https://docs.any.org/programs/testing.md.txt): Run program sources under the real guest kernel with only the effect boundary faked, plus one-shot runs and golden replay. - [Limits](https://docs.any.org/programs/limits.md.txt): Fuel budgets, wall-clock deadlines and hard breaks — how each is enforced in the wasm cage, what a program sees when it hits one, and how to stay under. - [Scheduling](https://docs.any.org/scheduling/index.md.txt): Triggers are CRDT records — cron, one-shot and event definitions that fire programs on the device that owns them. - [Cron](https://docs.any.org/scheduling/cron.md.txt): Recurring triggers — cron expressions or a fixed interval, armed strictly forward so a missed occurrence never replays. - [Once](https://docs.any.org/scheduling/once.md.txt): One-shot triggers for reminders and delayed work — fire at a time, then self-disable and remain as the audit trail. - [Event triggers](https://docs.any.org/scheduling/event-triggers.md.txt): The event kind — fire a program on every new message in a chat, and the chat responder record that decides which device answers. - [Device pins](https://docs.any.org/scheduling/device-pins.md.txt): Which of your devices runs a trigger — the owner field, claiming and eviction, and the active-instance election that claims unassigned records. - [Runs and monitoring](https://docs.any.org/scheduling/runs-and-monitoring.md.txt): Synced run summaries, the scheduler stamp on the trigger, the circuit breaker, health markers for inert definitions, and the agent's loopback control API. - [Agents](https://docs.any.org/agents/index.md.txt): A space-resident AI agent whose conversations, memory, tools and schedule live inside the user's own encrypted data and run as replayable programs. - [Conversations](https://docs.any.org/agents/conversations.md.txt): How one chat message becomes one replayable run — the neutral message model, the run_cell tool, digests, ceilings, and steering a live run. - [Tools](https://docs.any.org/agents/tools.md.txt): Tools are programs — the built-in agent tools, how the model discovers them, and how the agent authors new ones into its working space. - [Memory and recall](https://docs.any.org/agents/memory.md.txt): A small, high-signal memory store with dedup on save, topical auto-recall on every turn, hierarchical history rollups, and background maintenance jobs. - [Subagents](https://docs.any.org/agents/subagents.md.txt): Delegate a self-contained task to a quiet child loop that shares the space and tools but starts with fresh context, and get its report back as a value. - [Connectors](https://docs.any.org/agents/connectors.md.txt): Service connectors as programs — Linear, GitHub, Gmail, Calendar and more — with credentials held by the host and injected after the request is recorded. - [Agent data](https://docs.any.org/agents/agent-data.md.txt): Every dataset the agent owns — turns, chunks, memory, config, secrets, triggers, run summaries — declared as runtime datasets on derived objects in the user's space, and readable with the ordinary query surface. - [Progress and UI](https://docs.any.org/agents/progress-and-ui.md.txt): How the agent shows up in a client — agent-authored chat messages with a typing indicator and debug link, progress bars over the process registry, and space-resident UI helpers. - [Embedding anyrt](https://docs.any.org/agents/embedding-anyrt.md.txt): Run the agent as a Rust library inside your app or as the anyrt serve process — build order, configuration, logging, and why only one agent may watch a chat. - [Operations](https://docs.any.org/operations/index.md.txt): Running the `any` server — lifecycle, configuration, the data directory, networks, the security model, release builds and debugging. - [Server](https://docs.any.org/operations/server.md.txt): How any run boots, what it serves during the background boot pass, how it shuts down, and the per-account single-instance lock. - [Configuration](https://docs.any.org/operations/configuration.md.txt): Config file, environment variables and flags — their precedence, and a reference of every key. - [Data directory](https://docs.any.org/operations/data-dir.md.txt): The per-account layout under the data root, who owns each subdirectory, and what is safe to delete, copy or back up. - [Networks](https://docs.any.org/operations/networks.md.txt): Which any-sync network a server joins — the embedded production default, staging and self-hosted nodeconfs, the test placeholder — and local-network sync. - [Security model](https://docs.any.org/operations/security-model.md.txt): Loopback is the process boundary, end-to-end encryption is the data boundary — what each protects, what the CORS allowlist is for, and what the server does not provide. - [Builds and CI](https://docs.any.org/operations/builds-and-ci.md.txt): Building the server with or without the local embedder, the nix dev shell, and the release artifacts — desktop tarballs, the Android .aar and the iOS .xcframework. - [Debugging](https://docs.any.org/operations/debugging.md.txt): Where to look when something is off — health, sync status, the debug snapshots, the process view, logs, and how to read an error response. - [Testing](https://docs.any.org/testing/index.md.txt): How the server and the agent runtime are tested — real-binary end-to-end suites for any, and a layered, replay-deterministic harness for anybao. - [any end-to-end](https://docs.any.org/testing/any-e2e.md.txt): The server's test layout — unit tests, the real-binary e2e suite, the two-peer harness, and which tests are gated on external infrastructure. - [anybao harness](https://docs.any.org/testing/anybao-harness.md.txt): The layered test doctrine of the agent runtime — replay determinism as the testable property, the kernel-fidelity harness, recorded fixtures, and the scratch rig. - [Reference](https://docs.any.org/reference/index.md.txt): Exhaustive catalogs of the `any` server and `anyrt` runtime surfaces — endpoints, commands, streams, error codes, config keys, effects and schemas. - [HTTP API](https://docs.any.org/reference/http-api.md.txt): Every endpoint of the any server, grouped as the server registers them, with bodies, return shapes and the error codes each one can answer. - [CLI](https://docs.any.org/reference/cli.md.txt): Every any command group with its flags — a thin HTTP client over the local server, one command per endpoint, JSON on stdout. - [SSE streams](https://docs.any.org/reference/events.md.txt): Every Server-Sent Events stream the server exposes, its frame set, and the shared set of terminal close reasons. - [Errors](https://docs.any.org/reference/errors.md.txt): The one error envelope every non-2xx response uses, the HTTP status rules, and the full dotted error-code namespace. - [Server configuration](https://docs.any.org/reference/config.md.txt): Every any server config key with its env var, flag, default and precedence — data dir, listen address, network, index, files, push, logging. - [anyrt CLI](https://docs.any.org/reference/anyrt-cli.md.txt): Every anyrt subcommand and flag — run one program, serve the agent, deploy a repo, inspect traces, check API drift. - [Effects catalog](https://docs.any.org/reference/effects-catalog.md.txt): The complete host syscall surface a program can reach from inside the sandbox — every effect, its kind, the capability it names, and what it returns. - [Trigger schema](https://docs.any.org/reference/trigger-schema.md.txt): The agent_triggers record — every field, the three kinds and their spec shapes, the agent_runs summary, and the control-plane routes that write through to it. - [anybao.toml](https://docs.any.org/reference/anybao-toml.md.txt): Every key of the anyrt host config file — server address, working space, overlays with invites, trace storage and retention, and the agent-config seeds. - [Glossary](https://docs.any.org/reference/glossary.md.txt): One-line definitions of every term the docs lean on — spaces, datasets, changes, derived objects, overlays, effects, traces, identities — each linked to the page that covers it.