Quick Start
1
Inline descriptor
Describe the panel inline — no registration needed. The references advise, the aggregator writes the final answer.
2
Named preset (reusable)
Register a preset once and reference it by name — works from Python, YAML, CLI, and bots.
How It Works
On every user turn the references run once (tool-free, trimmed view) and their advisory text is appended to the tail of the latest user turn — never to the system prompt, so Anthropic prompt caching on the system prefix stays intact. The aggregator then runs the normal tool loop with full tools, hooks, and sessions.When To Use This vs. Other Model Features
| Feature | What it does | What it does NOT do | |---Run multiple models as advisors and one as the actor — all selectable as a single LLM.model-router | Picks ONE model per task | Does not ensemble |
| model-fallback | Backup on failure | Not parallel perspectives |
| llm-as-judge | Scores outputs after-the-fact | Does not act as a model |
| multi-model-panel | Multiple references advise + one aggregator acts as a single LLM | — |
Configuration Options
Agent(llm=...) accepts the panel in two equivalent forms:
Panel descriptor keys
Module helpers
Helper APIs such as
register_panel_preset, resolve_panel_config, is_panel_descriptor, create_panel_llm, and the PANEL_PRESETS registry are internal module symbols — see the auto-generated SDK reference for signatures and full details. This page stays focused on using the panel feature rather than documenting module internals.Common Patterns
With tools (aggregator gets full tool loop)
YAML
Local models (Ollama, with base_url)
Disabled panel (escape hatch)
Behavioral Guarantees
- Selectable like any model — flows through CLI
--model panel:deep, YAMLllm: panel:deep, bot/model panel:deep, and PythonAgent(llm=...). - Prompt-cache safe — reference outputs are injected at the tail of the latest user turn, never on the system prompt or history.
- Per-turn reference caching — references run once per user turn, cached across tool-loop iterations by a deterministic signature of the trimmed view. Bounded FIFO cache (max 128 entries).
- Partial-failure tolerance — if one reference fails (network, credentials), it becomes a labeled
(unavailable: reference call failed)note and the turn continues. The whole turn never fails just because a reference did. - Strict-provider safety — references get a trimmed view: system prompt dropped,
tool-role messages dropped,tool_callspayloads dropped. Strict providers won’t 400 on orphan tool messages. - Recursion guard — a panel preset cannot reference another panel preset (rejected at config-validation time with
ValueError). enabled=Falsecollapses cleanly — same cost as selecting the aggregator directly.- Tool-free references — references never see the tool schema and cannot emit tool calls. Only the aggregator acts.
Best Practices
Keep reference_temperature at 0.0
Keep reference_temperature at 0.0
Deterministic reference outputs maximize cache hits and keep the aggregator’s view stable across tool-loop iterations.
Use 2-3 references max
Use 2-3 references max
Each reference is an extra API call per turn. Marginal value drops fast beyond two or three references, while cost grows linearly.
Pick a strong aggregator
Pick a strong aggregator
The aggregator writes the final answer and runs the tool loop. It should be the most capable model in your panel, not necessarily the cheapest.
Don't nest panels
Don't nest panels
A panel preset can’t reference another panel preset — the config validator rejects it with
ValueError. Keep panels flat.Related
Model Router
Pick one model per task.
Model Fallback
Retry on alternate models when the primary fails.

