Resource: Playbook
Playbook is the basic building block to instruct the LLM how to execute a certain task.
A playbook consists of a goal to accomplish, an optional list of step by step instructions (the step instruction may refers to name of the custom or default plugin tools to use) to perform the task, a list of contextual input data to be passed in at the beginning of the invoked, and a list of output parameters to store the playbook result.
JSON representation |
---|
{ "name": string, "displayName": string, "goal": string, "inputParameterDefinitions": [ { object ( |
Fields | |
---|---|
name |
The unique identifier of the playbook. Format: |
display |
Required. The human-readable name of the playbook, unique within an agent. |
goal |
Required. High level description of the goal the playbook intend to accomplish. |
input |
Optional. Defined structured input parameters for this playbook. |
output |
Optional. Defined structured output parameters for this playbook. |
instruction |
Instruction to accomplish target goal. |
token |
Output only. Estimated number of tokes current playbook takes when sent to the LLM. |
create |
Output only. The timestamp of initial playbook creation. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
update |
Output only. Last time the playbook version was updated. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
referenced |
Output only. The resource name of other playbooks referenced by the current playbook in the instructions. |
referenced |
Output only. The resource name of flows referenced by the current playbook in the instructions. |
referenced |
Optional. The resource name of tools referenced by the current playbook in the instructions. If not provided explicitly, they are will be implied using the tool being referenced in goal and steps. |
llm |
Optional. Llm model settings for the playbook. |
ParameterDefinition
Defines the properties of a parameter. Used to define parameters used in the agent and the input / output parameters for each fulfillment.
JSON representation |
---|
{ "name": string, "type": enum ( |
Fields | |
---|---|
name |
Required. Name of parameter. |
type |
Type of parameter. |
type |
Optional. Type schema of parameter. |
description |
Human-readable description of the parameter. Limited to 300 characters. |
ParameterType
Parameter types are used for validation. These types are consistent with google.protobuf.Value
.
Enums | |
---|---|
PARAMETER_TYPE_UNSPECIFIED |
Not specified. No validation will be performed. |
STRING |
Represents any string value. |
NUMBER |
Represents any number value. |
BOOLEAN |
Represents a boolean value. |
NULL |
Represents a null value. |
OBJECT |
Represents any object value. |
LIST |
Represents a repeated value. |
TypeSchema
Encapsulates different type schema variations: either a reference to an a schema that's already defined by a tool, or an inline definition.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field schema . The encapsulated schema. schema can be only one of the following: |
|
inline |
Set if this is an inline schema definition. |
schema |
Set if this is a schema reference. |
InlineSchema
A type schema object that's specified inline.
JSON representation |
---|
{ "type": enum ( |
Fields | |
---|---|
type |
Data type of the schema. |
items |
Schema of the elements if this is an ARRAY type. |
DataType
Defines data types that are supported for inlined schemas. These types are consistent with google.protobuf.Value
.
Enums | |
---|---|
DATA_TYPE_UNSPECIFIED |
Not specified. |
STRING |
Represents any string value. |
NUMBER |
Represents any number value. |
BOOLEAN |
Represents a boolean value. |
ARRAY |
Represents a repeated value. |
SchemaReference
A reference to the schema of an existing tool.
JSON representation |
---|
{ "tool": string, "schema": string } |
Fields | |
---|---|
tool |
The tool that contains this schema definition. Format: |
schema |
The name of the schema. |
Instruction
Message of the Instruction of the playbook.
JSON representation |
---|
{
"steps": [
{
object ( |
Fields | |
---|---|
steps[] |
Ordered list of step by step execution instructions to accomplish target goal. |
Step
Message of single step execution.
JSON representation |
---|
{ "steps": [ { object ( |
Fields | |
---|---|
steps[] |
Sub-processing needed to execute the current step. |
Union field instruction . Instruction on how to execute current step. instruction can be only one of the following: |
|
text |
Step instruction in text format. |
Methods |
|
---|---|
|
Creates a playbook in a specified agent. |
|
Deletes a specified playbook. |
|
Retrieves the specified Playbook. |
|
Returns a list of playbooks in the specified agent. |
|
Updates the specified Playbook. |