{"query":"Managed Harness Execution API","corpusVersion":"local","generatedAt":"2026-11-03T07:12:02.343Z","results":[{"blockId":"public-api.managed-execution#managed-harness-execution-api","pageId":"public-api.managed-execution","title":"Managed Harness Execution API","pageTitle":"Managed Harness Execution API","url":"https://teammately.ai/docs/public-api/managed-execution.md","humanUrl":"https://teammately.ai/docs/public-api/managed-execution#managed-harness-execution-api","markdownUrl":"https://teammately.ai/docs/public-api/managed-execution.md","sectionId":"managed-harness-execution-api","kind":"api","productArea":"public_api","score":3127.378908019906,"reasons":["search_match","exact_match","title_match","api_intent_match","term_match"],"markdown":"# Managed Harness Execution API"},{"blockId":"public-api.managed-execution#example-request-managed-execution","pageId":"public-api.managed-execution","title":"Example: Request managed execution","pageTitle":"Managed Harness Execution API","url":"https://teammately.ai/docs/public-api/managed-execution.md","humanUrl":"https://teammately.ai/docs/public-api/managed-execution#example-request-managed-execution","markdownUrl":"https://teammately.ai/docs/public-api/managed-execution.md","sectionId":"example-request-managed-execution","kind":"api","productArea":"public_api","score":2377.8917148606515,"reasons":["search_match","exact_match","page_title_match","api_intent_match","term_match","prefix_or_fuzzy_match"],"markdown":"### Example: Request managed execution\n\n```sh\ncurl --fail-with-body \\\n  --header \"Authorization: Bearer ${TEAMMATELY_API_KEY}\" \\\n  --header 'Content-Type: application/json' \\\n  --header \"Idempotency-Key: ${MANAGED_OPERATION_KEY}\" \\\n  --data-binary @managed-run.json \\\n  \"${BENCHMARK_URL}/managed-runs\"\n```\n\n```python\nimport os\nfrom pathlib import Path\nfrom urllib.parse import quote\nfrom urllib.request import HTTPRedirectHandler, Request, build_opener\n\nclass NoRedirect(HTTPRedirectHandler):\n    def redirect_request(self, req, fp, code, msg, headers, newurl):\n        return None\n\nopener = build_opener(NoRedirect())\napi_key = os.environ[\"TEAMMATELY_API_KEY\"]\n\nurl = os.environ[\"BENCHMARK_URL\"] + \"/managed-runs\"\nheaders = {\"Authorization\": \"Bearer \" + api_key}\nheaders[\"Idempotency-Key\"] = os.environ[\"MANAGED_OPERATION_KEY\"]\nheaders[\"Content-Type\"] = \"application/json\"\nbody = Path(\"managed-run.json\").read_bytes()\nrequest = Request(url, data=body, headers=headers, method=\"POST\")\nwith opener.open(request) as response:\n    print(response.read().decode(\"utf-8\"))\n```\n\n```typescript\nimport { readFile } from \"node:fs/promises\";\n\nconst apiKey = process.env.TEAMMATELY_API_KEY!;\n\n{\n  const url = new URL(process.env.BENCHMARK_URL! + \"/managed-runs\");\n  const response = await fetch(url, {\n    method: \"POST\",\n    redirect: \"error\",\n    headers: {\n      Authorization: `Bearer ${apiKey}`,\n      \"Idempotency-Key\": process.env.MANAGED_OPERATION_KEY!,\n      \"Content-Type\": \"application/json\",\n    },\n    body: new Uint8Array(await readFile(\"managed-run.json\")).buffer,\n  });\n  if (!response.ok) throw new Error(`HTTP ${response.status}`);\n  console.log(await response.text());\n}\n```\n\n```go\npackage main\n\nimport (\n    \"bytes\"\n    \"context\"\n    \"fmt\"\n    \"io\"\n    \"log\"\n    \"net/http\"\n    \"os\"\n)\n\nfunc main() {\n    if err := run(context.Background()); err != nil { log.Fatal(err) }\n}\n\nfunc run(ctx context.Context) error {\n    client := &http.Client{\n        CheckRedirect: func(req *http.Request, via []*http.Request) error {\n            return http.ErrUseLastResponse\n        },\n    }\n    {\n        target := os.Getenv(\"BENCHMARK_URL\") + \"/managed-runs\"\n        payload, err := os.ReadFile(\"managed-run.json\")\n        if err != nil { return err }\n        request, err := http.NewRequestWithContext(ctx, \"POST\", target, bytes.NewReader(payload))\n        if err != nil { return err }\n        request.Header.Set(\"Authorization\", \"Bearer \" + os.Getenv(\"TEAMMATELY_API_KEY\"))\n        request.Header.Set(\"Idempotency-Key\", os.Getenv(\"MANAGED_OPERATION_KEY\"))\n        request.Header.Set(\"Content-Type\", \"application/json\")\n        response, err := client.Do(request)\n        if err != nil { return err }\n        payloadBytes, readErr := io.ReadAll(response.Body)\n        response.Body.Close()\n        if readErr != nil { return readErr }\n        fmt.Println(string(payloadBytes))\n        if response.StatusCode < 200 || response.StatusCode >= 300 { return fmt.Errorf(\"HTTP %d\", response.StatusCode) }\n    }\n    return nil\n}\n```"},{"blockId":"public-api.managed-execution#related-reference-pages","pageId":"public-api.managed-execution","title":"Related reference pages","pageTitle":"Managed Harness Execution API","url":"https://teammately.ai/docs/public-api/managed-execution.md","humanUrl":"https://teammately.ai/docs/public-api/managed-execution#related-reference-pages","markdownUrl":"https://teammately.ai/docs/public-api/managed-execution.md","sectionId":"related-reference-pages","kind":"api","productArea":"public_api","score":1965.4572735073439,"reasons":["search_match","exact_match","page_title_match","api_intent_match","term_match","prefix_or_fuzzy_match"],"markdown":"## Related reference pages\n\n{% related-card-grid %}\n- [Authentication](/docs/public-api/authentication)\n- [CLI managed Harness](/docs/cli/managed-harness)\n- [Harnesses](/docs/assets/harnesses)\n{% /related-card-grid %}"},{"blockId":"public-api.managed-execution#prepare-and-admit","pageId":"public-api.managed-execution","title":"Prepare and admit","pageTitle":"Managed Harness Execution API","url":"https://teammately.ai/docs/public-api/managed-execution.md","humanUrl":"https://teammately.ai/docs/public-api/managed-execution#prepare-and-admit","markdownUrl":"https://teammately.ai/docs/public-api/managed-execution.md","sectionId":"prepare-and-admit","kind":"api","productArea":"public_api","score":1765.37466649595,"reasons":["search_match","exact_match","page_title_match","api_intent_match","term_match","prefix_or_fuzzy_match"],"markdown":"## Prepare and admit\n\nPreparation uses the exact saved IDs; acknowledgement does not certify runtime readiness. Inspect returned state and failures. Admission takes those IDs and the current `expected_managed_run_profile_revision`, plus optional existing `compute_profile_id`. The profile token is a concurrency precondition supplied by the server, not a number to choose.\n\nManaged admission can return multiple individual executions according to policy. Inspect every returned ID through the [results API](/docs/public-api/benchmark-results). Admission is not completed generation/judging, and it does not activate a Harness.\n\nPrepare `managed-run.json` with the saved `harness_id` and exact `harness_version_id`. Read `GET /managed-run-profile` and copy its integer `data.revision` into the request field `expected_managed_run_profile_revision`. Export `BENCHMARK_URL` and `MANAGED_OPERATION_KEY`; the latter identifies this logical admission command. These examples submit the file bytes once, without adding automatic retries."},{"blockId":"public-api.managed-execution#definition","pageId":"public-api.managed-execution","title":"Definition","pageTitle":"Managed Harness Execution API","url":"https://teammately.ai/docs/public-api/managed-execution.md","humanUrl":"https://teammately.ai/docs/public-api/managed-execution#definition","markdownUrl":"https://teammately.ai/docs/public-api/managed-execution.md","sectionId":"definition","kind":"api","productArea":"public_api","score":1745.1044852923696,"reasons":["search_match","exact_match","page_title_match","api_intent_match","term_match"],"markdown":"## Definition\n\nManaged execution runs an explicitly submitted Harness against the selected Benchmark Version. It is an alternative to [submitting application outputs](/docs/public-api/evaluation-outputs). Paths below are relative to `BENCHMARK_URL` from the [quickstart](/docs/public-api/quickstart)."},{"blockId":"public-api.managed-execution#operation-sequence","pageId":"public-api.managed-execution","title":"Operation sequence","pageTitle":"Managed Harness Execution API","url":"https://teammately.ai/docs/public-api/managed-execution.md","humanUrl":"https://teammately.ai/docs/public-api/managed-execution#operation-sequence","markdownUrl":"https://teammately.ai/docs/public-api/managed-execution.md","sectionId":"operation-sequence","kind":"api","productArea":"public_api","score":1506.7171474493496,"reasons":["search_match","exact_match","page_title_match","api_intent_match","term_match","prefix_or_fuzzy_match"],"markdown":"## Operation sequence\n\n| Method and path | Input | Retain |\n| --- | --- | --- |\n| `GET /managed-run-profile` | Selected scope | Execution policy and concurrency token |\n| `POST /harness-submissions` | `name`, exact `source` | Issued Harness/Version IDs |\n| `POST /harness-runtime-preparations` | `harness_id`, `harness_version_id` | Preparation acknowledgement/state |\n| `POST /managed-runs` | Saved IDs and `expected_managed_run_profile_revision` | Every admitted execution |\n\nWrites require the operation's `Idempotency-Key`. Preserve exact bytes and a separate key for each command."},{"blockId":"public-api.managed-execution#source-package","pageId":"public-api.managed-execution","title":"Source package","pageTitle":"Managed Harness Execution API","url":"https://teammately.ai/docs/public-api/managed-execution.md","humanUrl":"https://teammately.ai/docs/public-api/managed-execution#source-package","markdownUrl":"https://teammately.ai/docs/public-api/managed-execution.md","sectionId":"source-package","kind":"api","productArea":"public_api","score":1493.6904669917474,"reasons":["search_match","exact_match","page_title_match","api_intent_match","term_match","prefix_or_fuzzy_match"],"markdown":"## Source package\n\n`source.schema_version` is `harness_working_copy.v1`. File entries have relative `path` and UTF-8 `content_text`. The runtime accepts Python `3.12` and the callable `main.py:generate_result(request)`. Source policy permits at most 64 files, 256 KiB each and 1 MiB total. Symlinks, traversal and credential/cache paths are rejected.\n\nUse the [CLI managed-Harness guide](/docs/cli/managed-harness) to package local files and retain recovery receipts. The [OpenAPI](https://api.teammately.ai/v1/openapi.yaml) defines all source/runtime fields."},{"blockId":"cli.managed-harness#related-reference-pages","pageId":"cli.managed-harness","title":"Related reference pages","pageTitle":"Submit a Managed Harness with the CLI","url":"https://teammately.ai/docs/cli/managed-harness.md","humanUrl":"https://teammately.ai/docs/cli/managed-harness#related-reference-pages","markdownUrl":"https://teammately.ai/docs/cli/managed-harness.md","sectionId":"related-reference-pages","kind":"quickstart","productArea":"developer_tools","score":1457.686329202394,"reasons":["search_match","exact_match","term_match"],"markdown":"## Related reference pages\n\n{% related-card-grid %}\n- [Managed execution API](/docs/public-api/managed-execution)\n- [Command reference](/docs/cli/reference)\n- [Benchmark Run troubleshooting](/docs/troubleshooting/benchmark-runs)\n{% /related-card-grid %}"}]}