GetAgentPersona

The GetAgentPersona action retrieves information about the agent's persona. When called without parameters, it returns the agent persona's name. You can optionally specify a field to retrieve a specific value such as the persona ID.

GetAgentPersona(
    field: str = "name"
)

Where:

  • field: (Optional) The field to retrieve from the agent persona. Common values include "name" and "id". Defaults to "name".

Example 1 (Get Agent Persona Name)

{{Set(name="agent_name", value=GetAgentPersona())}}

{{SendMessage(message=agent_name)}}

The above code snippet retrieves the agent persona's name and sends it to the chat.

Example 2 (Get Agent Persona ID)

{{Set(name="agent_id", value=GetAgentPersona(field="id"))}}

{{SendMessage(message=agent_id)}}

The above code snippet retrieves the agent persona's ID and sends it to the chat.