REST Resource: projects.locations.collections.engines.assistants.agents

資源:Agent

執行預先定義的特定工作。

JSON 表示法
{
  "name": string,
  "displayName": string,
  "description": string,
  "icon": {
    object (Image)
  },
  "createTime": string,
  "updateTime": string,
  "authorizations": [
    string
  ],
  "authorizationConfig": {
    object (AuthorizationConfig)
  },
  "dataStoreSpecs": {
    object (DataStoreSpecs)
  },
  "state": enum (State),
  "toolSettings": {
    object (AgentToolSettings)
  },
  "languageCode": string,
  "starterPrompts": [
    {
      object (StarterPrompt)
    }
  ],
  "customPlaceholderText": string,

  // Union field definition can be only one of the following:
  "adkAgentDefinition": {
    object (AdkAgentDefinition)
  },
  "managedAgentDefinition": {
    object (ManagedAgentDefinition)
  },
  "a2aAgentDefinition": {
    object (A2AAgentDefinition)
  },
  "dialogflowAgentDefinition": {
    object (DialogflowAgentDefinition)
  }
  // End of list of possible types for union field definition.

  // Union field agent_state_reason can be only one of the following:
  "suspensionReason": string,
  "rejectionReason": string,
  "deploymentFailureReason": string
  // End of list of possible types for union field agent_state_reason.
}
欄位
name

string

ID。服務專員的資源名稱。格式:projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}/agents/{agent}projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/agents/{agent}

displayName

string

這是必要旗標,代理程式的顯示名稱。LLM 可能會使用這項資訊,自動選取代理來回覆使用者查詢。

description

string

這是必要旗標,人類可讀的代理說明。LLM 可能會使用這項資訊,自動選取代理來回覆使用者查詢。

icon

object (Image)

(選用步驟) 使用者介面上代表代理程式的圖示。

createTime

string (Timestamp format)

僅供輸出。這個代理程式的建立時間戳記。

使用 RFC 3339,產生的輸出內容一律會經過 Z 標準化,並使用 0、3、6 或 9 個小數點後位數。系統也接受「Z」以外的偏移量。例如:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z""2014-10-02T15:01:23+05:30"

updateTime

string (Timestamp format)

僅供輸出。上次更新這個代理程式的時間戳記。

使用 RFC 3339,產生的輸出內容一律會經過 Z 標準化,並使用 0、3、6 或 9 個小數點後位數。系統也接受「Z」以外的偏移量。例如:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z""2014-10-02T15:01:23+05:30"

authorizations[]
(deprecated)

string

(選用步驟) 已淘汰:請改用 Agent.authorization_config。這個代理程式所需的授權清單。

authorizationConfig

object (AuthorizationConfig)

(選用步驟) 代理程式所需的授權。

dataStoreSpecs

object (DataStoreSpecs)

(選用步驟) 與代理程式相關聯的 DataStoreSpec。如未設定這個欄位,系統會使用引擎中的所有資料儲存庫。

state

enum (State)

僅供輸出。代理程式的生命週期狀態。

toolSettings
(deprecated)

object (AgentToolSettings)

(選用步驟) 已淘汰:計畫遷移至 AgentCard 定義。

languageCode

string

(選用步驟) 說明、displayName 和 starterPrompts 欄位中文字的語言代碼。

starterPrompts[]

object (StarterPrompt)

(選用步驟) 在代理程式的到達網頁上向使用者顯示的入門提示建議。

customPlaceholderText

string

(選用步驟) 使用者輸入任何文字前,文字方塊中顯示的自訂預留位置文字。

聯集欄位 definition。代理程式的定義。LINT.IfChange(definition) definition 只能是下列其中一項:
adkAgentDefinition

object (AdkAgentDefinition)

(選用步驟) 代理程式的行為定義為 ADK 代理程式。

managedAgentDefinition

object (ManagedAgentDefinition)

(選用步驟) Google 管理的代理程式行為。

a2aAgentDefinition

object (A2AAgentDefinition)

(選用步驟) 代理程式的行為定義為 A2A 代理程式。

dialogflowAgentDefinition

object (DialogflowAgentDefinition)

(選用步驟) 代理程式的行為定義為 Dialogflow 代理程式。

聯集欄位 agent_state_reason。代理程式目前狀態的原因。agent_state_reason 只能是下列其中一項:
suspensionReason

string

僅供輸出。代理遭停權的原因。只有在狀態為「已暫停」時才設定。

rejectionReason

string

僅供輸出。代理程式遭拒的原因。只有在狀態為 PRIVATE,且因遭到拒絕而進入該狀態時,才需要設定。

deploymentFailureReason

string

僅供輸出。代理程式部署失敗的原因。只有在狀態為 DEPLOYMENT_FAILED 時才會設定。

方法

create

建立 Agent

delete

刪除 Agent

deploy

部署 Agent

disableAgent

停用代理程式。

enableAgent

啟用代理程式。

get

取得 Agent

getAgentView

針對指定 Agent 傳回 AgentView,其中包含有關代理程式的其他資訊。

getIamPolicy

取得代理程式資源的存取權控管政策。

list

列出呼叫者建立的 Assistant 底下所有 Agent

patch

更新 Agent

rejectAgent

拒絕向大眾提供的代理程式。

requestAgentReview

將 Agent 提交審查,供管理員查看。

setIamPolicy

設定代理程式資源的存取權控管政策。

suspendAgent

暫停代理程式。

withdrawAgent

撤回向大眾提供的代理程式。