Cert EspressoLearn. Practise. Find your flow.

A LITTLE FOCUS.
A BIG NEXT STEP.

Your pace. Your space.
Oracle · Agentic AI for Oracle AI Database Professional

Running and Securing Agent Teams

Agentic AI for Oracle AI Database Professional · Lesson 16 of 20 · 1:52:51

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.

In this lesson

Prepare for the Agentic AI for Oracle AI Database Professional exam (1Z0-1159-26). In this lesson: running a team with SET_TEAM, SELECT AI agent, and RUN_TEAM, human in the loop, sequential and supervised teams, the agent views and history, and sharing with GRANT_TEAM_ACCESS. 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 built to running

Ambergate's returns team is built, and now the support app must run it, across conversations of several turns. Managers want to see what each agent did, and the warranty department, in another schema, must use the team without changing it. This lesson covers running a team, sequential and supervised teams, watching agents, and sharing and security.

Running a team

There are two ways to run a team. SET_TEAM sets the team for the session, and then select AI agent, followed by the prompt, runs it. Or RUN_TEAM takes the team name, the user prompt, and parameters, like a conversation ID that links the turns of one conversation. When a task waits for the user, its state is waiting for human, and calling RUN_TEAM again, with the user's reply and the same conversation ID, resumes the task.

Sequential and supervised

In a sequential team, agent and task pairs run in a fixed order, and each task can read the results of the earlier ones. In a supervised team, a supervisor agent, created with supervisor set to true, decides at run time which worker and task to run. It hands out one subtask at a time, evaluates each result, and then answers. The supervisor is named in the team, and it is not listed among the workers.

Watching agents

Data dictionary views show the agents and what they did. Views like USER_AI_AGENTS and USER_AI_AGENT_TEAMS list the objects, and attributes views list their settings. History views, like USER_AI_AGENT_TEAM_HISTORY and USER_AI_AGENT_TOOL_HISTORY, keep the prompts, the responses, and the tool calls. And DBA versions of the views give administrators the same picture for every user.

Sharing and security

Agents run inside the database, so they work with the privileges of the user, and their actions can be audited. To share a team, its owner keeps the definition, and calls GRANT_TEAM_ACCESS for a user or a role, while REVOKE_TEAM_ACCESS takes it back. The consumer runs the team by its owner's schema and its name, and can supply values at run time, but cannot change the team. SET_VARIABLE and GET_VARIABLE pass values between tools during a run. And the human tool adds a confirmation step before sensitive actions.

Recap

Let's recap. Run a team with SET_TEAM and select AI agent, or with RUN_TEAM and a conversation ID. A task waiting for human resumes when RUN_TEAM gets the reply with the same conversation ID. Sequential teams follow a fixed order, while a supervisor picks the workers one subtask at a time. Views list the agents, their settings, and the history of prompts, responses, and tool calls. And agents run with the user's privileges, while GRANT_TEAM_ACCESS shares a team that consumers cannot change.

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.

  1. The returns agent asked the customer to confirm, and the state shows WAITING_FOR_HUMAN. The customer answers yes. How should the app continue?

    • SET_TEAM again, then SELECT AI agent with yes
    • CREATE_TASK again, with the reply inside
    • RUN_TEAM with a brand new conversation ID
    • RUN_TEAM with the reply, same conversation
    Show the answer

    RUN_TEAM with the reply, same conversation

    Calling RUN_TEAM with the reply and the same conversation ID resumes the waiting task. “SET_TEAM again, then SELECT AI agent with yes” starts a new request in the session, so the waiting task never gets its answer. “CREATE_TASK again, with the reply inside” changes the definition of the task, not the conversation. And “RUN_TEAM with a brand new conversation ID” starts a new conversation, which loses the context of the waiting task.

  2. Some of Ambergate’s requests need only a warranty check, while others need a refund and a shipping label too. The team wants the work chosen at run time. What fits?

    • A sequential team that always runs every step
    • A supervised team, with a supervisor agent
    • One agent that holds every tool and rule
    • A separate team for each type of request
    Show the answer

    A supervised team, with a supervisor agent

    A supervisor agent chooses which workers to call for each request, one subtask at a time. “A sequential team that always runs every step” runs every step in a fixed order, even the ones a request does not need. “One agent that holds every tool and rule” puts every tool and rule in one agent, which loses the clear roles of a team. And “A separate team for each type of request” multiplies teams, and the app would have to pick one before it understands the request.

  3. The warranty department, in another schema, must run Ambergate’s returns team, but must never be able to change it. What should the owner do?

    • Grant it access with GRANT_TEAM_ACCESS
    • Export the team definition into its own schema
    • Grant the DBA role to its users
    • Share the owner’s password with it
    Show the answer

    Grant it access with GRANT_TEAM_ACCESS

    GRANT_TEAM_ACCESS lets the department run the team, while the owner keeps the definition. “Export the team definition into its own schema” gives the department its own copy, which it could then change. “Grant the DBA role to its users” gives far more power than running one team needs. And “Share the owner’s password with it” shares a secret, and it lets the department do anything the owner can do.