Building Tools, Tasks, Agents, and Teams
Agentic AI for Oracle AI Database Professional · Lesson 15 of 20 · 1:47:38
YouTube loads only after you press play. This chapter opens at its timestamp in the full course. Watch on YouTube ↗
Learning with these videos? Subscribe for new courses and exam-style questions.
Subscribe on YouTube (opens in a new tab)In this lesson
Prepare for the Agentic AI for Oracle AI Database Professional exam (1Z0-1159-26). In this lesson: the build order, custom and built-in tools (SQL, RAG, notification, web search) with CREATE_TOOL, tasks and agents with CREATE_TASK and CREATE_AGENT, and teams with CREATE_TEAM. Follows Ambergate Appliances, a fictional appliance maker. Includes three original practice questions.
Study notes
The text of this lesson, to read at your own pace. Information as of November 2026.
From function to team
Ambergate already has a PL/SQL function that checks the warranty for a serial number. Now the team must turn it into a tool, give it to a returns agent with a clear task, and put that agent in a team. This lesson covers the build order, tools, tasks and agents, and teams and their management.
The build order
Building an agent follows an order. First, write the PL/SQL functions that the tools will call. Then create the agent, the tools, the tasks, and finally the team, with procedures of DBMS_CLOUD_AI_AGENT. Each object has a name, and a JSON document of attributes.
Tools
CREATE_TOOL creates a tool. A custom tool has an instruction that tells the agent when to use it, the PL/SQL function it calls, and descriptions of its inputs. A built-in tool sets a tool type instead: SQL, which uses Select AI to turn a request into SQL, or RAG, both with an AI profile. Notification sends a message by Slack or email, with the details it needs, like a recipient and an SMTP host, and web search uses a credential. You can create several tools of the same type, each with different parameters.
Tasks and agents
CREATE_TASK creates a task, with an instruction that can include the query placeholder, replaced by the user's request, and the list of tools the task may use. Its enable human tool attribute lets the agent ask the user for input or confirmation, and the task's setting overrides the agent's. CREATE_AGENT needs two attributes: the AI profile, and the role, which describes the agent's job. The human tool is enabled by default, and short term memory keeps thirty messages by default. A supervisor attribute, false by default, marks a supervisor agent, and it cannot be changed after creation.
Teams and management
CREATE_TEAM creates a team, with its agents, each paired with a task. The process attribute is set to sequential for a fixed order, and the long term memory length is thirty by default. For the supervisor pattern, the team names its supervisor agent. Every object can be enabled, disabled, or dropped, with procedures like ENABLE_TEAM or DROP_TOOL. And helpers make the work easier: DESCRIBE_TOOL shows a tool, RUN_TOOL runs one on its own, and EXPORT_TEAM exports a team's definition.
Recap
Let's recap. Write the PL/SQL functions first, then create the agent, the tools, the tasks, and the team. A custom tool has an instruction, a function, and its inputs, while built-in tools cover SQL, RAG, notifications, and web search. A task has an instruction with the query placeholder, its tools, and an optional human tool that overrides the agent's. An agent needs an AI profile and a role, and its supervisor setting is fixed at creation. And a team pairs agents with tasks, while enable, disable, drop, and RUN_TOOL help manage and test.
Quick checks for this lesson
The 3 questions of this lesson, as plain text. The button above runs them with shuffled choices and the reason behind every choice.
Ambergate wants its agent to answer questions about the warranty tables in natural language, without writing any PL/SQL function. Which tool fits?
- A custom tool that calls a new function
- A built-in SQL tool, with a profile
- A WEBSEARCH tool, with a credential
- A NOTIFICATION tool, for emails
Show the answer
A built-in SQL tool, with a profile
A built-in SQL tool uses Select AI, through an AI profile, to turn each request into SQL on the tables. “A custom tool that calls a new function” means writing a new function, which the team wants to avoid. “A WEBSEARCH tool, with a credential” searches the web, not Ambergate's tables. And “A NOTIFICATION tool, for emails” sends messages, and it does not query anything.
Ambergate wants its returns agent to stop and ask the customer to confirm, before it emails a return label. What should the developer set?
- A longer short_term_memory_length
- supervisor set to true on the agent
- enable_human_tool on that task
- A WEBSEARCH tool added to the task
Show the answer
enable_human_tool on that task
The human tool lets the agent pause and ask the user, and the task's setting decides it for this task. “A longer short_term_memory_length” only keeps more recent messages in memory. “supervisor set to true on the agent” turns the agent into a supervisor of other agents, and it cannot be undone later. And “A WEBSEARCH tool added to the task” searches the web, which does not ask anyone anything.
A developer wants to check that the warranty tool returns the right result for one serial number, before building any team. What should it use?
- RUN_TOOL, with a serial number as input
- EXPORT_TEAM, on the returns team
- DESCRIBE_TOOL, on the warranty tool
- DISABLE_TOOL, then ENABLE_TOOL
Show the answer
RUN_TOOL, with a serial number as input
RUN_TOOL runs a tool on its own, with the inputs you give it, so you can check its result. “EXPORT_TEAM, on the returns team” exports a team's definition, and no team exists yet. “DESCRIBE_TOOL, on the warranty tool” describes the tool, but it does not run it. And “DISABLE_TOOL, then ENABLE_TOOL” only switches the tool off and on again.