Run a workflow definition (workflow engine)
Workflow engine: run a workflow definition of steps (asks, branches, loops, parallel steps, checks) with an input, using the answers known so far, and say where it finished or which steps are waiting for an answer
Give definitions (workflow-core definitions: id, name, kind "workflow", is_active, version, steps [{id, kind, config}], edges [{from, to, kind}]), the workflow_id to run, its input and answers keyed by step id (an ask's config.context.step_id) or ask name. Returns the run (status completed, failed or paused, each step's output) and waiting: the asks with no answer yet, each with the input the engine gave it. Call again with those answers added and the run goes on from there.
What it asks for
- definitions (Needed, list): Every definition the run may reach
- workflow_id (Needed, words):
- input (Optional, value):
- answers (Optional, details): Answers so far, by step id or ask name
- partition (Optional, words):
Use it from your AI
Connect the AI you already use to Trillion once. Then ask in your own words; your AI finds this tool by what it does and runs it.
Say to your AI: “Use Trillion to workflow engine: run a workflow definition of steps (asks, branches, loops, parallel steps, checks) with an input, using the answers known so far, and say where it finished or which steps are waiting for an answer”
What your AI calls: run_tool {"tool_id":"tool:run-workflow-definition"}