# any docs
- [any docs](/index.html): Documentation for any — the open source, 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](/understanding/index.html): The three tiers — an encrypted local database, sync between devices and members, and a sandboxed runtime for programs and agents — and how data flows through them.
- [Local-first](/understanding/local-first.html): 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.
- [Architecture](/understanding/architecture.html): 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](/understanding/spaces-and-trees.html): 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](/understanding/record-crdt.html): 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](/understanding/tech-space.html): 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](/understanding/versioning-and-reindex.html): Handler versions versus 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](/understanding/encryption.html): 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](/understanding/crdt-and-consistency.html): 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](/understanding/zen-of-any.html): 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](/understanding/dev-workflow.html): 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](/understanding/best-practices.html): 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](/understanding/programs-and-effects.html): 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](/quickstart/index.html): 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](/quickstart/install.html): Get the any binary from a release tarball or build it from source, create your first account, and start the server.
- [curl](/quickstart/curl.html): Create a space, create an object, query the space, and read a live subscription — four raw HTTP calls against the local server.
- [CLI](/quickstart/cli.html): 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](/quickstart/javascript.html): A minimal fetch-based client — create a space, create an object, query, and read the SSE subscription from a streaming POST — with no dependencies.
- [Python](/quickstart/python.html): The create → query → subscribe loop with the standard library only — urllib for calls, http.client for the streaming SSE subscription.
- [Android](/quickstart/android.html): 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](/quickstart/ios.html): Embed the any server in an iOS app with any.xcframework — a C-archive with four exported functions — then talk HTTP to it on loopback.
- [anyrt](/quickstart/anyrt.html): 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](/quickstart/networks.html): 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.
- [Database](/database/index.html): How data is organised in any — spaces, objects, types, datasets — and the one query primitive that reads all of it.
- [Data model](/database/data-model.html): An object implements many types and owns many datasets — one shared objects row for its properties, plus any number of record collections; every dataset has a discoverable JSON Schema with per-field scope.
- [Spaces](/database/spaces.html): Create, list, update and delete spaces — the encrypted, shareable containers every object lives in.
- [Objects](/database/objects.html): Create objects with types and initial properties, place them in the navigation tree, find what links to them, and delete them.
- [Types and properties](/database/types-and-properties.html): Define types with a stable xKey, add property definitions with kinds, formats, select options and scopes, and patch them in place.
- [Property lifecycle](/database/property-lifecycle.html): 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](/database/data-types.html): Property kinds, value formats, the datetime instant on the wire, and the synced / local / account / derived scopes every field belongs to.
- [Reading data](/database/reading-data.html): 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](/database/writing-data.html): 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](/database/indexes.html): 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](/database/runtime-datasets.html): 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](/database/upsert.html): Idempotent batch ingest into a runtime dataset with user-supplied ids — re-running the same batch writes nothing.
- [Aggregation](/database/aggregation.html): MongoDB-style pipelines — $match, $group, $unwind, $sort and friends — computed in one snapshot read over objects or a per-object dataset.
- [Version history](/database/version-history.html): 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](/database/markdown-import-export.html): 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](/database/system-fields.html): The fields any stamps for you — `_ver`, `_addSeq`, `_deletedAt`, `createdAt` / `modifiedAt`, `author`, and the built-in `any.*` and `nav.*` properties.
- [Derived objects](/database/derived-objects.html): 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](/realtime/index.html): How any pushes live data to clients — windowed subscriptions, sync state, the live space list, and the ephemeral event bus.
- [Subscribe](/realtime/subscribe.html): The windowed query/subscribe primitive — one POST returns a snapshot and then streams added/updated/removed deltas until the stream closes.
- [Sync status](/realtime/sync-status.html): Read whether a space or object has converged with peers, and stream state transitions over SSE.
- [Live space list](/realtime/space-list.html): 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](/realtime/event-bus.html): 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](/auth/index.html): How an any server is bound to an account, how devices and contacts are identified, and where your profile lives.
- [Accounts](/auth/accounts.html): Create or restore an account from a mnemonic, authorize a running server over HTTP, and lay out several accounts in one data dir.
- [Devices](/auth/devices.html): The account's synced device registry and the deterministic election that names which device runs an app.
- [Identities](/auth/identities.html): The account-global directory of every account you have encountered, and why a contact's name resolves only after their key arrives.
- [Profile](/auth/profile.html): Read your own account id and metadata, and publish the encrypted name, description and icon other members see.
- [Collaboration](/collaboration/index.html): How a space gets shared — members and roles, invites, ACL operations, direct one-to-one spaces, derived spaces and bundles.
- [Members and roles](/collaboration/members-and-roles.html): The authoritative per-space roster — who is in a space, with what permission and status — and the live member stream.
- [Invites](/collaboration/invites.html): Mint, share, list and revoke invite tokens; the request-to-join flow; public read-only guest keys.
- [ACL](/collaboration/acl.html): 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](/collaboration/one-to-one.html): Direct spaces between two identities, derived from both account keys — no invite, no owner — with a device-local accept/decline gate.
- [Derived spaces](/collaboration/derived-spaces.html): 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](/collaboration/bundles.html): 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.
- [Built-in types](/types/index.html): The CRDT data types any ships with — chat, editor blocks, the page marker — and the any:// link grammar that ties records together.
- [Chat](/types/chat.html): The built-in messenger CRDT — sending, editing, reacting, mentions, and account-private read tracking on the chat_messages dataset.
- [Editor](/types/editor.html): Block-structured documents on the editor_blocks dataset — atomic block writes, live subscriptions, and a lossless markdown bridge for imports, exports and LLM edits.
- [Page](/types/page.html): The built-in page marker type — how a document is declared, what fields it is made of, and how to list and file pages.
- [Links](/types/links.html): The canonical any:// link grammar — one self-describing URI for objects, dataset records, mentions, spaces, property values and files.
- [Files](/files/index.html): Files as space data — encrypted, synced and access-controlled like every other record, with local-first storage tiers and background network backup.
- [Uploading](/files/uploading.html): 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](/files/downloading.html): 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](/files/status-and-durability.html): 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](/files/cache.html): 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](/files/deleting.html): 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](/search/index.html): A local BM25 + vector search index over every space, built from the change feed and queried through one endpoint.
- [Full-text search](/search/full-text.html): The BM25 lexical leg — always on, no external dependency, with phrase, prefix, require and exclude operators.
- [Vector search](/search/vector.html): The semantic leg — embeddings computed on-device, an ANN index per space, and what the similarity scores do and don't mean.
- [Hybrid ranking](/search/hybrid.html): The default mode fuses the lexical and semantic legs by reciprocal rank, degrades gracefully, and tells you what actually ran.
- [How indexing works](/search/indexing.html): Chunkers turn dataset records into index documents; the indexer consumes the change feed, evicts what disappears, and never blocks a write.
- [Embedders](/search/embedders.html): The five index.embedder settings — auto, local, ollama, openai, none — their prerequisites, and what happens when one is unreachable.
- [Evaluation](/search/evaluation.html): What was measured — chunk sizes, BEIR benchmarks, ANN index modes, the similarity floor — and why the defaults are what they are.
- [Notifications](/notifications/index.html): 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](/notifications/push.html): End-to-end-encrypted mobile push for chat — how the sender pushes, the topic vocabulary, notifyMode settings, the keys receivers cache, and configuration.
- [Processes](/notifications/processes.html): 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](/programs/index.html): Sandboxed Python that runs next to your data — every side effect recorded, every run replayable bit-exact.
- [Effects](/programs/effects.html): 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](/programs/writing-a-program.html): File layout, the docstring convention, tool declaration with @span, result-shape rules and the import allowlist.
- [Modules and overlays](/programs/modules-and-overlays.html): 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](/programs/traces-and-replay.html): The append-only JSONL run log — record kinds, canonical keys, spans, blob spills — and the strict and loose replay modes built on it.
- [Credentials](/programs/credentials.html): Secret refs, host-side header injection, device-local storage, and OAuth grants whose tokens guest code never holds.
- [Testing](/programs/testing.html): Run program sources under the real guest kernel with only the effect boundary faked, plus one-shot runs and golden replay.
- [Limits](/programs/limits.html): Fuel, wall-clock deadlines and memory caps — how each is enforced in the wasm cage, what a program sees when it hits one, and how to stay under.
- [Scheduling](/scheduling/index.html): Triggers are CRDT records — cron, one-shot and event definitions that fire programs on the device that owns them.
- [Cron](/scheduling/cron.html): Recurring triggers — cron expressions or a fixed interval, armed strictly forward so a missed occurrence never replays.
- [Once](/scheduling/once.html): One-shot triggers for reminders and delayed work — fire at a time, then self-disable and remain as the audit trail.
- [Event triggers](/scheduling/event-triggers.html): The event kind — reserved in the trigger shape today, with a proposed design that fires programs on new chat messages and makes the chat responder itself a trigger.
- [Device pins](/scheduling/device-pins.html): Which of your devices runs a trigger — the owner field, adoption and eviction, and the active-instance election that assigns unowned records.
- [Runs and monitoring](/scheduling/runs-and-monitoring.html): The run log, the per-trigger rollup, the circuit breaker, health markers for inert definitions, and the agent's loopback control API.
- [Agents](/agents/index.html): 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](/agents/conversations.html): How one chat message becomes one replayable run — the neutral message model, the single run_cell tool, digests, ceilings, and steering a live run.
- [Tools](/agents/tools.html): 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](/agents/memory.html): A small, high-signal memory store with dedup on save, topical auto-recall on every turn, hierarchical history rollups, and background maintenance jobs.
- [Subagents](/agents/subagents.html): 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](/agents/connectors.html): 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](/agents/agent-data.html): Every dataset the agent owns — turns, chunks, memory, config, secrets, triggers — declared as runtime datasets on derived objects in the user's space, and readable with the ordinary query surface.
- [Progress and UI](/agents/progress-and-ui.html): 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](/agents/embedding-anyrt.html): 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](/operations/index.html): Running the any server — lifecycle, configuration, the data directory, networks, the security model, release builds and debugging.
- [Server](/operations/server.html): How any run boots, what it serves during the background boot pass, how it shuts down, and the per-account single-instance lock.
- [Configuration](/operations/configuration.html): Config file, environment variables and flags — their precedence, and a reference of every key.
- [Data directory](/operations/data-dir.html): The per-account layout under the data root, who owns each subdirectory, and what is safe to delete, copy or back up.
- [Networks](/operations/networks.html): 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](/operations/security-model.html): Loopback is the process boundary, end-to-end encryption is the data boundary — what each protects, what the CORS allowlist is for, and what is deferred.
- [Builds and CI](/operations/builds-and-ci.html): Building the server with the search legs compiled in, the nix dev shell, and the release artifacts — desktop tarballs, the Android .aar and the iOS .xcframework.
- [Debugging](/operations/debugging.html): 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](/testing/index.html): 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](/testing/any-e2e.html): The server's test layout — unit tests behind build tags, the real-binary e2e suite, the two-peer harness, and which tests are gated on external infrastructure.
- [anybao harness](/testing/anybao-harness.html): 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](/reference/index.html): Exhaustive catalogs of the any server and anyrt runtime surfaces — endpoints, commands, streams, error codes, config keys, effects and schemas.
- [HTTP API](/reference/http-api.html): 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](/reference/cli.html): Every any command group with its flags — a thin HTTP client over the local server, one command per endpoint, JSON on stdout.
- [SSE streams](/reference/events.html): Every Server-Sent Events stream the server exposes, its frame set, and the shared set of terminal close reasons.
- [Errors](/reference/errors.html): The one error envelope every non-2xx response uses, the HTTP status rules, and the full dotted error-code namespace.
- [Server configuration](/reference/config.html): Every any server config key with its env var, flag, default and precedence — data dir, listen address, network, index, files, push, logging.
- [anyrt CLI](/reference/anyrt-cli.html): Every anyrt subcommand and flag — run one program, serve the agent, deploy a repo, inspect traces, check API drift.
- [Effects catalog](/reference/effects-catalog.html): The complete host syscall surface a program can reach from inside the sandbox — every effect, its kind, the capability it needs, and what it returns.
- [Trigger schema](/reference/trigger-schema.html): The agent_trigger record — every field, the three kinds and their spec shapes, the trigger_runs dataset, and the control-plane routes that write through to it.
- [anybao.toml](/reference/anybao-toml.html): Every key of the anyrt host config file — server address, working space, overlays with invites, trace path, and the guest-visible config layer.
- [Glossary](/reference/glossary.html): 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.
- [Roadmap](/roadmap.html): What any ships today, what is planned next, and the open questions still being decided — in user-facing terms.