Skip to main content
Default functions are pre-built actions provided by SubVerse AI and the underlying LLM provider. They are always available to the LLM during an active session — no webhook or custom code required. Simply enable the ones you need and instruct the agent when to use them.

Available Default Functions

Core Platform Functions

These functions are available regardless of which LLM you use.

OpenAI LLM Functions

Available when your agent uses an OpenAI model.

Claude LLM Functions

Available when your agent uses an Anthropic Claude model.

Google Gemini LLM Functions

Available when your agent uses a Google Gemini model.

When to Use Default Functions

Default functions cover the most common actions an agent needs during a session. You do not need to create or configure them — just enable the ones relevant to your use case and instruct the agent in its system prompt when to call them. Common patterns:
  • End the session automatically once the user’s query is resolved.
  • Search the web when the agent needs real-time or external information.
  • Store customer preferences in memory to personalise future sessions.
  • Query the knowledge base for product details or policy documents.
  • Hand the conversation to a human teammate when the customer asks for one or the agent can’t resolve the issue.
  • Book a follow-up call, WhatsApp message, or email when the customer asks to be contacted later.
Be explicit in the agent’s system prompt about when to call each function. For example: “When the customer says goodbye or their issue is resolved, call end_session.” or “Use web_search only when the knowledge base does not contain a definitive answer.”

fetch_memory

fetch_memory is a pre-session function that retrieves previously stored memory and injects it into the agent’s context before the conversation begins. The retrieved memory is placed into a dynamic variable that you define, which you can then reference anywhere in the agent’s system prompt.

How It Works

When a session starts, fetch_memory looks up the memory stored under the given memoryId and makes it available as a dynamic variable named by paramName. From that point on, you can reference the memory in your system prompt using the standard double-curly-brace syntax — {{ paramName }}.

Parameters

memoryId supports both top-level session variables ({{ claimId }}) and nested tool body paths ({{ body.userDetails.id }}). This makes it straightforward to scope memory to the specific customer or entity being passed in the request payload — no extra configuration needed.

Example

Memory is shared across all agents and customers in your workspace. Always use a customer-specific memoryId — such as the customer’s user ID or claim ID — to prevent one customer’s memory from being accessible to another.
If no memory exists for the given memoryId, the dynamic variable returns null. Handle this gracefully in your system prompt — for example: “If {{ claimMemory }} is empty, treat this as a new customer with no prior history.”

update_memory

update_memory is a post-session function that extracts key information from the conversation and saves it under a given memoryId. If memory already exists at that ID, the function merges the new conversation with the prior memory to produce an updated record — nothing is lost.

How It Works

After the session ends, the LLM reads the full conversation alongside your prompt instructions, extracts the relevant information, and writes it to the memoryId. If existing memory is found at that ID, it is combined with the new extraction so the stored record stays cumulative across sessions.

Parameters

Example

Be specific in your prompt. A vague instruction like “summarise the conversation” produces vague memory that is less useful on retrieval. Instead, describe exactly what to capture — dates, decisions, open issues, customer preferences — so the stored memory is immediately actionable next session.

escalate_to_human

escalate_to_human is a during-session function that hands a live chat conversation over to a human on your team. As soon as the agent calls it, the AI stops replying and your teammates take over the conversation from the dashboard. It is available for chat agents on WhatsApp and Web Chat.

When to Use It

Enable escalate_to_human when some conversations need a person, for example:
  • The customer explicitly asks to speak to a human.
  • The customer is frustrated, upset, or raising a complaint.
  • The request is sensitive or high-value — refunds, account changes, disputes, or cancellations.
  • The agent has tried and still can’t find a reliable answer.
  • The action needs human review or approval before it can go ahead.
If the conversation should move to another AI agent with different skills rather than to a person, use Agent Handoff instead.

Settings

