Skip to main content

Request Lifecycle

This page explains what happens after you invoke a snippet.

End-to-end lifecycle

flowchart LR
A[Client or MCP invoke] --> B[Control-plane API]
B --> C[Auth + tenant + scope checks]
C --> D[Scheduler resolves snippet version and environment]
D --> E[Dispatch to Bun or Python executor]
E --> F[Snippet runs with injected context and libraries]
F --> G[Result returned sync, async, or stream]

Why this architecture matters

  • policy and tenancy are centralized in control-plane
  • execution stays isolated in runtime services
  • one invoke API supports multiple execution modes

Mode-specific behavior

  • sync: waits for result
  • async: queues work and returns early
  • stream: returns incremental events