Skip to main content
harbor serve runs jobs and manages sandboxes. Clients connect to the same server and see the same jobs; execution continues when a client disconnects.

Start the server

With Docker running, start the server:
Leave HARBOR_API_KEY unset for this local example. The examples below use the public hello-world task and the oracle agent, which runs its reference solution. No Hub or model API key is needed.
Configure the sandbox provider on the server, then use "environment": {"type": "daytona"} in your job config, or --env daytona in the CLI.

Choose a client

Once the server is running, there are four ways to interact with it:
  1. HTTP / cURL
  2. Harbor CLI with --server
  3. Python SDK (Harbor / AsyncHarbor)
  4. MCP
Choose one of the examples below to submit a job:
Open Submit job, select Local server, leave the Bearer field empty, and click Send on the prefilled example. Or run:
The playground sends real requests from your browser. Allow local-network access if prompted. If blocked, use cURL or http://127.0.0.1:8390/docs.
The server downloads the task from Hub and returns job_id. For local tasks, use path instead of name; paths refer to the server’s filesystem.
Keep the server running. Supply your OpenAI key per job:
Replace your-openai-key with your key. This makes real OpenAI API calls; no server restart is needed.
Restart the server with Daytona credentials:
Submit the OpenAI key per job using your chosen client:

Check progress and results

Recommended: use the Harbor viewer to monitor live progress and browse results and artifacts:
Rollouts move from queued to running to finished. Queued rollouts can pause or cancel; running rollouts can cancel through cancelling. Retry creates a new rollout.

Rollout lifecycle.

Use the returned ID with Get job and List rollouts:
Poll until finished or cancelled. finished means execution ended; inspect rollout error_type and rewards for the outcome.Get rollout returns its full result and artifact URI map. Pass a file URI to Download, or use client.download(uri, destination) to save it locally.
  • Submit a JobConfig; the server resolves it before accepting work.
  • Set dry_run: true to return { "n_trials": 2 } without creating a job or reserving an idempotency key. In the SDK, use client.jobs.submit(config, dry_run=True).n_trials; in the CLI, add --dry-run. Resolution may download tasks.
  • Lists return items, total, and next_page_token. Pass the token as page_token with unchanged filters and sort; an empty token ends traversal. page_size defaults to 50 (also for zero) and is capped at 100. Detail endpoints return full records.
  • Actions take a single job or rollout ID in the URL, e.g. POST /jobs/{job_id}/pause.
  • Pause affects queued rollouts. Cancel stops queued and running rollouts; force: false lets running rollouts finish. Retry creates a new rollout ID in the same job.
  • Submission and retry accept an optional Idempotency-Key. The SDK and CLI generate one per call, except dry runs; supply idempotency_key in the SDK to reuse it after a lost response. Duplicates return 409 with the original job ID or retry rollout IDs. The SDK does not retry requests automatically.
  • HTTP errors return {"error": {"code": "...", "message": "..."}}; the SDK raises harbor.client.APIError. Harbor-API-Version is optional; the SDK supplies it.

Server settings

Use HTTPS for remote deployments. Set sandbox-provider credentials, such as DAYTONA_API_KEY, on the server; send model credentials per job through agents[].env. environment.env sets variables inside the sandbox, not provider credentials. The API & SDK tab has the endpoint reference, and your server exposes its OpenAPI schema at /openapi.json.

Discover agents and sandboxes

List the server’s built-in providers and inspect their configuration options:
Or use the Python SDK:
Options are returned as JSON Schema. See the agents and sandboxes reference for details.