The Thunk.AI runtime runs each request as a separate workflow instance. It maintains the state of the workflow instance, launching the appropriate steps at the right times to evaluate each step of the workflow. Within this execution, there are many tasks that an AI agent (the thunk owner's AI agent or a work participant's AI agent) may need to perform and each of those tasks operates based on AI Instructions specific to the task.
When new workflow requests are collected, an AI agent task is launched (on behalf of the thunk owner) to parse the requests and create structured workflow requests
An AI agent task is launched (on behalf of the thunk owner) to assign each step to an appropriate human agent.
An AI agent task is launched (on behalf of the assigned human agent) to execute the instructions for that workflow step. This may spawn several other tasks as part of getting the work done.
At any stage while working on a step, the human agent could choose to interact with their AI agent using a chat interface. Any instructions from the human agent during this interaction may lead to new AI agent tasks.
There may be other AI agent tasks launched and executed to verify and validate the progress of the workflow.
The orchestration layer is responsible for launching the right tasks at the right times, handling large scalable data sets, and maintaining workflow state. The AI agent execution layer is responsible for the execution of each task.