UserProxyAgent State
The UserProxyAgentState
is used to define an agent whose role is a bridge between the workflow and the user. This state outlines the configuration of the agent, including the communication context, user messages, roles, data schemas, known data, and outcomes. This specification provides a comprehensive overview of the UserProxyAgentState
and its related objects.
UserProxyAgentState
The UserProxyAgentState
is a specialized state in a serverless workflow designed to facilitate communication between the workflow and a user through an AI agent. This state specifies the agent's role, communication channels, messages, data schemas, and possible outcomes.
Parameter
Description
Type
Required
agentName
The name of the agent.
string
yes
agentRole
The role of the agent in the conversation. Can be 'relay' or 'facilitator'. Default is 'relay'.
string
no
userMessage
The user message.
string
no
object
no
object
no
knownData
The data that the agent already knows about the user and the conversation in JSON format.
string
no
array
yes
Filter to apply to the state data.
string
no
DataSchema
The DataSchema
object describes the schema for date-related outputs.
Field
Type
Description
Required
schema
string
URI of the JSON Schema used to describe the agent data output
yes
UserMessageDef
The UserMessageDef
object describes the structure of the user messages sent to the AI agent.
Field
Type
Description
Required
text
string
The text of the user message
yes
array
no
mediaExp
string
The jq expression for list of media file URLs of the user message
no
MediaContent
The MediaContent
object defines the structure for media files associated with user messages.
Field
Type
Description
Required
uuid
string
The unique identifier of media content.
yes
url
string
The URL of the media file
One of url
or base64Data
must be provided
base64Data
string
The base64 encoded data of the media file
One of url
or base64Data
must be provided
mimeType
string
The mime type of the media file
no
description
string
The description of media content.
no
OnAgentOutcome
The OnAgentOutcome
object defines the actions to be performed based on the outcome of the AI agent. The actions are executed if the outcome matches the specified conditions.
Field
Type
Description
Required
condition
string
Expression, if defined, must evaluate to true for this outcome to be matched. If false, the outcome is disregarded.
yes
finish
boolean
If true, the agent will finish after this action is executed. If false, the agent will continue to process.
yes
object
no
object
The outgoing transition when the outcome is selected, if not defined the default transition will be used.
no
Example:
Relay role example:
Facilitator role example:
This document provides a detailed view of the UserProxyAgentState
state and its related objects, including comprehensive schema definitions, required fields, and descriptions for each attribute within the UserProxyAgentState
and associated schemas. This specification ensures clarity and completeness for integrating AI agents within serverless workflows.
Last updated