OpenSAI Documentation · v1.1.0

OpenSAI v1.0.0 · Materials v1.1.0

OpenSAI Usage Skill Specification

Translate the user's natural-language computing request into a controlled distributed execution using the connected opensai_* MCP tools, and return the domain output, measured duration, and key scheduling choices (the MCP connection itself is configured in the client beforehand).

1. Choose the Right Execution Entry Point

  1. Prefer registered applications: Call opensai_list_apps first to inspect available applications, their inputs, tunable knobs, and default qos. When an application matches the task, invoke opensai_run_app.
  2. Fall back to DAGs or single tasks: If no registered application fits, inspect available step implementations via opensai_catalog and compose a multi-step workflow (opensai_submit_dag), or call opensai_submit_task for a single algorithm. Query opensai_list_devices and opensai_list_data as needed and reuse discovery results while they remain valid.
  3. Match tool scope to user intent: An explicit request to run or benchmark a task authorizes that execution—proceed directly without redundant confirmation prompts. When the user only asks to inspect cluster state or explain a past run, use read-only tools exclusively.

2. Map User Goals into Tool Arguments

User IntentTool Settings
Domain input values for this run (points, frame, scene)Pass in inputs
Parameters that must stay locked for business correctnessPin in knobs; leave remaining knobs open for platform adaptation
"Finish within N seconds" (meet deadline at highest feasible quality)mode: "deadline", deadline_s: N
"Finish as fast as possible" (with optional quality floor)mode: "fastest", plus optional min_quality
"Meet the deadline while minimizing resource usage"mode: "efficient", deadline_s: N (optional min_quality)

Standard opensai_run_app invocation when cluster_analytics is registered:

json
{
  "app": "cluster_analytics",
  "inputs": {"points": 30000, "seed": 1},
  "deadline_s": 3,
  "wait": true,
  "wait_timeout": 60
}

3. Submit Once and Track Idempotently

4. Compose a DAG or Register an Application Package

5. Verify Data Locality and Transfer Paths

6. Report Actionable, Verifiable Results

  1. Lead with the outcome: State job status (SUCCEEDED / FAILED) and domain output first, followed by wall-clock duration_s, measured quality, and key placement/resource/knob choices from opensai_explain_job (clearly distinguishing predicted estimates from measured outcomes).
  2. Interpret metrics accurately: duration_s is end-to-end job wall time; compute_s, fetch_s, and queue_s sum across nodes and must not be added together when parallel branches overlap. core_seconds measures allocated CPU core-time, while bytes_moved counts useful payload bytes fetched (check path records for multi-hop relay traffic).
  3. Handle failures and long outputs: On failure, inspect the failing node's error message—refresh discovery if an app/algorithm is missing, or check opensai_list_data for missing datasets. If output text is truncated, increase max_result_chars in opensai_get_result (up to 4000) or save full results via the Python SDK.