kosa8 docs Dashboard
esc
↑ ↓ move↵ openRuns in your browser; nothing you type is sent anywhere.

CLI / job / submit

kosa8 job submit

Submit a job: run every task's solver and grade it sealed, server-side

Usage#

kosa8 job submit {TASKS.jsonl --solver CMD --grader CMD | --benchmark NAME --instances IDS|all|N (--solver CMD | --patches FILE | --oracle)} [flags]

TASKS.jsonl has one task a line: {"id": "t1", "input": {…}, "files": {"/path": "<base64>"}} (- reads stdin). Each task runs in a sandbox of its own: its files are written there, its input is in $KOSA8_TASK_INPUT and in the file $KOSA8_TASK_INPUT_FILE, and the --solver command runs (in sh -c, up to --solver-timeout). Then the --grader command runs in a sealed copy with the --grader-file files, which the solver never sees; its last stdout line {"reward": 0.75} is the reward (else exit 0 is 1.0, other 0.0).

--benchmark runs a ready-made benchmark instead (kosa8 bench ls): no TASKS file, no --grader. Each instance runs in its official environment, built by kosa8 on first use, and is graded by the benchmark's own grader in a sealed copy. The solver is your --solver command (its input in $KOSA8_TASK_INPUT_FILE, the problem in /workspace/.kosa8-task/problem.md or instruction.md, the code in $KOSA8_TASK_WORKDIR), --patches FILE (SWE-bench predictions: JSONL or JSON of {instance_id, model_patch}), or --oracle (the reference solutions: a check of the environments).

--estimate prints the sandbox-hours and list cost instead of submitting. Prints the job's ID; --watch follows it until it ends.

Options#

FlagTypeWhat it doesDefault
--benchmarkstringrun a ready-made benchmark (kosa8 bench ls), e.g. swe-bench-verified or terminal-bench-2.1—
--budgetfloat64stop starting tasks once the job has cost this many US dollars (list rates)0
--concurrencyinttasks running at once (default: the API's; at most the plan's running limit)0
--estimateboolprint the sandbox-hours and list cost; submit nothing—
--graderstringthe command that scores a solved sandbox, run sealed (no network) with sh -c—
--grader-filestringArraya hidden file for the grader, LOCAL:/PATH (repeatable, 1 MiB in all)[]
--grader-timeoutdurationstop the grader after this long (1s to 90s)1m0s
--imagestringmake each task's sandbox from this image—
--instancesstringwith --benchmark: instance ids (comma-separated), all, or N for a seeded sample of N—
--leasedurationeach sandbox's lease, which the job renews while it runs (2m to 24h; default: the API's)0s
--namestringthe job's name (default: the tasks file's name)—
--oracleboolwith --benchmark: run the reference solutions (a check of the environments)—
--patchesstringwith --benchmark (SWE-bench): grade these predictions, JSONL or JSON of {instance_id, model_patch}—
--projectstringgroup the job and its RL run under this project—
--retriesintretry a task this many times after an infra failure, then mask it (0 to 5)2
--seedintwith --benchmark --instances N: the sample's seed0
--sizestringeach sandbox's size, vCPU x GiB (e.g. 0.5x1, 2x4)—
--snapshotstringmake each task's sandbox from this snapshot (snap_…)—
--solverstringthe command that solves a task, run with sh -c in its sandbox—
--solver-envstringArrayset a variable for the solver, NAME=value or NAME for this shell's value (repeatable)[]
--solver-filestringArraywith --benchmark: a file for every task's sandbox, LOCAL:/PATH (repeatable, 256 KiB in all)[]
--solver-timeoutdurationstop a task's solver after this long (1s to 24h)10m0s
--templatestringmake each task's sandbox from this template (e.g. python)—
--watchboolfollow the job until it ends, as kosa8 job watch does—

Example#

  kosa8 job submit tasks.jsonl --template python --solver "python /work/solve.py" \
      --grader "pytest -q /hidden/test.py" --grader-file tests/test.py:/hidden/test.py --concurrency 64 --budget 20
  kosa8 job submit tasks.jsonl --template python --solver ./solve.sh --grader ./grade.sh --estimate
  kosa8 job submit --benchmark swe-bench-verified --instances 50 --solver "python /workspace/agent.py" --solver-file agent.py:/workspace/agent.py
  kosa8 job submit --benchmark swe-bench-verified --patches preds.jsonl --watch
  kosa8 job submit --benchmark terminal-bench-2.1 --instances all --oracle --estimate

The kosa8 weekly

Agent security news, one industry deep-dive and a hands-on challenge, every Monday. Unsubscribe in one click.

© 2026 kosa8 · kosa8.com · AI Agent Sandbox: Secure and Sovereign for Enterprise · Local models served by llamay · Agent gateway: MAQPNA