How A Run Works
- Resolve bundle -
resolveExecutionBundleloads the skill version, model, rendered composition, and tools (runPrompt.ts). - Create run - insert
ai_runswithinput_snapshot,status: running, and provider/model ids. - Execute - provider calls and optional tool steps; significant events log
ai_run_steps(tool_call,final_response). - Validate - output is checked against the output schema; validation and diagnostics are collected.
- Complete - update
output_snapshot, token usage, status, and return the response payload.
HTTP POST /api/skills/:id/run wraps runPrompt and returns skillRunResponseSchema.