Delete an Agent

DBMS_AI_AGENT.DELETE_AGENT removes an Agent Spec previously stored under a database name. The procedure identifies the stored agent by the name assigned through DBMS_AI_AGENT.CREATE_AGENT.

Deletion removes the stored agent and its specification. It does not delete the database procedures, credentials, tables, indexes, retrieval objects, model endpoints, or external services referenced by that specification.

Syntax

DBMS_AI_AGENT.DELETE_AGENT (
    AGENT_NAME IN VARCHAR2
);

Parameter

ParameterDescription
AGENT_NAMESpecifies the database name of the stored agent to remove.

AGENT_NAME is the same stored name accepted by EXECUTE_AGENT and DESCRIBE_AGENT. It is separate from component IDs and component names inside the Agent Spec.

Example: Delete the Order-Request Flow

The Create an Agent example stores an Agent Spec under the name ORDER_REQUEST_FLOW. The following example deletes that stored agent:

BEGIN
  DBMS_AI_AGENT.DELETE_AGENT (
    AGENT_NAME => 'ORDER_REQUEST_FLOW'
  );
END;
/

DELETE_AGENT is a procedure. A successful call does not return JSON or an execution result.

After the procedure completes, the database name ORDER_REQUEST_FLOW and its stored Agent Spec are no longer available:

ORDER_REQUEST_FLOW
        |
        +-- stored database name    removed
        `-- stored Agent Spec       removed

Referenced database and external resources    unchanged