Concepts
Function
Deterministic code for steps that shouldn’t be AI judgment: validation, math, formatting.
What a function is
Not everything should be left to a model. Functions are plain code the pod runs exactly the same way every time — perfect for scoring, validating, transforming, and calling APIs. Use agents for judgment, functions for rules. Flows mix both freely.
For example
A lead-scoring function applies your exact point rules, so the same lead always gets the same score.
Reach for it when
- The step has exact rules: scoring, validation, math, formatting.
- The same input must always produce the same output.
- An API call needs retries and typed inputs, not improvisation.
- An agent keeps being asked to do arithmetic or apply a rulebook.
Write the deterministic step
- Open Functions (via Workflows) and create one with a typed input schema.
- Keep it single-purpose: score-lead, validate-expense, format-reply.
- Run it standalone with realistic input and check the output shape.
- Use it as a workflow step or call it from an agent that needs the rulebook applied.
Where it lives
Functions, reachable from the Workflows section.
Related concepts
| Concept | In short |
|---|---|
| Workflow | A repeatable process: steps of agents, functions, decisions, and human approvals that run in order. |
| Agent | An AI worker with a role, instructions, and scoped access to your tables, files, and apps. |