Bot-to-Bot Communication
Complex workflows often require multiple specialized agents working together. A research agent needs to consult an expert. A manager agent needs to delegate to workers. A quality agent needs to check another agent's output. ChatBotKit's Bot-to-Bot Communication enables these interactions natively, giving your agents the ability to ask questions, delegate tasks, and coordinate with other agents in your account.
Traditional multi-agent setups require custom orchestration code to route messages between agents. With ChatBotKit, communication happens through built-in abilities that agents can use directly during conversations. An agent decides it needs help, calls another agent, receives the response, and continues its work - all without external coordination.
Key Capabilities
Ask Another Agent
The simplest form of bot-to-bot communication. One agent poses a question to another and receives an answer. The receiving agent sees only the question - no additional context - making this ideal for quick consultations where you want fast, focused responses. Use this when your agent needs a specific piece of information or a quick opinion from a specialist.
Call Another Agent
A more sophisticated interaction where the calling agent passes full conversation context along with a detailed action description. The receiving agent understands what happened in the conversation, why it's being called, and what needs to be done. Use this for complex delegations where context matters - analyzing a document the user uploaded, continuing a multi-step process, or performing an action that requires understanding the full situation.
Multi-Agent Queries
Both ask and call support addressing multiple agents simultaneously. Send the same question to several experts and aggregate their responses. Delegate parallel tasks to multiple workers. Get diverse perspectives on a single problem. The agents work independently and return their results to the coordinator.
Dynamic Agent Selection
In addition to pre-configured bot connections, agents can select which bot to communicate with at runtime. List available bots, evaluate their capabilities, and choose the right specialist for the task. This enables adaptive workflows where the agent discovers and uses other agents based on the current situation.
Self-Reprogramming
Beyond communicating with other agents, bots can read and modify their own backstory during conversations. An agent can inspect its current instructions, update them based on new information, and immediately adopt the new behavior. This enables agents that learn and adapt within a single session - refining their approach based on feedback or changing their persona to match the user's needs.
Real-World Use Cases
Hierarchical Task Management
A project manager agent receives complex requests from users and breaks them into subtasks. It calls specialist agents for research, analysis, and content creation, then synthesizes their outputs into a coherent response. The user sees one helpful assistant, but behind the scenes multiple agents collaborate.
Expert Consultation Network
A general-purpose assistant encounters a question outside its expertise. It identifies the appropriate specialist - a legal expert, technical advisor, or domain specialist - and asks that agent for input. The response gets incorporated into the conversation naturally, as if the assistant had the knowledge all along.
Quality Assurance Loops
An agent produces output and then calls a reviewer agent to evaluate it. The reviewer checks for errors, suggests improvements, or approves the work. Based on the review, the original agent can revise its output before presenting it to the user. Quality control happens automatically within the conversation.
Parallel Research and Synthesis
A research coordinator sends the same question to multiple specialist agents - a market analyst, a technical expert, and an industry observer. Each returns their perspective. The coordinator synthesizes these viewpoints into a comprehensive answer that draws on diverse expertise.
Adaptive Assistants
An agent learns from user feedback during a conversation. When the user corrects its approach or provides new preferences, the agent updates its own backstory to incorporate these learnings. Future responses in the same session immediately reflect the adaptation. Persistent learning can then be stored to memory for use across sessions.
How It Works
Bot-to-bot communication is enabled through abilities you add to your skillsets:
bot/ask - Pose a question to a pre-configured bot and receive an answer. The target bot sees only the question, enabling fast and focused responses.
bot/call - Request an action from a pre-configured bot with full conversation context. The target bot understands the situation and can perform complex operations.
bot/ask[by-id] and bot/call[by-id] - Dynamic versions that let your agent specify which bot to communicate with at runtime, enabling flexible routing based on the conversation.
bot/ask[multi] and bot/call[multi] - Address multiple bots simultaneously, perfect for gathering diverse perspectives or delegating parallel work.
bot/list - Discover available bots in your account so agents can dynamically select the right collaborator.
bot/backstory/read and bot/backstory/write - Enable agents to inspect and modify their own instructions, supporting adaptive behavior within conversations.
To set up bot-to-bot communication, create the specialist bots you need, configure their skillsets with appropriate abilities, then add bot communication abilities to your coordinator's skillset. Link specific bots for predictable routing, or use the dynamic abilities for flexible agent selection.
Getting Started
Begin by identifying which agents should be able to communicate. Consider your workflow: Does a general assistant need access to specialists? Should a quality checker review another agent's work? Once you have the topology in mind, create the bots and configure their relationships through skillsets.
For simple setups, use the pre-linked bot abilities where you specify which bot to call at configuration time. For dynamic systems, enable bot listing and the by-id variants so your agents can discover and select collaborators at runtime.
Bot-to-bot communication transforms isolated agents into collaborative teams, enabling workflows that would otherwise require complex external orchestration.