Interface Agent


public interface Agent
Contract for Select AI agent lifecycle management and metadata access.

A Select AI agent is a database-side resource managed by the DBMS_CLOUD_AI_AGENT PL/SQL package. Agents can use a configured Select AI profile and may participate in task, tool, and team orchestration.

An Agent instance can represent an existing database agent or be configured for creation. The name-only SelectAIAgent.agent(String) factory verifies that the agent exists and loads its metadata and attributes before returning. SelectAIAgent.listAgents() also returns handles with loaded metadata and attributes. A handle configured for creation is obtained with SelectAIAgent.agent(String, AgentAttributes, String, AgentStatus).

A creation-configured handle retains its supplied attributes, description, and status without querying the database. Only such a handle can call create(); after creation succeeds, it becomes database-backed. enable(), disable(), and drop(boolean) require an existing agent and operate on the database-side resource.

Before creation, getStatus() and getAgentAttributes() return the configured values. For a database-backed handle, each call to either method queries the database. getStatus() does not change the description returned by getDescription(). The description is supplied or loaded when the handle is initialized; getDescription() does not query the database.

Agent names and a non-null attributes object are checked locally. Required values within AgentAttributes, including the profile name and role, are validated by the database during create(). Loading metadata and executing lifecycle operations require database access and privileges.

For a complete runnable example, see CreateAgentSample source.

Since:
1.1.0
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Creates this creation-configured agent in the database.
    boolean
    Disables this database-backed agent.
    boolean
    drop(boolean force)
    Drops this database-backed agent.
    boolean
    Enables this database-backed agent.
    Returns agent attributes for this handle.
    Returns the database-reported name for a loaded agent, or the configured name before creation.
    Returns the description supplied or loaded when this handle was initialized.
    Returns the configured status before creation or the current database status for an existing agent.
    boolean
    setAttribute(String attributeName, boolean attributeValue)
    Updates one boolean agent attribute in the database.
    boolean
    setAttribute(String attributeName, Float attributeValue)
    Updates one floating-point agent attribute in the database.
    boolean
    setAttribute(String attributeName, Integer attributeValue)
    Updates one integer agent attribute in the database.
    boolean
    setAttribute(String attributeName, String attributeValue)
    Updates one agent attribute in the database.
    boolean
    setAttributes(AgentAttributes agentAttributes)
    Updates multiple agent attributes in one database operation.