Class Agent (0.3.0)

Agent(mapping=None, *, ignore_unknown_fields=False, **kwargs)

An agent acts as the fundamental building block that provides instructions to the Large Language Model (LLM) for executing specific tasks.

This message has oneof_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

Attributes

Name Description
llm_agent google.cloud.ces_v1.types.Agent.LlmAgent
Optional. The default agent type. This field is a member of oneof_ agent_type.
remote_dialogflow_agent google.cloud.ces_v1.types.Agent.RemoteDialogflowAgent
Optional. The remote Dialogflow __ agent to be used for the agent execution. If this field is set, all other agent level properties will be ignored. Note: If the Dialogflow agent is in a different project from the app, you should grant roles/dialogflow.client to the CES service agent service-. This field is a member of oneof_ agent_type.
name str
Identifier. The unique identifier of the agent. Format: projects/{project}/locations/{location}/apps/{app}/agents/{agent}
display_name str
Required. Display name of the agent.
description str
Optional. Human-readable description of the agent.
model_settings google.cloud.ces_v1.types.ModelSettings
Optional. Configurations for the LLM model.
instruction str
Optional. Instructions for the LLM model to guide the agent's behavior.
tools MutableSequence[str]
Optional. List of available tools for the agent. Format: projects/{project}/locations/{location}/apps/{app}/tools/{tool}
child_agents MutableSequence[str]
Optional. List of child agents in the agent tree. Format: projects/{project}/locations/{location}/apps/{app}/agents/{agent}
before_agent_callbacks MutableSequence[google.cloud.ces_v1.types.Callback]
Optional. The callbacks to execute before the agent is called. The provided callbacks are executed sequentially in the exact order they are given in the list. If a callback returns an overridden response, execution stops and any remaining callbacks are skipped.
after_agent_callbacks MutableSequence[google.cloud.ces_v1.types.Callback]
Optional. The callbacks to execute after the agent is called. The provided callbacks are executed sequentially in the exact order they are given in the list. If a callback returns an overridden response, execution stops and any remaining callbacks are skipped.
before_model_callbacks MutableSequence[google.cloud.ces_v1.types.Callback]
Optional. The callbacks to execute before the model is called. If there are multiple calls to the model, the callback will be executed multiple times. The provided callbacks are executed sequentially in the exact order they are given in the list. If a callback returns an overridden response, execution stops and any remaining callbacks are skipped.
after_model_callbacks MutableSequence[google.cloud.ces_v1.types.Callback]
Optional. The callbacks to execute after the model is called. If there are multiple calls to the model, the callback will be executed multiple times. The provided callbacks are executed sequentially in the exact order they are given in the list. If a callback returns an overridden response, execution stops and any remaining callbacks are skipped.
before_tool_callbacks MutableSequence[google.cloud.ces_v1.types.Callback]
Optional. The callbacks to execute before the tool is invoked. If there are multiple tool invocations, the callback will be executed multiple times. The provided callbacks are executed sequentially in the exact order they are given in the list. If a callback returns an overridden response, execution stops and any remaining callbacks are skipped.
after_tool_callbacks MutableSequence[google.cloud.ces_v1.types.Callback]
Optional. The callbacks to execute after the tool is invoked. If there are multiple tool invocations, the callback will be executed multiple times. The provided callbacks are executed sequentially in the exact order they are given in the list. If a callback returns an overridden response, execution stops and any remaining callbacks are skipped.
create_time google.protobuf.timestamp_pb2.Timestamp
Output only. Timestamp when the agent was created.
update_time google.protobuf.timestamp_pb2.Timestamp
Output only. Timestamp when the agent was last updated.
guardrails MutableSequence[str]
Optional. List of guardrails for the agent. Format: projects/{project}/locations/{location}/apps/{app}/guardrails/{guardrail}
etag str
Etag used to ensure the object hasn't changed during a read-modify-write operation. If the etag is empty, the update will overwrite any concurrent changes.
toolsets MutableSequence[google.cloud.ces_v1.types.Agent.AgentToolset]
Optional. List of toolsets for the agent.
generated_summary str
Output only. If the agent is generated by the LLM assistant, this field contains a descriptive summary of the generation.
transfer_rules MutableSequence[google.cloud.ces_v1.types.TransferRule]
Optional. Agent transfer rules. If multiple rules match, the first one in the list will be used.

Classes

AgentToolset

AgentToolset(mapping=None, *, ignore_unknown_fields=False, **kwargs)

A toolset with a selection of its tools.

LlmAgent

LlmAgent(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Default agent type. The agent uses instructions and callbacks specified in the agent to perform the task using a large language model.

RemoteDialogflowAgent

RemoteDialogflowAgent(mapping=None, *, ignore_unknown_fields=False, **kwargs)

The agent which will transfer execution to a remote Dialogflow CX <https://docs.cloud.google.com/dialogflow/cx/docs/concept/agent>__ agent. The Dialogflow agent will process subsequent user queries until the session ends or flow ends, and the control is transferred back to the parent CES agent.