Skip to content

orchestrator

diapason.agents.hybrid.skillorchestra.orchestrator

The SkillOrchestra eval-orchestrator loop.

Faithful port of orchestration/eval_frames.py:run_single — the multi-round search -> reasoning -> answer ReAct loop. Each round:

  1. Build a context string from accumulated docs / code results / attempts.
  2. Ask the orchestrator model (with the 3 tools) for the next stage. The prompt is the verbatim build_skill_orchestrator_prompt when a handbook is loaded, else the baseline "Problem: ... Choose an appropriate tool." string.
  3. Parse the tool call + any <skill_analysis> block; route the worker model alias through the configured RoutingStrategy.
  4. Execute the tool. answer ends the loop; the last round force-calls answer.

The orchestrator step does raw SDK calls (Anthropic / OpenAI) because it needs the parsed tool_use blocks back — the same thing extract_response_content_and_tool_calls does in the original.

run_orchestrator(agent, problem, *, cfg, handbook, strategy)

Run the eval orchestrator on one problem. Returns (answer, metadata).