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; optional /jobs/resolve returns a lock for inspection, not submission.
  • Lists return summaries and next_cursor; pass it as cursor with unchanged filters for the next page. Detail endpoints return full records.
  • Pause affects queued rollouts. Cancel stops queued and running rollouts; soft: true lets running rollouts finish. Retry creates a new rollout ID in the same job.
  • Submission and retry accept Idempotency-Key (idempotency_key in the SDK). Reuse it after a lost response; duplicates return 409 with the original ID. 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.