What Happens After Escalation

  1. The AI agent stops replying in this conversation.
  2. If you set a Message, it is sent to the customer.
  3. The teammates in Escalate To receive a notification that opens the conversation. They are notified again whenever the customer sends a new message.
  4. A teammate reads the full conversation in Session History and replies to the customer directly, including attachments.
  5. The session ends when a teammate ends it, or automatically after the usual period of inactivity.
  6. Once the session ends, post-session analysis and post-session functions run, so your reports cover the human part of the conversation too.

Example

Tell the agent clearly in its system prompt when to escalate. Without explicit instructions, the agent may escalate too often or not at all.
Teammates need the Handle session escalation permission in their role to receive escalations and reply to customers. This permission can be limited to specific agents. Teammates listed in Escalate To who no longer have this permission are skipped. Teammates with this permission can also take over any active chat manually from the dashboard, without the agent calling the function.
Escalation is one-way. Once a chat is handed to a human, the AI agent does not resume the conversation. Escalation is not yet available for email or voice agents.

schedule_communication

schedule_communication is a during-session function that books a follow-up with the customer for a later time — a voice call, a WhatsApp message, a Web Chat message, or an email. The agent can also cancel a follow-up it booked earlier if the customer changes their mind. It is available for voice, chat, and email agents.

When to Use It

Enable schedule_communication when customers may want to continue the conversation later, for example:
  • The customer asks to be contacted at a specific time — “Call me tomorrow at 5 pm.”
  • The customer is busy right now — “Can you message me in 2 hours?”
  • The customer needs time to gather documents, check details, or make a decision.
  • The conversation should continue on a different channel — for example, a call followed by an email summary.
  • The customer wants to cancel a callback or message they asked for earlier.
To schedule callbacks as a step inside a workflow rather than at the customer’s request during a conversation, use the Schedule Callback Node.

How the Time Is Decided

  • The agent turns what the customer says into an exact date and time. Relative requests like “in 2 hours” or “tomorrow” are counted from the current time. Clock times like “at 5 pm” or “Monday morning” use the customer’s timezone if it is known, otherwise your business timezone.
  • If the customer doesn’t give a time, the follow-up is sent as soon as possible.
  • If the requested time falls outside your working hours (startWorkingHour / endWorkingHour), it moves to the next opening. A time before the start hour moves to that day’s start hour. A time after the end hour moves to the next day’s start hour. The agent receives the time the follow-up will actually go out, so it can confirm that time with the customer.
  • If the requested time is in the past, nothing is booked and the agent is told why, so it can ask the customer for a new time.

Settings

All settings accept either fixed values or variables from the session.

Available Options

These options are all optional. Set only the ones that apply to the channel you chose. Options marked (group) hold several values, which you enter as JSON, for example {"messageType": "say", "message": "Hi!"}.

Voice Calls

voiceOptions can include:

WhatsApp and Web Chat

whatsappOptions can include:
WhatsApp only allows template messages once 24 hours have passed since the customer’s last message. If the follow-up could go out more than 24 hours after the conversation, use template.

Email

emailOptions can include:

All Channels

What Happens After Scheduling

  1. The agent confirms the scheduled date and time with the customer.
  2. The follow-up appears in Session History as queued (calls) or pending (chat and email).
  3. At the scheduled time, the customer receives the call, message, or email from the chosen agent.
  4. If the customer asks to cancel, all pending follow-ups for that customer on the same agent and channel are cancelled. The current conversation is not affected.

Example

Always set timezone when you set working hours, so follow-ups go out at the right local time for your customers.
Tell the agent in its system prompt to confirm the date and time with the customer before scheduling. This avoids follow-ups at the wrong time when the request is unclear.
If a follow-up can’t be booked because of a setup problem — for example, a missing or unsupported channel, an invalid timezone, or a caller number that doesn’t belong to the chosen channel — the agent tells the customer it couldn’t schedule the follow-up. Check the function’s logs for the session to see what went wrong.

Availability

Next Steps

Agent Handoff

Route conversations to a specialized agent

Custom Functions

Add your own API calls for the LLM to execute