Overview
Sulus provides a powerful multi-agent system called Squads that allows you to transfer calls between specialized assistants.
Sulus provides a powerful multi-agent system called Squads that allows you to transfer calls between specialized assistants.
A Squad is a collection of assistants that work together, where each assistant can hand off a call to another based on the conversation context. Squads enable you to build specialized workflows like routing maintenance vs. leasing inquiries, clinic triage, or customer support escalation.
Define your squad members, each with their own system prompt and tools:
{
"members": [
{
"assistant": {
"name": "Router",
"model": {
"provider": "openai",
"model": "gpt-4o",
"messages": [{"role": "system", "content": "Classify inquiries and transfer accordingly."}]
},
"firstMessage": "Thanks for calling. How can I help?",
"firstMessageMode": "assistant-speaks-first"
}
},
{
"assistant": {
"name": "Specialist",
"model": {
"provider": "openai",
"model": "gpt-4o",
"messages": [{"role": "system", "content": "Domain specialist assistant."}]
}
}
}
]
}
Transfers between assistants are powered by the handoff tool. You can configure it in several ways:
By assistant ID:
{
"tools": [
{
"type": "handoff",
"destinations": [
{
"type": "assistant",
"assistantId": "03e11cfe-4528-4243-a43d-6aded66ab7ba",
"description": "customer wants to speak with technical support",
"contextEngineeringPlan": { "type": "all" }
}
]
}
]
}By assistant name (within a squad):
{
"tools": [
{
"type": "handoff",
"destinations": [
{
"type": "assistant",
"assistantName": "TechnicalSupportAgent",
"description": "customer needs technical assistance",
"contextEngineeringPlan": { "type": "all" }
}
]
}
]
}
You can configure multiple transfer destinations. The recommended pattern depends on your LLM provider:
| Pattern | Best For | Description |
|---|---|---|
| Multiple tools (one destination each) | OpenAI models | Creates separate tool definitions per destination |
| Single tool (multiple destinations) | Anthropic models | One tool with all destinations listed |
For runtime routing, use a dynamic destination type that calls a webhook to determine where to send the call:
{
"tools": [
{
"type": "handoff",
"destinations": [
{
"type": "dynamic",
"server": {
"url": "https://api.example.com/determine-handoff-destination"
}
}
]
}
]
}Your server responds with the destination assistant, or an error to cancel the handoff.
Control what conversation history is passed to the next assistant:
| Type | Description |
|---|---|
| all | Transfers the entire conversation history (default) |
| lastNMessages | Transfers only the most recent N messages |
| userAndAssistantMessages | Filters out system messages, tool calls, and tool results |
| previousAssistantMessages | Only context from before the current assistant's session (useful for PCI compliance) |
| none | Starts the next assistant with a blank conversation |
import { CoreSystemClient } from "@core-system/server-sdk";
const client = new CoreSystemClient({ token: process.env.CORE_SYSTEM_API_KEY! });
await client.calls.create({
transport: { type: "web" },
squad: {
members: [
{
assistant: {
name: "Router",
model: { provider: "openai", model: "gpt-4o", messages: [{ role: "system", content: "Route inquiries to the right specialist." }] },
firstMessage: "Thanks for calling. How can I help?",
firstMessageMode: "assistant-speaks-first",
},
},
{
assistant: {
name: "Specialist",
model: { provider: "openai", model: "gpt-4o", messages: [{ role: "system", content: "Domain specialist." }] },
},
},
],
},
});
Add this to each assistant's system prompt for smooth handoffs:
# System context
You are part of a multi-agent system. Handoffs are achieved by calling a handoff
function, generally named handoff_to_<agent_name>. Do not mention or draw
attention to these handoffs in your conversation with the user.In summary, Sulus Squads let you compose specialized assistants that transfer calls seamlessly using the handoff tool. You can route statically by assistant ID/name, dynamically via webhook, or even hand off to an entire nested squad, all with fine-grained control over what conversation context is passed along.
Read-only access to this documentation from your AI tools. No login, OAuth, or token required — just the endpoint below.
https://docs.sulus.ai/mcp/sulus-docs-public
Settings → Connectors.Add custom connector.Sulus Docs and paste the endpoint above as the Remote MCP server URL.Add, then enable it in your chat.Settings → Connectors.Developer mode (Settings → Connectors → Advanced) if you don't see custom connectors.Create / Add custom connector and paste the endpoint above as the MCP Server URL.No authentication and create the connector.Custom MCP connectors require a ChatGPT plan with developer mode / connectors enabled.