Core concepts

The following concepts help you understand how agents work in Agent Builder. To see how to apply them, follow the getting started guide.

Inputs

Inputs are values that an application or user can provide before an agent session starts. An input can be required or optional.

To give the agent access to an input's value, insert it into a prompt using /. Inputs can also be used in pre-computed variables and tools. For example, a support agent may take an order ID as input and add it to the prompt to identify the order in a user's question.

Pre-computed variables

Pre-computed variables prepare values before the agent runs. A variable can, for example, filter an Ontology object set, compute a value from a function, or apply actions. Variables can use inputs or other variables, and their results can be passed to prompts and tools.

For example, a variable can use an order ID to find the matching order and its shipments. Adding those records to the system prompt gives the agent context for answering questions about the order.

If a pre-computed variable contains an action, the action runs automatically when the session starts, even if the variable is not referenced anywhere. In Preview, the action still runs, but its Ontology edits are not applied. Outside Preview, these actions can change Ontology data.

Prompts

The System prompt defines the agent's behavior, rules, and context. Enter / in the Markdown editor to add input and variable values to the prompt. For example, a support agent's system prompt can instruct it to base answers on the order and shipment records provided.

The Initial user message defines the task the agent should complete when a session starts.

Tools

Tools let an agent access information or perform tasks during a session. The agent can choose which configured tools to call and supply their inputs. Tools can call functions, apply Ontology actions, or query Ontology data. You can also define custom tools in a no-code tool builder.

For example, a support agent can use an Ontology SQL tool to query shipment records and an action that creates a delivery change object.

Session completion

Session completion determines whether an agent stays open for more messages or finishes by returning a specified output.

SettingWhat happensExample
Stays openThe session remains open for user messages.Conversational agents.
Ends after first valid outputThe session ends when the agent returns an output matching the configured Agent output type.A triage agent returns a Struct with a priority field.

An initial user message is required if Ends after first valid output is selected.