How to Use Sequential Workflow Agent Teams
Create the tools, agents, and tasks for each stage, define task dependencies, list agent-task pairs in workflow order, and run prompts against the team.
- Grant the required privileges. The database user must have
EXECUTEprivilege onDBMS_CLOUD_AI_AGENT, access to required credentials, and the required network ACLs for external provider calls. See Prerequisites for Using Select AI Agent for more information. - Create the tools used by each workflow stage, such as PL/SQL functions or built-in SQL, RAG, web search, or notification tools. See Example: Create Built-In Tools for more information.
- Create the agents and tasks. Keep each task focused on one workflow stage and configure the tools available to that task. See Example: Create a Task for more information.
- Define task dependencies. On a downstream task, use the
inputattribute to name the upstream task whose result it consumes. See CREATE_TASK Procedure for more information. - Create the team with
processset tosequential, and list the agent-task pairs in the required run order. See CREATE_TEAM Procedure for more information. - Set the team for the session or call
DBMS_CLOUD_AI_AGENT.RUN_TEAM, and then submit a natural-language prompt. See SET_TEAM Function for more information. - Review team, task, tool, and conversation history to confirm ordered runs, handoffs, failures, and human-input wait states. See Example: View Agent Prompts and Responses from the Latest Team Run for more information.
For example:
BEGIN
DBMS_CLOUD_AI_AGENT.create_team(
team_name => 'Ops_Issues_Solution_Team',
attributes => '{"agents": [{"name":"Data_Engineer","task" : "fetch_logs_task"},
{"name":"Ops_Manager","task" : "analyze_log_task"}],
"process": "sequential"
}');
END;
Note: The agents array defines the workflow plan. Reorder the array to change the run sequence. To pass the fetch result to the analysis task, define "input": "FETCH_LOGS_TASK" on ANALYZE_LOG_TASK.