Fency.ai
Sessions

Allowed actions

Control which actions and components an agent may declare.

allowedActions control which actions and components an agent may declare in the browser. Your server sets them when creating a createAgentTask session. The React SDK only receives a clientToken and cannot widen the list.

How allowedActions apply per task type:

Task typeallowedActions
EXPLORE_MEMORIESOptional. Allowlist of component names, such as renderPieChart. Absent means unrestricted.
EXPLORE_PRODUCTOptional. Allowlist of action and component names, such as setTheme and renderPieChart. Absent means unrestricted.
MEMORY_CHATNot supported
MEMORY_SEARCHNot supported
STREAMING_CHAT_COMPLETIONNot supported
STRUCTURED_CHAT_COMPLETIONNot supported

How they work

The names you list are the only ones the webapp may declare when it starts the task. If the client declares a name that is not on the list, task creation fails.

  • Explore Memories uses allowedActions for components only (renderPieChart, renderTimeseriesChart).
  • Explore Product uses allowedActions for both actions (setTheme, applyFilter) and components.

Leave the field off when any declared name should be allowed.

Examples

EXPLORE_MEMORIES

{
    createAgentTask: {
        taskType: 'EXPLORE_MEMORIES',
        allowedActions: ['renderPieChart', 'renderTimeseriesChart'],
    },
}

EXPLORE_PRODUCT

{
    createAgentTask: {
        taskType: 'EXPLORE_PRODUCT',
        allowedActions: ['setTheme', 'applyFilter'],
    },
}

See Sessions for full request bodies per task type.

On this page