SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2602.19672 · 2026

SkillOrchestra: Learning to Route Agents via Skill Transfer

Shafiq Joty, Aws Albarghouthi, Yifei Ming, Frederic Sala, Zixuan Ke, Jiayu Wang

arXiv · PDF · Open in the Atlas

Code that ran

6 of 7 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 6 failures of our instrument; 1 no recorded run), measured 2026-11-22; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2602.19672.json · badge: /api/ran/2602.19672.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
jiayuww/SkillOrchestra canonical (classifier label)
classifier basis: census
6 ran · 1 no recorded run
FunctionStatusWhere it lives
extract_answer_from_tags Ran
ran; our contract draft was wrong, not the code
jiayuww/SkillOrchestra/skillorchestra/eval/metrics.py
code served (permissive licence) · get_code("e5af90dfa9da9b46")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import re
from typing import List, Union, Optional

def extract_answer_from_tags(text: str) -> Optional[str]:
    """Extract answer from <answer></answer> tags."""
    answer_pattern = '<answer>(.*?)</answer>'
    matches = list(re.finditer(answer_pattern, text, re.DOTALL))
    if matches:
        answer_content = matches[-1].group(1).strip()
        pattern_match = re.search('(?:the\\s+)?(?:answer|result|value|solution)(?:\\s+is|:|=)\\s*(.*?)(?:\\s*$|\\.)', answer_content, re.IGNORECASE)
        if pattern_match:
            return pattern_match.group(1).strip()
        return answer_content
    return None


# Test case 1: Text with answer tags and pattern match
text_with_answer = "<answer>The answer is 42</answer>"

# Test case 2: Text with answer tags but no pattern match (returns raw content)
text_with_content = "<answer>This is the extracted content</answer>"

# Test case 3: Text without answer tags
text_without_tags = "This is just plain text with no answer tags"

# Test case 4: Multiple answer tags (should use the last one)
text_multiple_tags = "<answer>First answer</answer><answer>The result is correct</answer>"

# Test case 5: Answer with equals sign
text_with_equals = "<answer>value = 100</answer>"

