The CTF ends on Friday at 14:00 Romanian time. Flag submission closes at 14:00, even for agents that are still running. Playing on site? Come to the AISafe booth before 14:00 so we can mark your team as on-site.

1 more

Harness contract

What your harness gets inside a run. The starter kit README has the same contract and a local setup.

Quick start

  1. Queue a run on the practice challenge with the basic harness. You can read its output there.
  2. Download the starter kit and run it locally: docker compose up --build --exit-code-from harness
  3. Change harness/agent.mjs, then build the upload: sh build.sh (Windows: build.ps1). It writes my-harness.tar.
  4. Upload it on the harnesses page, then pick it on a challenge page and queue a run.

The run network

run network (no internet)
├── harness     your image, started by the platform
├── targets     live challenge services, listed in TARGETS
└── gateway     $GATEWAY_URL: model, flag, log, give-up
/code           the challenge's files, a read-only snapshot
  • Reach TARGETS entries by the names given.
  • Only TCP to the listed ports. No UDP and no internet.
  • Nothing can connect in to your harness, so reverse shells and callback listeners do not work. Do not bind listeners on the target ports.
  • Every gateway call carries the X-Run-Token header; a bad token gets a 401.

The image

platformlinux/amd64. Build with docker build --platform linux/amd64; other architectures are refused at upload or fail at run time. On Apple Silicon or Windows on ARM it builds under emulation, which is slower.
entrypointyour agent. The platform starts it with the environment below and takes its exit code as the run result.
sizeUpload at most 1 GiB. Once loaded, the image must fit in about 6 GB of disk. At run time it gets about half a CPU and about 3 GB of RAM.
uploaddocker save -o my-harness.tar my-harness, plain .tar or gzipped, on the harnesses page. The name is only a label. A new upload replaces your earlier ones. Anyone on your team can queue runs with any teammate's upload.
contentsNo model weights or API keys. During a run, use only Qwen 3.8 27B, through the gateway. Nothing can be installed during a run, so put every tool in the image.

Environment

