Documentation Index
Fetch the complete documentation index at: https://docs.xhipai.com/llms.txt
Use this file to discover all available pages before exploring further.
Collaborate Mode
In Collaborate mode, agents work in iterative rounds. Each agent can build on the previous agent’s output. The process continues until a stopping condition ormaxRounds is reached.
How It Works
maxRounds Config
Maximum number of collaboration rounds. Prevents infinite loops. Set based on your workflow (e.g., 3–5 for typical pipelines).
Example: Iterative Refinement
When to Use Collaborate
Iterative refinement
Draft → Edit → Polish pipelines.
Peer review
Agent A proposes, Agent B reviews and suggests changes.
Multi-stage generation
Each agent adds a layer of value.
Convergence
Agents iterate until output meets criteria.
Tips
Setting maxRounds
Setting maxRounds
Start with 3–5 rounds. Too few may cut off useful iteration; too many increases cost and latency.
Round order
Round order
The order of members matters. Place agents in the sequence that matches your workflow (e.g., drafter first, polisher last).