How it worksFunctions

Updated 28 Oct 2026View as Markdown

Functions

A function runs fixed steps and returns one answer. Agents call functions as tools, for work with one right answer.

MCP serverSDK and APIYour own cloud:AWSGCPAzureor hosted by MindsetMindset platformAgentScriptVersionRunConnectionOperationFunctionWidgetSecurity and complianceone posture · audit trail · personal data redactionBuilderscoding agentOperatorsAI clientor the StudioYour appthe SDKYour serverthe APIThe Huband schedulesBuilderscoding agentOperatorsAI client or the StudioMCP serverYour own cloud:AWSGCPAzureor hosted by MindsetMindset platformAgentScriptFunctionConnectionOperationWidgetVersionRunSecurity and complianceone posture for the org,audit trail and personal data redactionSDK and APIYour appthe SDKYour serverthe APIThe Huband schedules

A function runs a fixed list of steps, top to bottom, and returns one answer. An agent calls it as a tool. Use one for work with exactly one right answer, so no model works out the arithmetic.

Why it matters#

Work with one right answer costs less, and comes out the same every time, when no model has to work it out.

Steps#

Each step calls an operation, asks a model, works out a value or chooses between values. Every step runs. Steps can't be skipped, so a choosing step does the branching. A step that calls an operation or a model can repeat over up to 1,000 items.

Live demoAsk your data · Northwind AnalyticsAsk sales questions and a dashboard draws the answers from what the agent’s functions return.

Who the session is for#

A function reads the labels your backend set on the session as attribution.<key>, so it can choose by the customer's plan, region or account: attribution.plan is enterprise or it isn't. The model can't change a label, so a choice made on one holds whatever anyone types. A session without the label reads nothing there, so give that case its own answer. When the function calls an MCP server that gets labels, the call carries the session's labels too.

Rules#

  • A function can't call another function.
  • It can't be scheduled or triggered on its own. An agent calls it.
  • Agents always use its published version, so publishing a new one reaches every agent that holds it on its next call.
  • Publishing is refused while its steps call an untested operation. See the go-live gate.
  • It makes no judgment. Deciding whether a difference is acceptable belongs with the agent.

The invoice exceptions agent#

invoice-comparison fetches the purchase order and lists every line where quantity or price differs. The agent decides whether each difference matters.

To build one, see Add a function.