A multi-expert orchestration pipe for Open WebUI that consults multiple expert models with specialized roles and synthesizes their perspectives into comprehensive, nuanced answers.
Expert Orchestrator implements a Mixture of Agents (MOA) pattern: distribute queries across expert models in parallel, each analyzes through their specialized lens, then a synthesizer model weaves perspectives into one authoritative answer.
Each expert brings a unique analytical framework:
- 🌍 Anthropologist: Cultural context, social structures, collective behavior
- 🤔 Contrarian: Challenges consensus, identifies blind spots and assumptions
- 🎨 Creative: Unconventional thinking, aesthetic and experiential dimensions
- 💰 Economist: Incentives, markets, resource allocation, game theory
- ⚖️ Ethicist: Moral dimensions, fairness, justice, ethical frameworks
- 🔮 Futurist: Long-term implications, emerging trends, scenario planning
- 🧭 General: Balanced, comprehensive, well-rounded analysis
- 📜 Historian: Historical precedents, context, lessons from the past
- 🌟 Optimist: Opportunities, potential, constructive reframing
- 🔧 Pragmatist: Real-world application, implementation, practical constraints
- 🧠 Psychologist: Human behavior, motivations, cognitive biases, group dynamics
- 🔬 Scientist: Evidence-based analysis, logical coherence, scientific rigor
- ♟️ Strategist: Strategic planning, execution, competitive advantage
- 🔗 Systems: Interconnections, feedback loops, emergence, complexity
- ⚙️ Technologist: Technical architecture, implementation, scalability
Configure up to 5 expert models with different perspectives:
- Required: First 3 experts + synthesizer model
- Optional: 4th and 5th experts (leave empty to disable)
- Customizable: Choose which perspective each expert adopts
The pipe uses Open WebUI's Valves system for configuration:
You must provide models IDs from your own Open WebUI setup. No keys or urls are needed.
| Setting | Description | Example |
|---|---|---|
EXPERT_1_MODEL |
First expert model | gpt-5, gemini-2.5-pro |
EXPERT_1_ROLE |
First expert perspective | scientist, economist |
EXPERT_2_MODEL |
Second expert model | gpt-mini, claude-sonnet-4 |
EXPERT_2_ROLE |
Second expert perspective | contrarian, futurist |
EXPERT_3_MODEL |
Third expert model | qwen3, magistral |
EXPERT_3_ROLE |
Third expert perspective | pragmatist, psychologist |
SYNTHESIZER_MODEL |
Synthesizer model | gpt-5, claude-sonnet-4 |
| Setting | Description | Default |
|---|---|---|
EXPERT_4_MODEL |
Optional fourth expert model | `` (disabled) |
EXPERT_4_ROLE |
Fourth expert perspective | you-decide |
EXPERT_5_MODEL |
Optional fifth expert model | `` (disabled) |
EXPERT_5_ROLE |
Fifth expert perspective | you-decide |
MAX_TOKENS |
Max tokens per expert response | 4096 |
Queries are distributed to all experts in parallel. Each expert applies their specialized analytical framework through a custom system prompt. The synthesizer then receives all responses and creates one coherent answer that resolves conflicts, preserves unique insights, and maintains supporting evidence.
User Query → [Parallel Experts] → Scientist, Economist, Pragmatist, ... → [Synthesize] → Unified Answer
- Via Open WebUI UI:
- Navigate to Functions
- Add new function
- Paste the code from
expert_orchestrator_pipe.py - Configure your expert and synthesizer models
1. Distinct Roles with Different Models
Assign different expert roles to different models. Example: gpt-5 as Scientist, claude-sonnet-4 as Ethicist, qwen3 as Pragmatist. Maximizes diversity in both perspective and reasoning. Best for balanced, multi-faceted analysis.
2. Same Role with Different Models
Assign the same expert role to multiple models to compare analytical approaches. Example: Both gpt-5 and claude-sonnet-4 as Scientist experts. Useful for complex domains where different models bring complementary strengths.
3. Different Roles with Same Model
Use a single model to adopt different expert perspectives. Example: gpt-5 as both Scientist and Economist. More economical but still captures perspective variation.
- Parallel execution: All experts run simultaneously, so total time ≈ slowest expert + synthesis
- Token budget: Each expert gets
MAX_TOKENS; synthesizer creates one additional response - Model selection: Mix model sizes and capabilities; synthesizer benefits from capable models
Apache-2.0