Skip to content

Execution Engine

The Execution Engine automates code generation from recipes using AI model providers. Instead of manually exporting a recipe prompt and pasting it into an AI agent, you hand a generation run to the platform: it assembles the prompt from the recipe, invokes the model, streams progress, and packages the artifacts for download.

A generation run has four stages:

  1. Prompt Assembly – the platform gathers context from the recipe and assembles a structured prompt
  2. Model Invocation – the prompt is sent to the configured provider model on the platform side
  3. Streaming – progress and output stream back while the run executes
  4. Artifact Download – the generated code is packaged and downloaded
Terminal window
# Start a hosted generation run
ctxbrew generation create \
--project <project-id> \
--repo <repo-id> \
--commit <sha> \
--model claude-sonnet-4-20250514
Flag Description
--project <id> Project ID
--repo <id> Repository ID
--commit <sha> Commit SHA to generate against
--model <name> Model name (e.g. claude-sonnet-4-20250514)
--priority <n> Queue priority (1 = high, 10 = low)
--template <name> Prompt template name

Then follow the run:

Terminal window
ctxbrew generation list --project <project-id> # runs + costs
ctxbrew generation show <id> # run detail
ctxbrew generation stream <id> # live progress (SSE)
ctxbrew generation download <id> --format zip # fetch artifacts
ctxbrew generation cancel <id> # stop a running generation
ctxbrew generation retry <id> # re-run a failed generation

generation list reports runs alongside their costs, so spend is visible per run without a separate command.

Provider configuration is managed on the platform, not in a local config file. Inspect what’s available:

Terminal window
ctxbrew provider list # all configured providers
ctxbrew provider show <id> # one provider's detail
ctxbrew provider models <id> # the models a provider offers
ctxbrew provider health <id> # health check

Use provider models to pick a valid --model value for generation create.

Run the same work through two generations, then compare outputs side-by-side:

Terminal window
# Compare two completed runs
ctxbrew compare create --a <gen-id-a> --b <gen-id-b>
# Review the diff summary
ctxbrew compare show <comparison-id>
# Record a verdict
ctxbrew compare verdict <comparison-id> --verdict a # a, b, or tie

Comparisons list under ctxbrew compare list, so a team can see which outputs were preferred and by what verdict.

Terminal window
ctxbrew generation create # Start a generation run
ctxbrew generation list [--project <id>] # Runs + costs
ctxbrew generation show <id> # Run detail
ctxbrew generation stream <id> # Stream progress (SSE)
ctxbrew generation cancel <id> # Cancel a run
ctxbrew generation retry <id> # Retry a failed run
ctxbrew generation download <id> [--format] # Download artifacts (json|zip)
ctxbrew compare create --a <id> --b <id> # Compare two generations
ctxbrew compare verdict <id> --verdict a|b|tie # Record a verdict
ctxbrew provider list|show|models|health # Inspect providers