Getting Started with Select AI Agent
To use Select AI Agent, complete the prerequisites and create the
agent objects that the framework uses at run time. Select AI Agent provides procedures to
create agents, tools, tasks, and teams, and you can run a team either with the Select AI
agent action or with DBMS_CLOUD_AI_AGENT.RUN_TEAM.
Use the following order to create and run a Select AI agent team.
-
Complete prerequisites
Review the Select AI prerequisites and the Select AI Agent prerequisites before you configure agent objects. See Prerequisites for Using Select AI Agent for more information.
-
Create PL/SQL functions
Create any PL/SQL functions that your custom tools can call. Select AI Agent tools can use custom PL/SQL functions or built-in tool types such as
SQL,RAG,WEBSEARCH, orNOTIFICATION. See Example: Create a Product Return Agent for more information. -
Create an agent
Use
DBMS_CLOUD_AI_AGENT.CREATE_AGENTto create the agent that performs the work. Define the agent name, specify the AI profile that the agent uses, and provide the role instructions that guide the agent's behavior. See Example: Create an Agent for more information. -
Create tools
Use
DBMS_CLOUD_AI_AGENT.CREATE_TOOLto register the tools that the agent can call. A tool defines what the agent can do during task processing, such as calling a PL/SQL function or using a built-in capability. See Example: Create Built-In Tools for more information. -
Create tasks
Use
DBMS_CLOUD_AI_AGENT.CREATE_TASKto define the task instructions for the agent. A task specifies the instructions the agent follows and the tools available for that task. See Example: Create a Task for more information. -
Create a team
Use
DBMS_CLOUD_AI_AGENT.CREATE_TEAMto associate one or more agents with their tasks and set the process type for the workflow. A team defines how the agent-task pairs work together to accomplish the request. See Example: Create an Agent Team for more information. -
Run the team
Run the Select AI agent team by using either of the following methods:
-
Use the Select AI action:
SELECT AI agentprompt. -
Call
DBMS_CLOUD_AI_AGENT.RUN_TEAMand provide the prompt and other parameters in the function call.
Both methods route the prompt to the selected agent team and return the team's reply. See How Do I Use Select AI Agent and Example: Create a Movie Analysis Agent with Built-In Tools for more information.
-
-
Review agent history and logs for troubleshooting
After you run the team, review the Select AI Agent views and history views for troubleshooting and diagnostics. Use the
DBMS_CLOUD_AI_AGENTviews to inspect agents, tools, tasks, teams, and execution history. See DBMS_CLOUD_AI_AGENT Views for more information. To investigate a recent run, query history and conversation views such asUSER_AI_AGENT_TEAM_HISTORY,USER_AI_AGENT_TASK_HISTORY, andUSER_CLOUD_AI_CONVERSATION_PROMPTSto review team runs, task runs, prompts, responses, and agent thoughts. See Example: View Agent Prompts and Responses from the Latest Team Run for more information.
Parent topic: Select AI Agent