Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Agent

import type { Agent } from "https://googleapis.deno.dev/v1/ces:v1.ts";

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

interface Agent {
afterAgentCallbacks?: Callback[];
afterModelCallbacks?: Callback[];
afterToolCallbacks?: Callback[];
beforeAgentCallbacks?: Callback[];
beforeModelCallbacks?: Callback[];
beforeToolCallbacks?: Callback[];
childAgents?: string[];
readonly createTime?: Date;
description?: string;
displayName?: string;
etag?: string;
readonly generatedSummary?: string;
guardrails?: string[];
instruction?: string;
llmAgent?: AgentLlmAgent;
modelSettings?: ModelSettings;
name?: string;
remoteDialogflowAgent?: AgentRemoteDialogflowAgent;
tools?: string[];
toolsets?: AgentAgentToolset[];
transferRules?: TransferRule[];
readonly updateTime?: Date;
}

§Properties

§
afterAgentCallbacks?: Callback[]
[src]

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.

§
afterModelCallbacks?: Callback[]
[src]

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.

§
afterToolCallbacks?: Callback[]
[src]

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.

§
beforeAgentCallbacks?: Callback[]
[src]

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.

§
beforeModelCallbacks?: Callback[]
[src]

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.

§
beforeToolCallbacks?: Callback[]
[src]

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.

§
childAgents?: string[]
[src]

Optional. List of child agents in the agent tree. Format: projects/{project}/locations/{location}/apps/{app}/agents/{agent}

§
readonly createTime?: Date
[src]

Output only. Timestamp when the agent was created.

§
description?: string
[src]

Optional. Human-readable description of the agent.

§
displayName?: string
[src]

Required. Display name of the agent.

§
etag?: string
[src]

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.

§
readonly generatedSummary?: string
[src]

Output only. If the agent is generated by the LLM assistant, this field contains a descriptive summary of the generation.

§
guardrails?: string[]
[src]

Optional. List of guardrails for the agent. Format: projects/{project}/locations/{location}/apps/{app}/guardrails/{guardrail}

§
instruction?: string
[src]

Optional. Instructions for the LLM model to guide the agent's behavior.

§

Optional. The default agent type.

§
modelSettings?: ModelSettings
[src]

Optional. Configurations for the LLM model.

§
name?: string
[src]

Identifier. The unique identifier of the agent. Format: projects/{project}/locations/{location}/apps/{app}/agents/{agent}

§
remoteDialogflowAgent?: AgentRemoteDialogflowAgent
[src]

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-@gcp-sa-ces.iam.gserviceaccount.com.

§
tools?: string[]
[src]

Optional. List of available tools for the agent. Format: projects/{project}/locations/{location}/apps/{app}/tools/{tool}

§

Optional. List of toolsets for the agent.

§
transferRules?: TransferRule[]
[src]

Optional. Agent transfer rules. If multiple rules match, the first one in the list will be used.

§
readonly updateTime?: Date
[src]

Output only. Timestamp when the agent was last updated.