Skip to content

What is a function

A function is a single, specific capability that an agent or workflow can execute — sending a Slack message, querying a customer database, creating a support ticket. Functions are the fundamental building blocks of action in Rival Enterprise.

Language models generate text. Functions are what let AI perform real, deterministic work across your software systems.

Functions are the smallest unit of action on the platform. Agents and workflows get their operational usefulness directly from the functions attached to them.

  • Atomic capabilities — each function does one specific job. Combining several is what lets an agent complete a complex, multi-step business process.
  • Modular composition — complex tasks are built by chaining simple functions. Pair a “Fetch Invoice” function with a “Send Email” function and an agent can retrieve data and notify a team member in one sequence.
  • Reusability — once a function is verified and published to your organization’s collection, it can be attached to dozens of agents and workflows across departments.

How functions differ from agents, workflows, and connectors

Section titled “How functions differ from agents, workflows, and connectors”
  • Connectors vs. functions — a connector establishes the secure, authenticated link to an external system. A function is a specific action that operates inside that connected system, such as “Create Opportunity” or “Draft Email”.
  • Agents vs. functions — a function accepts inputs, executes code, and returns an output; it cannot initiate anything on its own. An agent pairs a language model with a persona and decides which functions to call to reach a goal.
  • Workflows vs. functions — a workflow is a defined multi-step process that chains functions, agents, and connectors together with triggers, branching, and approvals. A function is one step inside it.
  • Execution flow — agents call functions to complete tasks. Functions cannot invoke agents, though an agent can delegate work to another agent.

In an enterprise workspace, which functions exist and who may use them is set by policy.

  • Centralized library control — workspace administrators decide which functions exist in the organization, who is authorized to build custom ones, and which are approved for team use.
  • Code abstraction — technical teams can write complex API queries or integration logic and publish them as standard functions. Business users then add those functions to their workflows as drag-and-drop components, without ever seeing the underlying code.
  • Scoped system access — because functions execute through enterprise connectors, administrators can restrict a function’s access to specific endpoints or database tables, keeping it inside defined security boundaries. See Connector governance.

A worked example: custom data reconciliation

Section titled “A worked example: custom data reconciliation”

Consider a financial reconciliation function built by a data engineering team:

  1. Custom engineering — a data engineer writes a function that reconciles transactions between two internal databases using custom business logic.
  2. Administrative review — the engineer submits it to IT administrators, who inspect the code, verify credential security, and approve it for the workspace.
  3. Departmental reuse — Finance analysts drop the “Reconcile Accounts” function into their monthly reporting workflows and run complex processing safely with a single click.
Platform elementPrimary roleSystem relationshipExample
ConnectorAuthenticated link to a systemProvides the security boundaryYour business connection
FunctionSingle action capabilityOperates inside a connector”Create Calendar Event”
AgentGoal-directed AI workerUses functions to complete tasksEvent Coordination Agent
WorkflowMulti-step process sequenceChains triggers, functions, and logicMeeting Scheduling Pipeline