ARGS = {
    "text": text_with_answer
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
extract_boxed_answer Ran
ran; our contract draft was wrong, not the code
jiayuww/SkillOrchestra/skillorchestra/eval/metrics.py
code served (permissive licence) · get_code("4e5e88005347906a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

# Setup code for extract_boxed_answer function

ARGS = {
    "solution_str": "The answer is \\boxed{42} and that's final."
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
find_rsl_results Ran
ran; our contract draft was wrong, not the code
jiayuww/SkillOrchestra/skillorchestra/converters/from_ar.py
code served (permissive licence) · get_code("b26192125e496306")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned PosixPath. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tempfile
import os
from pathlib import Path

# Create temporary directory structure for testing
temp_dir = tempfile.mkdtemp()
rsl_dir = Path(temp_dir) / "rsl_results"
rsl_dir.mkdir(exist_ok=True)

# Create dataset directories with the specified prefix
dataset_prefix = "dataset_test"
dataset_dir1 = rsl_dir / f"{dataset_prefix}_run1"
dataset_dir1.mkdir(exist_ok=True)

# Create inference_results.jsonl file
inference_file = dataset_dir1 / "inference_results.jsonl"
inference_file.write_text('{"result": "test"}\n')

# Create another dataset directory with same prefix but different name
dataset_dir2 = rsl_dir / f"{dataset_prefix}_run2"
dataset_dir2.mkdir(exist_ok=True)
inference_file2 = dataset_dir2 / "inference_results.jsonl"
inference_file2.write_text('{"result": "test2"}\n')

# Ensure the second file is newer
import time
time.sleep(0.01)
inference_file2.touch()

ARGS = {
    "rsl_dir": rsl_dir,
    "dataset_prefix": dataset_prefix,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type PosixPath — a PosixPath output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PosixPath output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_tasks Ran
ran; our contract draft was wrong, not the code
jiayuww/SkillOrchestra/skillorchestra/converters/from_stage_router.py
code served (permissive licence) · get_code("fbc7eabf139be7d4")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import json
import tempfile
from pathlib import Path

# Create a temporary JSONL file with valid task data
temp_file = tempfile.NamedTemporaryFile(mode='w', suffix='.jsonl', delete=False)
samples_path = temp_file.name

# Write sample task data in JSONL format
tasks_data = [
    {'id': 'task_1', 'question': 'What is 2+2?', 'answer': '4'},
    {'id': 'task_2', 'question': 'What is the capital of France?', 'answer': 'Paris'},
    {'id': 'task_3', 'question': 'What year did World War II end?', 'answer': '1945'},
]

for task in tasks_data:
    temp_file.write(json.dumps(task) + '\n')

temp_file.close()

ARGS = {
    'samples_path': samples_path,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
normalize_answer Ran
ran; our contract draft was wrong, not the code
jiayuww/SkillOrchestra/skillorchestra/eval/metrics.py
code served (permissive licence) · get_code("f23e31c1141ee0fe")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import string
import re

# The function normalize_answer takes a single parameter 's' which is a string
# Looking at the function body:
# - It checks if s is truthy
# - Calls s.lower()
# - Splits and processes words
# - Uses string.punctuation and regex
# All operations are string operations, so we just need a valid string input

ARGS = {
    's': "The quick brown fox, Jakob and Friedrich! Are here?"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
parse_skill_analysis Ran
ran; our contract draft was wrong, not the code
jiayuww/SkillOrchestra/skillorchestra/adapters/stage_router.py
code served (permissive licence) · get_code("50b13c3e6c04c5f9")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned SkillAnalysis. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import json
import re
from dataclasses import dataclass, field
from typing import Any, Dict, List, Optional

@dataclass
class SkillWeight:
    skill_id: str
    percentage: float

@dataclass
class SkillAnalysis:
    stage: str
    required_skills: List[SkillWeight] = field(default_factory=list)
    reasoning: str = ''
    raw_json: Dict[str, Any] = field(default_factory=dict)

def parse_skill_analysis(output: str) -> Optional[SkillAnalysis]:
    pattern = '<skill_analysis>\\s*(.*?)\\s*</skill_analysis>'
    match = re.search(pattern, output, re.DOTALL)
    if not match:
        return None
    try:
        data = json.loads(match.group(1).strip())
        required_skills = [SkillWeight(skill_id=s.get('skill_id', ''), percentage=float(s.get('percentage', 0))) for s in data.get('required_skills', [])]
        return SkillAnalysis(stage=data.get('stage', ''), required_skills=required_skills, reasoning=data.get('reasoning', ''), raw_json=data)
    except (json.JSONDecodeError, KeyError, ValueError):
        return None

# Construct valid test output with proper XML tags and JSON content
output_str = """
<skill_analysis>
{
  "stage": "junior_developer",
  "required_skills": [
    {
      "skill_id": "python",
      "percentage": 85.5
    },
    {
      "skill_id": "javascript",
      "percentage": 72.3
    }
  ],
  "reasoning": "Python is required for backend development, JavaScript for frontend work"
}
</skill_analysis>
"""

ARGS = {
    "output": output_str
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SkillAnalysis — a SkillAnalysis output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SkillAnalysis output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_routing_strategy Not yet run
unverified (harvested, no recorded run)
jiayuww/SkillOrchestra/skillorchestra/adapters/stage_router.py
code served (permissive licence) · get_code("c12a0d6d11a92634")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 7 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Compound AI systems promise capabilities beyond those of individual models, yet their success depends critically on effective orchestration. Existing routing approaches face two limitations: (1) input-level routers make coarse query-level decisions that ignore evolving task requirements; (2) RL-trained orchestrators are expensive to adapt and often suffer from routing collapse, repeatedly invoking one strong but costly option in multi-turn scenarios. We introduce SkillOrchestra, a framework for skill-aware orchestration. Instead of directly learning a routing policy end-to-end, SkillOrchestra learns fine-grained skills from execution experience and models agent-specific competence and cost under those skills. At deployment, the orchestrator infers the skill demands of the current interaction and selects agents that best satisfy them under an explicit performance-cost trade-off. Extensive experiments across ten benchmarks demonstrate that SkillOrchestra outperforms SoTA RL-based orchestrators by up to 22.5% with 700× and 300× learning cost reduction compared to Router-R1 and ToolOrchestra, respectively. These results show that explicit skill modeling enables scalable, interpretable, and sample-efficient orchestration, offering a principled alternative to data-intensive RL-based approaches. The code is available at: https://github.com/jiayuww/SkillOrchestra.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2602.19672")
get_code_for_paper("2602.19672")
have("2602.19672")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2602.19672.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2602.19672.svg)](https://syntology.ai/paper/2602.19672)

Connect an agent — have() is free.