Reboot Framework

website·Indexed 32 days ago

https://docs.reboot.dev

A framework for building applications with durable state, transactions, and workflows. It supports Python and TypeScript backends and provides generated clients for React and React Native. Reboot features built-in OAuth 2.1, support for MCP clients (ChatGPT, Claude, VS Code, Goose), and tools for managing long-running operations, side-effects, and asynchronous tasks.

Tokens
50K
Snippets
250
Records
345
Agent score
48%

What's inside Reboot

  1. Overview of Ciphertext envelope encryption

    The library implements application-layer envelope encryption using three layers of keys to provide encryption at rest, crypto-shredding, and cheap rotation:

    1. Root KEK: Derived from the REBOOT_CRYPTO_ROOT_KEYS environment variable; never stored.
    2. WrappingKey: A random 256-bit key stored encrypted under the root KEK. This is the revocable unit tied to a specific scope.
    3. DEK (Data Encryption Key): A random per-value key used to encrypt the actual plaintext. The DEK is wrapped (encrypted) by the WrappingKey.

    This architecture ensures that a leaked database backup is inert without the root keys, and that data can be permanently deleted (crypto-shredded) by destroying a single wrapping key without needing to rewrite the encrypted data.

  2. Overview of Reboot OAuth Providers

    An OAuth provider in Reboot defines how the system identifies users. You pass a provider instance to OAuth(provider=...). Because each provider issues unique IDs, switching providers after you have production users will strand user-keyed state. For flexibility with multiple sign-in methods or user management, it is recommended to use a broker like Auth0 or Ory.

    Available providers in reboot.aio.auth.oauth_providers:

    • Development(): For local development; shows a fake account picker.
    • Anonymous(): No sign-in; every visitor is a new user.
    • Google(...): Sign-in via Google.
    • GitHub(...): Sign-in via GitHub.
    • Auth0(...): Broker for multiple sign-in methods and user management.
    • Ory(...): Broker for multiple sign-in methods via Ory Network or self-hosted Ory.
  3. Overview of Reboot Third-Party Integrations

    Reboot integrations provide APIs to interact with third-party services. These interactions are isolated as side-effects, ensuring they compose safely and handle partial failures or retries without compromising system integrity. Currently supported integrations include:

    • Mailgun: Supports sending email messages using the Mailgun API.
  4. Overview of the rbt CLI

    rbt is the command line tool for Reboot. It is bundled with the Reboot library rather than installed as a standalone package. Commands read their configuration flags from an .rbtrc file to minimize the need for manual flag entry. To see the full list of flags for any command, append the --help flag.
  5. Overview of Reboot's Pydantic AI agent integration

    The reboot.agents package allows Pydantic AI agents to run inside Reboot workflows with durable, replay-safe execution. Key benefits include:

    • Model Call Memoization: Every request or request_stream is memoized via at_least_once. On workflow replay, the stored ModelResponse is returned instead of re-calling the LLM provider.
    • Tool Call Memoization: All tools (registered via @agent.tool, tools=, or toolsets=) are memoized to prevent repeated side effects during replay. Tools do re-run during effect validation to surface non-determinism.
    • Streaming Handling: Streaming runs are drained inside a memoized block. The StreamedRunResult is backed by a stored response; iteration replays stored events rather than re-streaming from the provider.
    • Configuration Drift Detection: A snapshot of static config and per-call kwargs is taken at the start of each run. Changes in instructions, system prompts, models, or tools on replay trigger a log warning.
  6. Overview of Reboot feature files

    Reboot applications use Gherkin .feature files located in the tests/ directory to define application behavior. These files serve three purposes:

    1. Specification: A shared agreement between developers and coding agents.
    2. Tests: Executable scenarios run by pytest using built-in steps.
    3. Documentation: Visualized in the developer dashboard's Features page, showing rules, scenarios, and exercised methods.
  7. Overview of Reboot Standard Library services

    Reboot provides a standard library of data structures and APIs for common tasks. Available libraries include:

    • Ciphertext: Envelope encryption with a revocable wrapping key for encrypting values at rest and crypto-shredding via key destruction.
    • OAuth Token Manager: An encrypted, per-service store for user OAuth tokens to facilitate external service calls.
    • PubSub: Implementation for subscribing to and broadcasting to topics.
    • Queue: A durable queue for enqueuing and dequeuing items.
    • OrderedMap: A recommended implementation of a collection/dictionary/map that can exceed memory size.
    • SortedMap: An older implementation of a collection/dictionary/map that can exceed memory size and maps efficiently to Reboot's underlying storage.
  8. Overview of the Reboot framework

    Reboot is a full-stack framework designed to provide a rock-solid foundation for AI-assisted development. It eliminates common classes of bugs (such as concurrency and retry issues) by enforcing backend safety and data encapsulation at the framework level. Key features include durable state (automatic saving of state upon function return), reactive frontends, and integrated user authentication.
  9. Overview of Reboot frontend options

    A Reboot backend provides a unified interface where the same types, methods, and durable state are accessible regardless of the client type. Supported frontends include:

    • Web: A React application running in the browser.
    • React Native: A mobile app for iOS and Android (currently in alpha) using the same generated hooks as the web app.
    • MCP UI: Methods exposed as MCP tools with React components rendered within AI interfaces like ChatGPT, Claude, or VS Code.
    • AI Agents: External agents connecting via MCP, or internal Pydantic AI agents running within workflows.
    • Services: Direct calls from other scripts, backend code, or via HTTP (including custom HTTP routes for webhooks).
  10. Overview of the Item data type

    The Item is a generic data type used to pass and retrieve data from Reboot standard libraries (such as enqueuing and dequeuing from Queues). It serves as a convenience type for marshalling and unmarshalling data rather than a standalone library. It supports three data formats:

    • Value: Represents dynamically typed data (JSON-like), including nulls, numbers, strings, booleans, recursive structs, or lists.
    • bytes: Stores a raw string of bytes.
    • Any: Wraps a protobuf message.
  11. Understand Reboot default authorization permissions

    Reboot provides built-in default authorization rules to secure state types before a custom authorizer is written:

    • User methods: Callable only by the specific user they belong to, or by internal application code.
    • All other state types: Callable only by internal application code. Any external call is denied by default.

    In development mode (rbt dev run), calls to types without an authorizer() are allowed (with a warning) to facilitate rapid building, but these are strictly denied in production (rbt serve or Reboot Cloud).

  12. Understand Reboot durable data structures

    Reboot allows developers to build applications using 'durable data structures'. You define data types and methods (readers, writers, transactions, workflows, or UI methods) that behave like in-memory data structures but are automatically persisted when updated.