SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2605.30611 · 2026

CRAFTER: A Multi-Agent Harness for Editable Scientific Figure Generation from Diverse Inputs

Maosong Sun, Minjia Zhang, Xiaotong Li, Zheng Wang, Liang Chen, Zhenhailong Wang, Shuzheng Si, Haozhe Zhao, Zhixiang Liang

arXiv · PDF · Open in the Atlas

Code that ran

3 of 3 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; 3 failures of our instrument; 0 no recorded run), measured 2026-11-23; 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/2605.30611.json · badge: /api/ran/2605.30611.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
HaozheZhao/Crafter canonical (classifier label)
classifier basis: census
3 ran · 0 no recorded run
FunctionStatusWhere it lives
encode_image Ran
ran; our contract draft was wrong, not the code
HaozheZhao/Crafter/crafter/editor/raster_to_svg/model_router.py
code served (permissive licence) · get_code("5639ab5d5241466a")
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 base64
import io
from PIL import Image
import tempfile
import os

# Create a small test image and save it to a temporary file
def create_test_image():
    img = Image.new('RGB', (100, 150), color=(73, 109, 137))
    temp_dir = tempfile.gettempdir()
    test_image_path = os.path.join(temp_dir, 'test_image.jpg')
    img.save(test_image_path, 'JPEG')
    return test_image_path

test_image_path = create_test_image()

ARGS = {
    'path': test_image_path,
    'max_dim': 2048,
    'quality': 90
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL — 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
load_config Ran
ran; our contract draft was wrong, not the code
HaozheZhao/Crafter/crafter/shared/config.py
code served (permissive licence) · get_code("6e955af56f60fc0b")
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 ResolvedConfig. 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 os
import tempfile
from pathlib import Path
import yaml

# Create a temporary YAML config file for testing
temp_dir = tempfile.mkdtemp()
config_path = Path(temp_dir) / "test_config.yaml"

# Write a minimal valid YAML config
config_data = {
    'models': {
        'model1': 'gpt-4',
        'model2': 'claude-3'
    }
}

config_path.write_text(yaml.dump(config_data))

# Set environment variables for the function
os.environ['OPENROUTER_API_KEY'] = 'test-api-key-12345'
os.environ['OPENROUTER_API_BASE'] = 'https://openrouter.ai/api/v1'

ARGS = {
    'path': str(config_path)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
yaml — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ResolvedConfig — a ResolvedConfig output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResolvedConfig 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_json_response Ran
ran; our contract draft was wrong, not the code
HaozheZhao/Crafter/crafter/editor/raster_to_svg/model_router.py
code served (permissive licence) · get_code("19fe7dc0cf7d4879")
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 re

def parse_json_response(text: str) -> dict | list:
    """Extract JSON from LLM response, handling markdown code blocks."""
    text = text.strip()
    if '```' in text:
        blocks = re.findall('```(?:json)?\\s*\\n?(.*?)```', text, re.DOTALL)
        if blocks:
            text = blocks[0].strip()
    try:
        return json.loads(text)
    except json.JSONDecodeError:
        pass
    try:
        import json_repair
        return json_repair.loads(text)
    except Exception:
        pass
    for i, c in enumerate(text):
        if c in '[{':
            try:
                return json.loads(text[i:])
            except json.JSONDecodeError:
                continue
    raise ValueError(f'Cannot parse JSON from: {text[:200]}')


# Test case 1: Plain JSON dict
text_plain_dict = '{"key": "value", "number": 42}'

# Test case 2: JSON inside markdown code block
text_with_markdown = '''```json
{"name": "test", "items": [1, 2, 3]}
'''

# Test case 3: JSON array inside markdown code block
text_with_markdown_array = '''
[{"id": 1}, {"id": 2}]
'''

# Use the first test case for ARGS
ARGS = {
    "text": text_plain_dict
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
json_repair — 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

Also present in other papers' code

Of 3 samples lifted from this paper's linked repositories, 3 carry a function identity and 0 do not. Of the 3 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 3 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-23.

Repositories linked to this paper

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

Abstract

Scientific figures are among the most effective means of communicating complex research ideas, yet producing publication-quality illustrations remains one of the most labor-intensive parts of paper preparation. Existing automated systems each target a single figure type under text-only input, leaving the diversity of types and conditions researchers actually use unaddressed; their raster outputs further cannot be locally revised. Because scientific figures are structured compositions of discrete semantic components, the localized errors generators produce on such layouts demand not a stronger backbone but a harness. We instantiate this harness in two complementary systems: CRAFTER, a multi-agent harness for figure generation that generalizes across figure types and input conditions without architectural changes, and CRAFTEDITOR, which applies the same pattern to convert raster outputs into editable SVGs. Moreover, we introduce CRAFTBENCH, a benchmark spanning three figure types and four input conditions with human quality annotation. Experiments show that CRAFTER substantially outperforms both standalone generators and the agentic baseline on PaperBanana-Bench and CRAFTBENCH, with ablations confirming each component's independent contribution; CRAFTEDITOR faithfully converts outputs into editable SVGs that surpass all baselines. Our code and benchmark are available at https://github.com/HaozheZhao/Crafter.

For agents

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

get_harvested_code_for_paper("2605.30611")
get_code_for_paper("2605.30611")
have("2605.30611")

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

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

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

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

Connect an agent — have() is free.