Skip to main content
Agent collaboration in mixus enables you to build sophisticated workflows where multiple agents work together to accomplish complex tasks. The current implementation focuses on sequential agent chaining - a proven pattern where agents hand off work to each other in a clear sequence.

How Agent Collaboration Actually Works

Sequential Agent Chaining

The primary collaboration pattern in mixus is micro-agent chaining - where one agent completes its work and then runs another agent to continue the workflow. This happens through the findAndRunAgent tool.

Real Implementation

When this step executes, the AI automatically:
  1. Recognizes the “Run the X agent” pattern
  2. Calls the findAndRunAgent tool internally
  3. Starts Agent B in a new chat session
  4. Passes context through instructions or chat history

Context Passing Methods

Method 1: Instruction-Based Context
Method 2: Chat History Context
Method 3: Structured Data Passing

Technical Flow

  1. Agent A Execution
    • Processes its steps normally
    • Final step contains “Run [agent name]” instruction
    • AI recognizes pattern and calls findAndRunAgent tool
  2. Agent Discovery
    • System searches for agent by name using Atlas Search
    • Handles multiple matches with user clarification
    • Validates agent exists and user has access
  3. Agent B Initialization
    • Creates new chat session for Agent B
    • Passes context via instructions or chat history
    • Links execution with parentExecutionId
  4. Execution Tracking
    • Each agent runs in its own chat session
    • Original chat gets confirmation with link to new chat
    • Results can be monitored using searchChatHistory

Practical Examples

Research → Analysis → Report Chain

KPI Monitoring Chain

Advanced Patterns

Multi-User Verification

Different team members can approve different steps in the chain:

Performance Monitoring

Use searchChatHistory to build monitoring systems:

Self-Improving Networks

Agents that optimize other agents:

Key Benefits

1. Reliability

  • Each agent has a focused purpose (1-3 steps)
  • Failures are isolated to specific agents
  • Easy to retry individual agents without restarting entire workflow

2. Cost Efficiency

  • Smaller context windows per agent
  • Reduced token usage compared to monolithic agents
  • Pay only for the processing each agent actually needs

3. Maintainability

  • Clear separation of concerns
  • Easy to modify individual agents
  • Simple to add new agents to existing chains

4. Scalability

  • Agents can be scheduled independently
  • Different agents can use different AI models
  • Easy to add verification points where needed

Implementation Guidelines

1. Agent Design

  • Keep agents focused (1-3 steps maximum)
  • Use clear, descriptive names for easy discovery
  • Include context passing in final steps
  • Add verification only where human oversight is needed

2. Context Management

  • Pass minimal necessary context between agents
  • Use structured data formats when possible
  • Prefer instructions over full chat history for efficiency

3. Error Handling

  • Design agents to handle missing or invalid context gracefully
  • Include fallback behaviors for common failure scenarios
  • Use verification steps for critical decision points

4. Monitoring

  • Create monitoring agents to track chain performance
  • Use searchChatHistory to analyze execution patterns
  • Set up alerts for failed or stalled chains

What’s Next?

The current sequential chaining model provides a solid foundation for agent collaboration. Future enhancements may include:
  • Parallel execution - Running multiple agents simultaneously
  • Dynamic routing - Agents choosing which agent to run next based on results
  • Shared memory - Persistent context sharing between agent executions
  • Event-driven triggers - Agents responding to external events automatically
For now, micro-agent chaining offers a powerful, reliable way to build complex automated workflows that are easy to understand, maintain, and scale.