# Lakebed Docs > Lakebed is an alpha-stage agent-native CLI and runtime for building small full-stack TypeScript apps called capsules. This file is an index. Find the section you need below, then fetch that one Markdown page. Every page fits in a single fetch. New to Lakebed? Read [the agent start guide](https://lakebed.dev/agents.md) first. It covers prerequisites, limits, and the steps to create, test, and deploy an app. ## Start here - [Lakebed Docs](https://docs.lakebed.dev/index.md): Capsule layout, server and client contracts, actions, auth and env basics, runtime inspection, deploy, custom domains, and current limits in one page. - [Start Here](https://docs.lakebed.dev/index.md#start-here) - [Server Contract](https://docs.lakebed.dev/index.md#server-contract) - [Client Contract](https://docs.lakebed.dev/index.md#client-contract) - [Actions](https://docs.lakebed.dev/index.md#actions) - [Auth And Env](https://docs.lakebed.dev/index.md#auth-and-env) - [Inspect The Runtime](https://docs.lakebed.dev/index.md#inspect-the-runtime) - [Deploy](https://docs.lakebed.dev/index.md#deploy) - [Current Limits](https://docs.lakebed.dev/index.md#current-limits) - [Read Next](https://docs.lakebed.dev/index.md#read-next) ## Build the app - [Capsule API](https://docs.lakebed.dev/capsule-api/index.md): How to write server and client code: define the capsule, handler capabilities, shared code, client hooks and router, error handling, endpoint responses, logging, actions, auth, server env, and types. - [File Layout](https://docs.lakebed.dev/capsule-api/index.md#file-layout) - [Define The Server](https://docs.lakebed.dev/capsule-api/index.md#define-the-server) - [Handler capabilities](https://docs.lakebed.dev/capsule-api/index.md#handler-capabilities) - [Use Shared Code Carefully](https://docs.lakebed.dev/capsule-api/index.md#use-shared-code-carefully) - [Build The Client](https://docs.lakebed.dev/capsule-api/index.md#build-the-client) - [Handle client errors](https://docs.lakebed.dev/capsule-api/index.md#handle-client-errors) - [Return endpoint responses](https://docs.lakebed.dev/capsule-api/index.md#return-endpoint-responses) - [Log from server handlers](https://docs.lakebed.dev/capsule-api/index.md#log-from-server-handlers) - [Run actions](https://docs.lakebed.dev/capsule-api/index.md#run-actions) - [Expose handlers to browser agents](https://docs.lakebed.dev/capsule-api/index.md#expose-handlers-to-browser-agents) - [Auth](https://docs.lakebed.dev/capsule-api/index.md#auth) - [Server Env](https://docs.lakebed.dev/capsule-api/index.md#server-env) - [Types](https://docs.lakebed.dev/capsule-api/index.md#types) - [Run And Inspect](https://docs.lakebed.dev/capsule-api/index.md#run-and-inspect) - [Deploy](https://docs.lakebed.dev/capsule-api/index.md#deploy) - [Capsule Database](https://docs.lakebed.dev/database/index.md): Database API v1: indexes, field types, optional fields, sort rules, collect versus paginate, dashboard counts, relationships, user references, and consistency. - [Indexes](https://docs.lakebed.dev/database/index.md#indexes) - [Field types](https://docs.lakebed.dev/database/index.md#field-types) - [Collect or paginate](https://docs.lakebed.dev/database/index.md#collect-or-paginate) - [Pagination](https://docs.lakebed.dev/database/index.md#pagination) - [Dashboard counts](https://docs.lakebed.dev/database/index.md#dashboard-counts) - [Relationships](https://docs.lakebed.dev/database/index.md#relationships) - [User references](https://docs.lakebed.dev/database/index.md#user-references) - [Consistency](https://docs.lakebed.dev/database/index.md#consistency) - [Migrating Legacy Code](https://docs.lakebed.dev/database/index.md#migrating-legacy-code) - [Identity and authentication](https://docs.lakebed.dev/auth/index.md): Guest and Google sign-in identity: requireIdentity and requireSignedIn, custom endpoint credentials, requireSignIn apps, userId references, guest upgrades, profile data, local test identities, and restricted apps. - [Guest and signed-in users](https://docs.lakebed.dev/auth/index.md#guest-and-signed-in-users) - [Require an identity](https://docs.lakebed.dev/auth/index.md#require-an-identity) - [Custom endpoint credentials](https://docs.lakebed.dev/auth/index.md#custom-endpoint-credentials) - [Require sign-in for the app](https://docs.lakebed.dev/auth/index.md#require-sign-in-for-the-app) - [User references and guest upgrades](https://docs.lakebed.dev/auth/index.md#user-references-and-guest-upgrades) - [Signed-in identity and profile data](https://docs.lakebed.dev/auth/index.md#signed-in-identity-and-profile-data) - [Local development](https://docs.lakebed.dev/auth/index.md#local-development) - [Upgrade an existing capsule](https://docs.lakebed.dev/auth/index.md#upgrade-an-existing-capsule) - [Restricted apps and lakebed users](https://docs.lakebed.dev/auth/index.md#restricted-apps-and-lakebed-users) - [Object storage](https://docs.lakebed.dev/storage/index.md): Built-in object storage for user uploads: client upload and delete, reading objects, HTTP routes, blocked file types, moderation, limits, errors, and a profile picture example. - [Upload and delete from the client](https://docs.lakebed.dev/storage/index.md#upload-and-delete-from-the-client) - [Read stored objects](https://docs.lakebed.dev/storage/index.md#read-stored-objects) - [HTTP routes](https://docs.lakebed.dev/storage/index.md#http-routes) - [Authentication and safety](https://docs.lakebed.dev/storage/index.md#authentication-and-safety) - [Blocked file types](https://docs.lakebed.dev/storage/index.md#blocked-file-types) - [Developer dashboard and moderation](https://docs.lakebed.dev/storage/index.md#developer-dashboard-and-moderation) - [Limits](https://docs.lakebed.dev/storage/index.md#limits) - [Errors](https://docs.lakebed.dev/storage/index.md#errors) - [Example: Profile picture](https://docs.lakebed.dev/storage/index.md#example-profile-picture) - [Local development](https://docs.lakebed.dev/storage/index.md#local-development) - [Not included](https://docs.lakebed.dev/storage/index.md#not-included) - [From the CLI](https://docs.lakebed.dev/storage/index.md#from-the-cli) - [Browser agent tools (WebMCP)](https://docs.lakebed.dev/agent-tools/index.md): Experimental WebMCP support: tag queries, mutations, and actions as browser agent tools, tool arguments, auth, input checks, descriptions, and inspection. - [Tag a handler](https://docs.lakebed.dev/agent-tools/index.md#tag-a-handler) - [Arguments](https://docs.lakebed.dev/agent-tools/index.md#arguments) - [How a tool call runs](https://docs.lakebed.dev/agent-tools/index.md#how-a-tool-call-runs) - [Write descriptions for an agent](https://docs.lakebed.dev/agent-tools/index.md#write-descriptions-for-an-agent) - [Inspect tools](https://docs.lakebed.dev/agent-tools/index.md#inspect-tools) ## Ship and operate - [Limits](https://docs.lakebed.dev/limits/index.md): Free-plan resource limits for requests, database reads and writes, actions, storage, logs, and server env, the quota errors they raise, and how to check usage. - [Default limits](https://docs.lakebed.dev/limits/index.md#default-limits) - [Reading a quota error](https://docs.lakebed.dev/limits/index.md#reading-a-quota-error) - [Checking usage](https://docs.lakebed.dev/limits/index.md#checking-usage) - [Notes](https://docs.lakebed.dev/limits/index.md#notes) - [Lakebed Reference](https://docs.lakebed.dev/reference/index.md): Quick contract for every capsule surface: module boundaries, server, data, endpoint, and client APIs, CLI commands, env, styling, inspection, deploy behavior, and custom domains. - [Capsule](https://docs.lakebed.dev/reference/index.md#capsule) - [Module Boundaries](https://docs.lakebed.dev/reference/index.md#module-boundaries) - [Server API](https://docs.lakebed.dev/reference/index.md#server-api) - [Data API](https://docs.lakebed.dev/reference/index.md#data-api) - [External Endpoints](https://docs.lakebed.dev/reference/index.md#external-endpoints) - [Client API](https://docs.lakebed.dev/reference/index.md#client-api) - [Actions](https://docs.lakebed.dev/reference/index.md#actions) - [Auth](https://docs.lakebed.dev/reference/index.md#auth) - [Server Env](https://docs.lakebed.dev/reference/index.md#server-env) - [Styling](https://docs.lakebed.dev/reference/index.md#styling) - [Runtime Inspection](https://docs.lakebed.dev/reference/index.md#runtime-inspection) - [CLI](https://docs.lakebed.dev/reference/index.md#cli) - [Build behavior](https://docs.lakebed.dev/reference/index.md#build-behavior) - [Deploy Behavior](https://docs.lakebed.dev/reference/index.md#deploy-behavior) - [Custom Domains](https://docs.lakebed.dev/reference/index.md#custom-domains) - [Support contract](https://docs.lakebed.dev/support/index.md): Free-only offer, supported Node and OS versions, public APIs, artifact compatibility, optimistic updates, persistence, and support routes. - [Offer and limits](https://docs.lakebed.dev/support/index.md#offer-and-limits) - [CLI platforms](https://docs.lakebed.dev/support/index.md#cli-platforms) - [Public app API](https://docs.lakebed.dev/support/index.md#public-app-api) - [SDK and artifact compatibility](https://docs.lakebed.dev/support/index.md#sdk-and-artifact-compatibility) - [Optimistic updates](https://docs.lakebed.dev/support/index.md#optimistic-updates) - [Persistence and deletion](https://docs.lakebed.dev/support/index.md#persistence-and-deletion) - [Support and policies](https://docs.lakebed.dev/support/index.md#support-and-policies) ## Upgrade older capsules - [Database API v1 Migration Guide](https://docs.lakebed.dev/database-migration/index.md): Upgrade an older capsule from the synchronous full-scan database API to async database API v1, with an agent migration prompt. - [Syntax Changes](https://docs.lakebed.dev/database-migration/index.md#syntax-changes) - [Designing Indexes](https://docs.lakebed.dev/database-migration/index.md#designing-indexes) - [Pagination](https://docs.lakebed.dev/database-migration/index.md#pagination) - [Data And Deployment](https://docs.lakebed.dev/database-migration/index.md#data-and-deployment) - [Guest identities and stored user IDs](https://docs.lakebed.dev/database-migration/index.md#guest-identities-and-stored-user-ids) - [Agent Migration Prompt](https://docs.lakebed.dev/database-migration/index.md#agent-migration-prompt) ## Examples - [Lakebed Examples](https://docs.lakebed.dev/examples/index.md): Complete example capsules that show the file layout and patterns an app-building agent should copy. - [What To Copy](https://docs.lakebed.dev/examples/index.md#what-to-copy) - [Examples](https://docs.lakebed.dev/examples/index.md#examples) - [Todo Example](https://docs.lakebed.dev/examples/todo/index.md): Personal todo lists per guest or account, with ownership checks and Google sign-in that keeps the list. - [What It Shows](https://docs.lakebed.dev/examples/todo/index.md#what-it-shows) - [Server Pattern](https://docs.lakebed.dev/examples/todo/index.md#server-pattern) - [Run It](https://docs.lakebed.dev/examples/todo/index.md#run-it) - [Guestbook Example](https://docs.lakebed.dev/examples/guestbook/index.md): An intentionally shared feed that guests and signed-in users can both post to and read. - [What It Shows](https://docs.lakebed.dev/examples/guestbook/index.md#what-it-shows) - [Server Pattern](https://docs.lakebed.dev/examples/guestbook/index.md#server-pattern) - [Run It](https://docs.lakebed.dev/examples/guestbook/index.md#run-it) ## Other formats - [Page index as JSON](https://docs.lakebed.dev/docs.json): page URLs, descriptions, and heading anchors for tools. - [Full docs in one file](https://docs.lakebed.dev/llms-full.txt): every page concatenated, about 155 KB. Most fetch tools truncate it. Prefer the per-page links above.