Free cookie consent management tool by TermsFeed

Agent Chat Component

On This Page
The capabilities described on this page are included in Appian's advanced and premium capability tiers. Usage limits may apply.

About the agent chat component

Displays a chat that lets users interact with an AI agent to pull information or complete tasks on their behalf.

The agent chat component provides a turnkey conversational experience for deploying chat agents in Appian interfaces. End users can ask questions, receive streamed responses, and view the chat agent's tool calls—all within a single component.

Where to use the agent chat component

Use a!agentChatField() in the following components:

You can't use a!agentChatField() in a read-only grid (a!gridField()), editable grid (a!gridLayout()), billboard layout (a!billboardLayout()), or side by side layout (a!sideBySideLayout()).

Parameters

a!agentChatField( agent, inputs, title, height, placeholder, welcomeMessage, showSessionPicker, showWhen, debugMode, shape, showBorder, outputsSaveInto, showReasoning )

Name Keyword Types Description

Agent

agent

AgentReference

The AI agent that powers this component's chat interactions and defines how it understands and responds to user requests. See Agent type requirements for details.

Inputs

inputs

Map

Map of inputs passed to the agent. This corresponds to the inputs defined in the agent.

Title

title

Text

The title that displays in the bar above the chat. Default: "Agent Chat".

Height

height

Text

Determines the component height. Valid values: "EXTRA_SHORT", "SHORT", "SHORT_PLUS", "MEDIUM", "MEDIUM_PLUS", "TALL", "TALL_PLUS", "EXTRA_TALL", "FILL" (default).

Placeholder

placeholder

Text

Text to display in the field when it is empty.

Welcome Message

welcomeMessage

Text

The text displayed in the chat area before the user sends their first message. Once the user sends a message, this text no longer displays.

Show Session Picker

showSessionPicker

Boolean

Determines if the session picker dropdown displays, allowing users to switch between conversations. Default: true.

Show When

showWhen

Boolean

Determines whether the component is displayed on the interface. When set to false, the component is hidden and is not evaluated. Default: true.

Debug Mode

debugMode

Boolean

Determines if tool inputs and outputs display for troubleshooting. Default: false.

Shape

shape

Text

Determines the shape of the component container. Valid values: "SQUARED", "SEMI_ROUNDED", "FULLY_ROUNDED". Default: "SQUARED".

Show Border

showBorder

Boolean

Determines whether a border displays around the component. Default: false.

Outputs Save Into

outputsSaveInto

List of Save

Saves the outputs received at the end of the AI agent run. Use save!value to reference the output variables.

Show Reasoning

showReasoning

Boolean

Determines if the agent's reasoning displays for each tool call. When debugMode is true, the reasoning always displays, along with the tool call's inputs and outputs. Default: true.

Using the agent chat component

The following sections cover important details about the agent chat component.

Considerations for the agent chat component

Agent type requirements

The agent chat component requires a chat agent. Process agents are not compatible with the agent chat component and cause a runtime validation error. Agent type is selected when the AI agent object is created and cannot be changed after the object is created.

Process agents can be selected as tools for chat agents, allowing chat agents to orchestrate process-based workflows as part of a conversation.

If you need to execute a process agent within a process model instead, use the Execute AI Agent smart service.

Appian Mobile and Appian for Windows considerations

This component is not supported in the Appian Mobile or Appian for Windows apps. To use agent chat, view the interface in a browser.

Configuring the agent chat component

Using the inputs parameter

The inputs parameter passes context-specific data to the chat agent at runtime. The inputs map corresponds to the inputs defined in the AI agent. Use inputs to provide the chat agent with user-specific context such as form data, user role, case details, or record information.

For example, if the chat agent expects a caseId input, pass it using:

1
2
3
4
5
6
a!agentChatField(
  agent: agent!MY_CHAT_AGENT,
  inputs: {
    caseId: ri!caseId
  }
)

Using the outputsSaveInto parameter

The outputsSaveInto parameter saves the outputs received at the end of the AI agent run. Use save!value to reference the output variables defined in the agent. Combine this with refresh variables to fill out forms or dynamically render content on interfaces.

For example, if the chat agent produces an output called "decision," capture it with:

