How A Run Works

  1. Resolve bundle - resolveExecutionBundle loads the skill version, model, rendered composition, and tools (runPrompt.ts).
  2. Create run - insert ai_runs with input_snapshot, status: running, and provider/model ids.
  3. Execute - provider calls and optional tool steps; significant events log ai_run_steps (tool_call, final_response).
  4. Validate - output is checked against the output schema; validation and diagnostics are collected.
  5. Complete - update output_snapshot, token usage, status, and return the response payload.

HTTP POST /api/skills/:id/run wraps runPrompt and returns skillRunResponseSchema.

See also

Was this page helpful?