Every thunk represents a workflow that models a business process as a sequence of steps. The workflow is defined and modeled in the design environment. Later, at runtime, each workflow request will run as a separate workflow instance following the sequence of steps in the plan.
For example, the snapshot below shows the workflow plan for a thunk that automates the process of approving expense receipts. It has three steps that form the workflow plan definition.
There is nothing particularly “AI” about this linear sequence of steps acting on an input request. It is intentionally a deterministic and dependable sequence of steps. However, the logic of each step itself is described in a flexible way so that an AI agent can intelligently interpret the logic at runtime in order to execute the step. The representiation of the steps and their descriptions is collectively called a “Workflow Plan”.
When a thunk owner creates a new thunk, they provide initial high-level planning instructions. Guided by these instructions, their AI planning agent builds out a workflow plan that has a sequence of steps to execute the process. While the AI planning assistant automates the creation of the workflow plan, the thunk owner can always change any aspect of the plan.
AI Instructions
Typically, the thunk owner, with the help of the planning AI agent, refines the descriptions of the logic to run for each step in the plan. We called these logic descriptions "AI Instructions". The AI Instructions are the primary "programming logic" representation for AI in the platform..
Output Data
Each workflow instance may be long-running -- it may involve multiple steps, it might have to wait for humans to engage, it may have to handoff work from one person to another person (or their AI agent). As a result, each workflow instance maintains state to capture the progress of the work between steps. This structured state definition is also part of the workflow plan. While the initial state is defined automatically as part of workflow planning, the thunk owner can modify and refine the state definition as described in the section on Workflow State.
Human-In-the-loop Settings
As described in the section on Users and Access Controls, there can be many users registered with a thunk as “human agents”. Every step of the workflow plan can define how individual instances of the step should be assigned to specific human agents. For example, in the example thunk that implements an expense receipt approval process, the second step doing currency conversion could specify: “This step should be assigned to Tony or Galex”. The step could also specify if it can start and finish automatically without explicit approval from the human agent.