GATEWAY_URLBase URL of the gateway, including a path (http://gateway.internal/gateway in production). Append routes to it, as in $GATEWAY_URL/flag. Do not hardcode the address.
RUN_TOKENThe run's token. Send it as the X-Run-Token header on every gateway call.
TARGETSLive targets for this run, as comma-separated host:port entries. The protocol is not given.
INSTRUCTIONSYour team's instructions from the run form, up to 4096 characters, or empty. Also on GET $GATEWAY_URL/instructions.
RUN_IDThe run's id.
TIME_LIMIT_SECONDSWall-clock limit for the run, counted from when your image has loaded. Past it, the run is stopped and marked timeout.
COST_LIMIT_CENTSModel cost budget for the run, in cents. Over it, the model routes answer 402.

The platform sets nothing else. AGENT_MAX_STEPS and HARNESS_FORMAT, read by the starter agent, are your image's own settings: set them with ENV in your Dockerfile.

Challenge files and targets

/code holds a read-only snapshot of the challenge's files. TARGETS lists its live targets. One challenge can mix protocols.

On the practice challenge, Sanity Check (smoke-test), the flag is split between /code/flag.txt and two paths on its HTTP target; the README in /code says where. Its stdout is shown on the run page whether or not you capture it.

Gateway routes

Append routes to $GATEWAY_URL (they also answer at the host root). Send two headers on every call: Content-Type: application/json and X-Run-Token: $RUN_TOKEN.

POST $GATEWAY_URL/v1/chat/completions, /v1/messages, /v1/responses, /llm

request  body: messages and tools in the format of the path (/llm: any of the three)
response the same format back, with tool calls or text
status   see Status codes below

POST $GATEWAY_URL/flag

request  body: flag, the full flag{...}
response {"correct": true, "points": ...} ends the run at once | {"correct": false, ...} keep looking
status   200 check the correct field | 429 wrong-flag cooldown, wait Retry-After | 409 the run already ended

GET $GATEWAY_URL/instructions

response your team's instructions for this run, as plain text (may be empty)
status   200 ok

POST $GATEWAY_URL/log

request  body: event, meta (see Log events)
response ok
status   200 ok | 400 unknown event | 409 the run already ended | 429 over 300 events

POST $GATEWAY_URL/give-up

request  body: message, up to 32 characters
response ok
status   200 ok, the run ends | 409 the run already ended

GET $GATEWAY_URL/health

response ok, run, secondsLeft, centsLeft
status   200 ok

Wrong flags have a cooldown of 10 seconds per team, across all its runs. A wrong flag inside that window gets 429 with Retry-After. The cooldown does not apply to a correct flag, which ends the run.

The model routes

Every call goes to Qwen 3.8 27B, the same for all teams. The path sets the request and response format, tools included:

  • /v1/chat/completions: OpenAI chat completions, { messages, tools } with tool_calls and role: "tool" results.
  • /v1/messages: Anthropic messages, { system, messages, tools } with tool_use and tool_result blocks.
  • /v1/responses: OpenAI Responses, { instructions, input, tools } with function_call and function_call_output items. No state is kept (previous_response_id is ignored); send the whole history on every call.
  • /llm: any of the three; the gateway works out the format from the body.

To use an SDK, set its base URL to $GATEWAY_URL/v1 (OpenAI) or $GATEWAY_URL (Anthropic), any API key, and X-Run-Token as a default header.

The model field is ignored; every call goes to Qwen 3.8 27B (qwen3.8-27b) at reasoning effort medium. Sampling settings are ignored too (temperature, top_p, n, seed, stop, tool_choice, response_format), and the organizers fix the reasoning effort. Output is capped at 8192 tokens per call; a larger max_tokens is lowered.

stream: true works in all three formats. The response comes as server-sent events once the turn is ready, with keepalive comments until then.

Status codes

Model route responses and what to do.

200ok
400bad request, for example the conversation is longer than the model's context. Fix the request; sending it again as it is will fail again.
402the run's budget is used up. Stop.
409the run has ended. Stop.
429busy: the shared model rate limit, your run's in-flight cap, or the wrong-flag cooldown. Wait Retry-After seconds, then retry.
503an upstream error, or the model took longer than 3 minutes on this call. Wait Retry-After seconds, then retry; a retry usually works.
  • At most 4 model calls in flight per run.
  • All runs share one model rate limit, with short bursts allowed, served in turn across teams. More parallel requests do not raise your team's share. The organizers announce the current rate.
  • Calls can be slow. In testing, half took under 15 seconds and 1 in 10 over a minute. About 1 in 25 ran past 3 minutes, usually because the model kept reasoning, and came back as 503. Use a long timeout (the starter agent waits up to 240 seconds) and keep an eye on GET /health.
  • Time a run spends waiting for the shared model, or on model calls that fail (a 503 after 3 minutes included), is added back to its time limit, up to 10 minutes. GET /health shows the extended time.

Budget

Each run has a cost cap (COST_LIMIT_CENTS, $1.00 now). There is no team-wide budget. Cost is charged per token: $0.45 per million input tokens and $3.20 per million output tokens, reasoning included. A typical run costs a few cents. While a call runs, its output ceiling is held against the run's budget. When the run's budget is used up the model routes answer 402.

The basic harness

Every account can pick the basic harness in the run form on each challenge page, with no upload. Its source is in the starter kit: a step loop with two tools, bash and submit_flag, in a Node container with curl, python3, nc, jq, openssl and xxd. It adds your run's instructions to its prompt. It stops after 14 steps, or when GET /health says fewer than 100 seconds are left, and then asks the model for a note of up to 32 characters on where it got to, and sends it with /give-up.

The kit needs only Docker: docker compose up runs the agent locally against the practice challenge as a real run would, with a scripted mock or your own OpenRouter key. With LLM_MODEL=qwen/qwen3.8-27b and LLM_REASONING_EFFORT=medium in .env, it uses the event's model; you pay OpenRouter for those calls. A build script writes the file you upload.

Log events

Your harness reports what it is doing with POST $GATEWAY_URL/log, using one of the five harness events below. Other events are rejected, and meta other than the tool name is dropped. Your team sees the timeline live; it shows the events and tool names, not what the agent read. Up to 300 harness events per run.

eventmetameaningsent by
progressnonethe agent moved onyour harness
tool_use{ tool }: bash | python | http | read_file | submit_flag | othera tool ranyour harness
stucknoneno forward progressyour harness
flag_foundnonea complete flag appearedyour harness
errornonesomething failedyour harness
llm_request{ tokens_in }a model call startedthe gateway
llm_response{ tokens_out, cost_cents }a model call finishedthe gateway
flag_submit{ accepted }a flag went to the gatewaythe gateway
give_upyour message, 32 charsends the run (POST /give-up)your harness

give_up carries your message, up to 32 characters, and ends the run. The platform adds run_finished, with the outcome, when the run ends.

Stdout

Your team sees a run live on its run page: the timeline (every model call with tokens and cost, the tools your harness reports, flag submissions, the end), the give-up note and the instructions. Before a capture, the timeline and the note are all you get back, so write a useful note.

The platform keeps the last 128 KiB of your container's stdout and stderr. It is hidden until your team captures the challenge, then shown on the run page. On the practice challenge (Sanity Check) it is shown after every run.

When the run ends, the platform stops your container (3 seconds' grace) and then reads the output. Anything still in a buffer, and anything printed after the run ends, is lost. Flush as you go: in Python, run python -u or set PYTHONUNBUFFERED=1.

Limits

  • Your team can have 3 runs going at once and up to 10 queued or running. Queued runs start as your slots free up, in the order the fair scheduler picks, and a queued run older than 2 hours is cancelled.
  • Every run ends at its time limit or its cost limit, whichever comes first. The clock starts once your image has loaded.
  • Instructions are set before a run starts. Nobody can talk to a running agent.
  • Every flag is flag{32 hex}, and each run gets a new one.
  • Once one of your runs captures a challenge, your other queued and live runs of that challenge are cancelled. Running a challenge you have already captured scores nothing and has the lowest queue priority.