cortex_launch
Launch governed Cortex jobs to answer complex operational questions and track divergence/error findings, with ACL-filtered evidence and sync or async execution.
Instructions
Launch a Cortex job through the GOVERNED launcher (POST /v1/cortex/jobs/launch) — the preferred path for the read-only complex_query analyst and divergence_error_tracking. The actor is resolved server-side from the API key and all evidence is ACL-filtered before prompt construction (fails closed against cross-project leak). mode="sync" runs now and embeds result/error; mode="async" enqueues — poll with cortex_get_result or cortex_job_runs. Returns {job_id, status, mode, deduplicated, result?, error?}. Idempotent when idempotency_key is supplied.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | "sync" runs now and embeds the result; "async" enqueues and returns the queued job. | |
| job_kind | Yes | complex_query = read-only cited analyst for operational questions. divergence_error_tracking = aggregate divergence/error findings for a target. | |
| question | No | Free-form question for the analyst. Recommended for complex_query. | |
| project_id | Yes | Project the job runs against. Used for target access checks and evidence filtering. | |
| target_ref | Yes | Stable reference to the target (e.g. "run_1", "case_123", or the project_id for target_type="project"). | |
| target_type | Yes | What the job runs against. | |
| idempotency_key | No | Dedupe key. Re-launching with the same key returns the existing job with deduplicated=true. |