Skip to content

Module 03 · I know the tech

Functions Skill

Outcome

Create, test, and deploy custom function calls from within agent conversations.

What you will learn

  • Understand how the Functions Skill bridges conversation and backend execution.
  • Configure a function: name, instructions, webhook, parameters, and headers.
  • Understand Agent-to-Agent (A2A) routing as a custom Functions design pattern, and where its endpoint, inputs and authentication must come from.
  • Debug function calls by inspecting recorded requests, responses and errors where Logs or Debug are available to you.
01

How the Functions Skill Works

The Functions Skill bridges the gap between conversational AI and backend execution. Within the tools, permissions and server-side validation you configure, raia agents can call custom backend functions — retrieving CRM data, booking appointments, triggering actions in other software, or querying databases — in response to user requests.

Functions Skill execution flow.
Conceptual illustration — not the product interface.

Instead of just answering questions from static vector store knowledge, an agent equipped with the Functions Skill recognizes when a request requires external data or action. If a user asks "Can you check the status of my order?", the agent detects the intent, extracts the parameters (like an order number), calls the get_order_status function via a webhook, and returns the live result in natural language.

02

Configuring a Function

In the Skills tab of the Launch Pad, toggle the Functions Skill to Active and click Create Function. Define each of the following fields:

Field 01

Function Name

A clear, user-friendly label (e.g., Check Order Status).

Field 02

Internal Name

A unique system identifier used in code (e.g., get_order_status).

New Function: choose a template or enter the two names. Use a no-space internal name, not the placeholder.
  1. Highlight 1: Chose function from a template
  2. Highlight 2: Function Name
  3. Highlight 3: Function Internal Name

Field 03

Status

Keep it private to your agent, or share it globally across your organization's Functions Library.

Field 04

Instructions

A prompt telling the AI exactly when and how to use this function. Critical for accurate intent detection.

Field 05

Webhook to Call

The external HTTP endpoint (URL) the AI will contact to execute the task.

New Function: when to call it and the approved webhook URL.
  1. Highlight 1: Function Instructions
  2. Highlight 2: Webhook to Call

Field 06

Parameters

The data inputs the AI collects from the user (e.g., email, order_id) to send to the webhook.

New Function: complete Function Parameters, + Add Header and Create. Nothing was created or executed.
  1. Highlight 1: Function Parameters
  2. Highlight 2: + Add Header
  3. Highlight 3: Create

Field 07

Headers

Authentication headers (for example a Bearer token) that the destination API requires. Headers depend on the endpoint; add them only when its contract asks for them.

03

Agent-to-Agent (A2A) Calling

A common design pattern for the Functions Skill is Agent-to-Agent routing. A primary agent (a general customer service bot) can route specialized queries through a custom function to an endpoint that consults a secondary expert agent (billing, technical support) and returns the answer. This is a pattern you build, not a verified built-in endpoint, schema or authentication contract.

A dedicated Agent-to-Agent setup is not shown in the reviewed Skills menu. See the Agent-to-Agent Connection page and check with raia which approach is available for your workspace. Agent-to-Agent Connection availability

Agent-to-Agent calling flow.
Conceptual illustration — not the product interface.

Designing an A2A function (custom pattern)

Step 01

Webhook URL

Use the destination endpoint defined by an owner-approved contract. Older material showed a dashboard-style URL such as https://raia.app.n8n.cloud/webhook/...; that is a nonstandard, unverified legacy illustration, not a working raia URL — never send credentials there.

Step 02

Parameters

Use the inputs the approved destination contract defines. A single query parameter (type: string) carrying the user's question is one illustrative shape, not a required schema.

Step 03

Headers

Add only the headers the approved destination API requires. Older material named a Call_Agent_APIKEY header; treat it as a nonstandard, unverified legacy example, not a raia standard.

In this illustrative design, when the primary agent meets a question outside its domain, its instructions can lead it to call this function, passing the query parameter to the destination endpoint. How that endpoint authenticates, which agent it consults and what it returns are defined by its approved contract; test it against an approved read-only fixture.

04

Best Practices

Write clear instructions

Function Instructions guide when the model calls the webhook, alongside the model, configuration and available tools; permissions and server-side validation control access. Be explicit — e.g., "Trigger this function ONLY when the user explicitly asks to cancel their subscription and provides an account ID."

Define strict parameters

Use clear parameter names and mark required vs optional. Do not assume the AI will always ask for a missing required input: test missing and malformed parameters against an approved read-only fixture, and validate inputs on the server.

Use the Logs tab

If a function isn't firing correctly, inspect the recorded request, response and errors where Logs or Debug are available to you. What is recorded can vary, so check what your view actually shows rather than assuming an exact payload.

Progress is saved locally in your browser.