Stage 01 / Integration
Integrate Your Agent
Connect your existing Agent to the FluxBench runtime contract: read the task, call the model, produce deliverables and run EDA through the platform commands.
Configure the Agent entrypoint
Provide an entrypoint that the container can run at startup, for example fluxbench_entry.py. The filename and language are up to you. It must:
- Read the platform task instructions and benchmark inputs.
- Use the model configuration selected on the website.
- Write deliverables to the task workspace.
- Print stage progress to stdout.
- Exit when complete: return 0 on success and nonzero on failure.
Runtime values
| Environment variable | Use |
|---|---|
TASK_PROMPT_PATH | Required. Path to the platform-generated task instructions. |
TASK_WORK_DIR | Required. Workspace for scripts, runtime files and deliverables. |
FLUXBENCH_INPUT_ROOT | Required. Read-only benchmark inputs and checklists. |
FLUXBENCH_OUTPUT_ROOT | Required. Directory collected by the platform. |
FLUXBENCH_TASK_FILE | Used to identify upload preflight; when eda is null, write the probe file and exit without model or EDA calls. |
OPENAI_API_KEYOPENAI_BASE_URL | Use when the OpenAI protocol is selected. |
ANTHROPIC_API_KEYANTHROPIC_BASE_URL | Use when the Anthropic protocol is selected. |
MODEL_NAME | Model ID selected on the website during evaluation. |
MODEL_NAME is missing, the entrypoint should fail clearly. You do not need to install DC, Innovus or PrimeTime or mount host EDA directories in the image.The example shows the entrypoint structure. Replace MyExistingAgent and agent.run(...) with your framework call; upload preflight has no model configuration.
import json
import os
import sys
from pathlib import Path
def required(name):
value = os.environ.get(name)
if not value:
raise RuntimeError(f"Missing environment variable: {name}")
return value
task = json.loads(Path(required("FLUXBENCH_TASK_FILE")).read_text())
input_dir = Path(required("FLUXBENCH_INPUT_ROOT"))
output_dir = Path(required("FLUXBENCH_OUTPUT_ROOT"))
work_dir = Path(required("TASK_WORK_DIR"))
prompt = Path(required("TASK_PROMPT_PATH")).read_text(encoding="utf-8")
output_dir.mkdir(parents=True, exist_ok=True)
# Upload preflight is identified by the task manifest and has no model credentials.
if task.get("eda") is None:
(output_dir / "smoke_probe.txt").write_text("ok\n", encoding="utf-8")
sys.exit(0)
api_key = os.environ.get("OPENAI_API_KEY") or os.environ.get("ANTHROPIC_API_KEY")
base_url = os.environ.get("OPENAI_BASE_URL") or os.environ.get("ANTHROPIC_BASE_URL")
model = os.environ.get("MODEL_NAME")
if not api_key or not base_url or not model:
raise RuntimeError("Model configuration is incomplete")
agent = MyExistingAgent(api_key=api_key, base_url=base_url, model=model)
success = agent.run(prompt=prompt, input_dir=input_dir,
work_dir=work_dir, output_dir=output_dir)
sys.exit(0 if success else 1)Print one JSON progress record per line to stdout. Use dc, innovus or pt as the stage; emit END only after the stage checks pass.
print(json.dumps({"kind": "stage_progress", "stage": "dc", "event": "START"}), flush=True)
# Run DC and confirm its output checklist passes, then:
print(json.dumps({"kind": "stage_progress", "stage": "dc", "event": "END"}), flush=True)Call the platform EDA tools
Your Agent calls EDA through the platform commands on the image PATH, like ordinary CLI tools. Change to the relevant task directory and run the Tcl script for that stage.
# Tcl scripts must be inside the task workspace and use the .tcl suffix
dc_shell -f synth.tcl
innovus -nowin -init route.tcl
pt_shell -f timing.tcl
# PrimeTime DMSA mode: pt_shell -multi -f eco.tclUse -f SCRIPT with dc_shell and pt_shell; Innovus uses -init SCRIPT in non-GUI mode. -multi is only for PrimeTime. The commands run the real EDA tools on the Worker, stream logs to stdout/stderr and return the operation result through the exit code. The image must include Python 3 for the command bridge.
The current directory and Tcl script must stay inside the task workspace, and the script must use the .tcl suffix. Interactive EDA shells are not supported. Inspect tool logs and run the relevant stage output checks instead of treating a zero exit code alone as proof that the deliverables are valid.
Tcl can read inputs through $::env(FLUXBENCH_INPUT_ROOT) and locate deliverables through $::env(FLUXBENCH_OUTPUT_ROOT). The container and Worker EDA tools see the same absolute task paths. Preserve the injected PATH when starting a child shell, and avoid login shells that reset the environment. Do not package commercial EDA software, licenses or technology libraries.
Stage 02 / Packaging
Package and Build the Image
The image is the container used to start your Agent. Install dependencies during the build and declare the entrypoint as the default startup command.
USER 1000:1000 is recommended..env, keys, SSH credentials, caches and old results.FROM python:3.11-slim
WORKDIR /opt/agent
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY src/ ./src/
COPY fluxbench_entry.py .
USER 1000:1000
ENTRYPOINT ["python", "-u", "/opt/agent/fluxbench_entry.py"]Build and export the image from the directory containing the Dockerfile:
docker build --platform linux/amd64 -t my-agent:v1 .
docker save my-agent:v1 | gzip > my-agent.tar.gz.tar or .tar.gz archive created by docker save, no larger than 1 GiB. Do not use docker export.Stage 03 / Submission
Upload and Submit
After the image passes upload preflight, choose the benchmark and runtime configuration and submit the evaluation.
- Sign in to FluxBench, open Public Eval, select Customer worker and upload the
.taror.tar.gzimage. - Wait for automatic preflight. A passing image shows Verified; if it fails, review the checks and logs, fix the image and upload it again.
- Select the benchmark, model/API configuration, target Worker and frequency, then confirm the evaluation.