1
2
3
4
a!agentChatField(
  agent: agent!MY_CHAT_AGENT,
  outputsSaveInto: a!save(local!agentDecision, save!value.decision)
)

Using the height parameter

The default value "FILL" makes the component expand to fill the available vertical space of its parent container, making it suitable for full-page chat experiences.

Using the debugMode parameter

Enable debugMode during development to see tool inputs and outputs for troubleshooting. Debug mode helps developers improve prompt accuracy and troubleshoot unexpected behavior.

Disable debug mode before deploying to production. End users do not benefit from seeing internal tool details, and the additional output can be confusing.

Using the showReasoning parameter

The showReasoning parameter controls whether a chat agent's actions and reasoning stay in the chat timeline.

  • When showReasoning is true, the chat shows a short description of each action the chat agent took, along with the reasoning when applicable. These actions and reasoning stay in the timeline and do not disappear as the conversation continues.
  • When showReasoning is false, the chat shows the action the chat agent is currently taking, but the action disappears as the chat agent moves on to the next one.

When debugMode is true, the full timeline and all raw details display regardless of the showReasoning value.

Agent chat behavior

Streaming responses

Agent chat component responses stream in real time, unless guardrails are enabled. Streaming applies to the chat component only—it does not apply to the Execute AI Agent smart service output.

Search agent chat responses

The agent chat component doesn't include a built-in search. Use the browser's search to find content within a conversation.

Stop button

The agent chat component displays a stop button while an agent response is actively running. The stop button stops the current response only—it does not end the conversation or destroy the session. After stopping a response, the user can send a new message to continue the conversation in the same session with full context from prior exchanges.

When you click stop, the following happens:

  • Visibility: The stop button appears only while an agent response is in progress. When no response is running, the button is not visible.
  • Scope: Stopping ends the current response (interrupt), not the entire conversation. The agent run survives with a status of "Cancelled by User."
  • Mid-tool-call behavior: If the user clicks stop while a tool is executing, the tool call is interrupted and does not complete. The conversation state reflects where the agent stopped.
  • Continuation: After stopping, the user can send a new message. The conversation continues in the same session with full context from prior exchanges.
  • Monitor visibility: Stopped runs appear in the Monitor tab with status "Cancelled by User." For details, see Monitor AI Agents.

Suggested actions

When a chat agent identifies a clear next step, such as "Submit case," the agent chat component displays one or more suggested action buttons beneath the response. Clicking a button sends that button's label as the user's next message, the same as typing it.

Suggested actions appear only when there's a clear next action. When there isn't one, no buttons display. The behavior is automatic for every agent chat component.

Conversation persistence

The agent chat component supports conversation persistence. End users can return to previous conversations and switch between sessions. Session names are based on the first user message. Each user has access only to their own conversation history and conversations cannot be exported. For more details, see Conversation Persistence for Chat Agents.

Examples

The following example demonstrates the agent chat component.

To experiment with examples, copy and paste the expression into an interface object.

Agent chat component with inputs and outputsSaveInto

This example references AI agents from another environment and will error if you try to use it in yours. Use it as a reference only.

1
2
3
4
5
6
7
8
9
a!agentChatField(
  title: "Case Assistant",
  agent: agent!CASE_CHAT_AGENT,
  inputs: {
    caseId: ri!caseId
  },
  outputsSaveInto: a!save(local!agentDecision, save!value.decision),
  height: "FILL"
)

Feature compatibility

The table below lists this component's compatibility with various features in Appian.
Feature Compatibility Note
Portals Incompatible
Offline Interfaces Incompatible
Sync-Time Custom Record Fields Incompatible
Real-Time Custom Record Fields Incompatible

Custom record fields that evaluate in real time must be configured using one or more Custom Field functions.

Process Reports Incompatible

Cannot be used to configure a process report.

Process Events Incompatible

Cannot be used to configure a process event node, such as a start event or timer event.

Process Autoscaling Incompatible

Cannot be used in autoscaled processes.

Event Consumer Filter Conditions Compatible

Can be used in filter conditions.

Event Consumer Event Handlers Compatible

Can be used in event handler expressions.

Feedback