pi-qdash
pi-qdash gives pi CLI and QDash Agent tools for calibration data and approved operations. Omitted profile and chip arguments use the session selection.
Configuration
For standalone use, install pi and the extension:
npm install -g --ignore-scripts @earendil-works/pi-coding-agent
pi install npm:@oqtopus-team/pi-qdashIf you already use a Python or TypeScript SDK profile, reuse its config.toml. For a new profile, follow the SDK setup to run qdash config init, set your project ID, and supply your API token.
Start pi and run /qdash-setup local <chip_id>, replacing local with your profile name and <chip_id> with your chip. Check the selected chip on the dashboard. Use /qdash-config to inspect the connection without displaying credentials. QDash web Agent includes the extension and supplies its own connection settings.
Standalone pi looks for config.toml in $XDG_CONFIG_HOME/qdash/ (default ~/.config/qdash/). When that file is absent, it reads the existing config.ini. If both exist, tools can select the INI explicitly with configPath. If the selected TOML is invalid or lacks the requested profile, correct the file or profile name. With no selected profile or explicit path, QDASH_BASE_URL selects environment configuration. For file-based connections, omitting the profile selects TOML’s default_profile, or default when unset. Standalone pi requires TLS verification and does not support a profile-level proxy. Use a separate profile if your SDK uses custom transport settings. For legacy INI profiles, set retry_max_attempts to a positive integer. The SDK manages read backoff and ignores legacy backoff settings. In qdash_config_info, active.readAttempts shows the total read-attempt limit. A profile needs credentials before it can connect. Set QDASH_WEB_URL if the web UI is not the API base URL without /api.
If a launch reports an unknown outcome, do not repeat it. Use qdash_get_execution with the reported execution ID. If no ID is available, use qdash_list_executions with the launch's chip and check subsequent pages before reconciling its state. The pipeline and saved-workflow tools do not report such responses as successfully started.
Read-only query tools
| Tools | Result |
|---|---|
qdash_current_time | Current UTC time, and the local time and offset in an IANA time zone when one is named. Needs no QDash connection or approval. |
qdash_list_chips, qdash_get_default_chip | Chip list and default chip. |
qdash_get_chip_metrics, qdash_list_chip_qubits, qdash_list_chip_couplings | Chip metrics and targets. |
qdash_list_cryostats, qdash_list_cooldowns | Cryostats and cooldowns. |
qdash_get_cooldown_wiring, qdash_wiring_insights, qdash_list_cooldown_wiring_events | Wiring, attenuation insights, and event history. |
qdash_get_timeseries, qdash_inspect_timeseries_csv, qdash_compare_timeseries | Timeseries retrieval, local CSV inspection, and comparison. |
qdash_list_task_results, qdash_get_task_result, qdash_get_task_knowledge | Task results and full or summarized task knowledge. |
qdash_summarize_task_results | SDK-backed counts by stored status, task, and day, with completeness diagnostics. |
qdash_get_task_result_evidence | One result with execution, current target values, and optional named cooldown checks; accepts taskId and optional cooldownId. Deferred, read-only, and available in scripts. |
qdash_list_flows, qdash_get_flow | Saved flows. |
qdash_list_executions, qdash_get_execution, qdash_wait_execution, qdash_compare_executions | Execution history, status, and comparison. |
qdash_get_provenance_stats | Provenance statistics. |
qdash_list_forum_posts, qdash_get_forum_post, qdash_list_forum_replies | Forum posts and replies. |
qdash_list_source_roots, qdash_search_source, qdash_read_source | Source trees the server serves with their revisions, literal search of contents or paths, and up to 400 numbered lines of one file. A traceback path such as /app/qdash/workflow/x.py is mapped onto its root. |
qdash_get_figure, qdash_get_task_figures, qdash_recent_calibration_figure, qdash_analyze_figure_json, qdash_build_qcal_evidence | Figure retrieval, analysis, and evaluation evidence. |
qdash_reanalyze_resonator_spectroscopy, qdash_reanalyze_qubit_spectroscopy | A preview of a stored spectroscopy result analyzed again with the overrides in parameters: the re-estimated seed outputs and, unless includeImage is false, the marked figure as a PNG. Accepts qid, optional chipId, and either sourceTaskId or an inline raw Plotly figure. Deferred, read-only, and available in scripts. |
Lists are paginated: task results and executions accept skip and limit (1–100). Executions require one chip and support date (YYYYMMDD) and timezone, not flow/status filters. Execution history includes filter and schedule steps without task results or figures. Pipeline progress exposes their transform outcome and occurrence key; not_recorded means an older run did not record that transform, not that it failed. skipped means the run never reached it. Task history has no date filter; use task results with startFrom and startTo for a period. See client contracts for response shapes.
qdash_summarize_task_results accepts chipId, taskName, qid or couplingId, executionId, username, status, messageContains, startFrom/startTo (aliases startAt/endAt), timezone (default UTC), and maxRows (default 1000, maximum 5000). It reads at most 50 pages of 100 rows. Use the list tool when you need individual result rows. Inspect complete and diagnostics before reporting task/day aggregates as full counts. total and statusCounts are the first page's totals; statusCounts excludes the status filter. Offset reads are not a snapshot. See the SDK summary contract for partial results and recovery.
qdash_get_task_result_evidence reports each context part as ok, failed, not_applicable, or not_associated. A failed result read fails the tool; a failed context read leaves the other parts available. Target values are current and may come from a later result. The API does not expose the result's cooldown association: without cooldownId, cooldown is not_associated. A supplied cooldown is checked for chip membership and time compatibility, not proven provenance. The same reads are available through the SDK.
The reanalysis tools call POST /chips/{chip_id}/qubits/{qid}/reanalyze/resonator-spectroscopy or .../qubit-spectroscopy. QDash reads the stored raw figure, or the request's figure, stores nothing, and uses no hardware. An inline figure must have a raw heatmap as its first trace, with plain lists of finite numbers on a grid of at least 2 x 2, must not be labeled as marked, and is at most 20 MiB as JSON. QDash keeps only that heatmap and plain-text titles, so other traces and layout content such as images are dropped before analysis and rendering; stored run parameters do not apply to it, and the response's source_task_id is null. Passing both sourceTaskId and figure fails. The resonator tool returns readout_frequency, optimal_power (dB), and readout_amplitude (a.u.); the qubit tool returns coarse_qubit_frequency (also as qubit_frequency), coarse_control_amplitude, f01_repr_db, f01_quality_level, and qubit_anharmonicity when f12 is found. The image is recorded under the source task's name, so qcal_evaluate for that task evaluates it. When the server cannot render a PNG, the result says so with a fixed message, still returns the outputs, and tells the model not to evaluate an older stored figure in its place; the cause is in the API server log. A script receives the outputs, never the image.
Timeseries parameters use exact stored names. Local CSV comparison never uploads files; each file is limited to 10 MB. qdash_current_time reads the tool host's clock, not hardware time; give an IANA zone explicitly for local time. Source reads return at most 400 numbered lines.
Overview and insight tools
| Tools | Result |
|---|---|
qdash_investigate, qdash_compare_calibration | Recent calibration correlations and repeated-output comparisons. |
qdash_dashboard, qdash_dashboard_insights, qdash_recent_calibration_summary | Status, insight, and calibration summaries. They do not read or change custom dashboards. |
qdash_recommend_next_action, qdash_triage_overview, qdash_target_report | Conservative next actions, triage, and target reports. |
qdash_plan_calibration, qdash_validate_calibration | Dry-run plan and read-only validation gates. |
qdash_degradation_report | Provenance drift, changes, locks, and downstream recommendations. |
These are read-only summaries. The dashboard tools above do not change custom dashboards. qdash_compare_calibration follows compareLatest.
Agent calibration loop tools
| Tool | Purpose |
|---|---|
qdash_list_agent_sessions | List sessions; defaults to your active or paused sessions |
qdash_get_agent_session_context | Read scope, budget, candidates, intervention, and permitted next step |
qdash_run_agent_session_step | Run one authorized task on one qubit; record its decision before dispatch |
qdash_request_agent_human | Pause and ask an expert; consumes no action budget |
qdash_commit_agent_session_update | Commit an accepted candidate under the session's parameter-update grant |
qdash_record_agent_decision | Append audit reasoning; changes no session state |
qdash_end_agent_session | Request completion or stop, with per-call confirmation |
qdash_get_agent_session_audit | Read an audit snapshot; default 50 events, maximum 200 per page |
qdash_wait_agent_intervention | Wait for an answer; timeout defaults to 900 seconds, maximum 3600 |
Session-granted execution requires the signed-in creator's approved auto session, remaining budget, and no work in flight. Commits additionally require a matching parameter_updates grant; backend application requires apply_backend. Missing grants or unconfirmed decisions block the write. Replayed calls reuse their records.
A timeout leaves the session paused. Ending a session does not cancel work already admitted. No pi-qdash tool answers or resumes an intervention; the expert does that in QDash. See Agent Calibration.
Agent calibration workflow tools
| Tools | Purpose |
|---|---|
qdash_create_agent_session, qdash_get_agent_session | Create an approved scope or inspect it |
qdash_submit_agent_action, qdash_get_agent_action, qdash_list_agent_actions, qdash_wait_agent_action | Propose and track actions |
qdash_list_agent_interventions | Read expert questions and answers |
qdash_list_agent_action_candidates | Inspect staged outputs |
qdash_execute_agent_action | Measure using current inputs; leave outputs staged |
qdash_commit_agent_candidate, qdash_commit_agent_candidate_set | Commit reviewed candidates |
qdash_get_agent_candidate_commit, qdash_apply_agent_candidate_commit, qdash_wait_agent_candidate_apply | Inspect and apply a commit |
The creation tool accepts no numeric override bounds or quality gates. Its approved task checks determine candidate acceptance; evaluation can be off or required. The confirmation shows the full grant. Ordinary write tools require per-call review.
Calibration session tools
A calibration session groups work toward an objective; it grants no execution permission.
| Tool | Purpose |
|---|---|
qdash_create_calibration_session | Create an objective on a chip, after confirmation |
qdash_get_calibration_session | Read runs, experiments, recommendation, and outcomes |
qdash_record_calibration_decision | Append the creator's decision and evidence |
qdash_get_calibration_session_audit | Read an audit snapshot; default 100, maximum 500 events per page |
qdash_list_calibration_sessions | List objectives; default 20, maximum 100 |
Use calibrationSessionId to associate a run with your open session on the same chip. Otherwise QDash creates an automatic session and closes it when its work ends. Closed sessions refuse new work; create a manual objective session for multiple trials. Audit records distinguish measured evidence from reported reasoning; they do not establish the current hardware state.
Pipeline and flow operations
| Tool | Purpose |
|---|---|
qdash_get_pipeline_catalog | Get step types, task documentation, and spec schema |
qdash_plan_pipeline | Validate a version 2 spec without running it |
qdash_create_pipeline_plan | Validate and persist an expiring proposal; available in scripts, starts nothing |
qdash_run_pipeline | Start a spec or stored planId after confirmation; supply exactly one |
qdash_save_flow | Validate, save, and register a workflow after confirmation |
qdash_execute_flow | Run a saved workflow after confirmation |
Launch tools return an execution ID without waiting. Pipelines save accepted outputs directly; they do not use agent candidate gates. An overlapping session waiting for an expert blocks a launch, as does an inability to check sessions. Replayed launch calls reuse their run; an unknown launch outcome must be investigated, never retried blindly.
Metric scripts and dashboards
| Tool | Purpose |
|---|---|
qdash_validate_metric_script | Compile draft source and return metrics or diagnostics |
qdash_preview_metric_script | Evaluate a draft or saved metric without saving |
qdash_save_metric_script | Save after validation and confirmation; expectedRevision guards edits |
qdash_save_dashboard | Save after confirmation; expectedVersion guards edits |
Validation and preview execute code on the server, so call them directly, not inside scripts. Series previews need 1–16 targets. Dashboard panels pin a script revision; updating panels replaces the entire list. HTTP 409 means a concurrent save: reload before editing again. qdash_query reads script and dashboard catalogs, templates, and saved records.
Forum and figure tools
| Tool | Purpose |
|---|---|
qdash_analyze_figure_json | Summarize Plotly scatter and heatmap data |
qdash_build_qcal_evidence | Assemble task context and figures for evaluation |
qdash_preview_forum_evidence_reply, qdash_preview_forum_image_reply | Preview a reply without publishing |
qdash_create_forum_evidence_reply, qdash_create_forum_image_reply | Publish after confirmation |
qdash_create_forum_post, qdash_update_forum_post | Create or update a post after confirmation |
Image replies accept at most eight PNG, JPEG, GIF, or WebP files, at most 5 MB each.
Fallback tools
qdash_query provides other reads. Its file actions cover calibration configuration only; use source tools for code. In standalone pi, use qdash_raw_get only when neither a dedicated tool nor a qdash_query action covers the read.
Safety
Credentials are redacted. Reviewed writes show all arguments and require confirmation; without a UI they are refused. A model's confirmWrite argument grants nothing. Changed arguments or a cancelled turn invalidate approval. Session-granted writes remain limited to their approved scope.
Scripts and deferred tools
tool_search loads specialist tools. codemode batches audited reads as JSON and can persist pipeline proposals with qdash_create_pipeline_plan. Execution, other writes, figures, shell tools, and unaudited calls are blocked. Call them directly. A script result is limited to 512 KiB; the default timeout is 120 seconds, capped at 300.
Scripts can build calibration specs with qdash.calibration, the same pure builders as the TypeScript SDK. Load qdash_create_pipeline_plan with tool_search first. Replace the chip and targets with values from your deployment:
const c = qdash.calibration;
const spec = c.calibrationSpec(c.qubitTargets(["0", "1"]), [
c.customOneQubit({ step_name: "t1", tasks: [c.taskCall("CheckT1")] }),
c.filterByStatus({ step: "t1" }),
]);
const plan = await tools.qdash_create_pipeline_plan({ chipId: "64Qv3", spec });
text(plan);Resolve any validation problems, then use the returned plan_id as planId in a direct qdash_run_pipeline({ chipId: "64Qv3", planId }) call. The host retrieves the stored content for approval; the model does not copy its spec or supply an approval digest. Plans expire after 24 hours. If expired or changed state invalidates the proposal, build and approve a new plan. For validation without storage, use qdash_plan_pipeline; its valid spec can still be passed directly to qdash_run_pipeline.
This runs an ordinary pipeline; agent-session measurements must use the session's own step tools. Proposal storage does not enable measurements, other writes, or waits inside scripts. Use the literal qdash.calibration reference; helpers are installed when the source names qdash, not through dynamically assembled names.
Classified deferred tools include a Request type line in their searchable descriptions. Search with purpose words such as diagnosis task result evidence or measurement preparation, or use an exact tool name. The shared guide covers stored values, diagnosis, measurement preparation, and writes; it does not restrict access when the request changes or combines purposes.
Tool selections persist across sessions. PI_QDASH_CODEMODE=off disables default activation. Without tool_search, deferred tools become directly available. Load only one copy of pi-qdash; script access fails closed when tool identity cannot be verified.
Evaluation hydration
With pi-qcaleval installed, pi-qdash supplies missing task knowledge, matching figures, and requested examples to qcal_evaluate. It skips figures belonging to other tasks. Explicit valid criteria are preserved; details.hydration records origins without image bytes or knowledge text.
Commands
| Command | Effect |
|---|---|
/qdash-setup [profile] [chip_id] | Set session profile and chip, refresh footer status, and open the dashboard. |
/qdash-use-profile <profile> | Select the active profile. |
/qdash-use-chip [chip_id] | Select the active chip. |
/qdash-use-target qid <qid> | coupling <coupling_id> | Select an investigation target. |
/qdash-use-agent-session <session_id> | Select an agent session. |
/qdash-investigation-setup [json] | Set a session-local timeseries comparison preset. Local CSV paths do not enter global profile/chip context. |
/qdash-clear-investigation | Clear the comparison preset without changing the profile or chip. |
/qdash-context | Show current session context. |
/qdash-dashboard [limit] | Show the dashboard. |
/qdash-target-report qid <qid> | coupling <coupling_id> | Show a target report. |
/qdash-plan-calibration | Show a dry-run calibration plan. |
/qdash-degradation-report | Show the degradation report. |
/qdash-wiring-insights | Show wiring insights. |
/qdash-refresh [limit] | Refresh the dashboard. |
/qdash-clear-context | Clear session context. |
/qdash-config [profile] | Show non-secret configuration. |
Skills
| Skill | Purpose |
|---|---|
/skill:qdash | Select tools and protect credentials |
/skill:qdash-agent-calibration | Work within an approved agent session |
/skill:qdash-chip-bringup | Prepare capture delay and spectroscopy |
/skill:qdash-one-qubit-calibration | Calibrate and recover one-qubit tasks |
/skill:qdash-two-qubit-calibration | Calibrate directed pairs |
/skill:qdash-zx90-optimization | Search within approved bounds; each pipeline needs approval |
/skill:qdash-characterization | Measure coherence, transitions, noise, and coupling |
/skill:qdash-rabi-after-configure | Check the Rabi prerequisite and trace inputs |
/skill:qdash-timeseries-diagnosis | Investigate drift and sensor data |
/skill:qdash-metric-scripts | Author metrics and dashboards |