This repository is configured to test Cursor Cloud Agents behavior through the Cloud Agents API, including:
- custom subagents
- custom skills
- explicit subagent invocation
- subagents invoking skills
orchestration-tester: focused on delegation and explicit skill usage evidenceartifact-verifier: validates generated artifacts and reports pass/fail
capability-checklist: generates auditable PASS/FAIL/UNKNOWN test checklist outputcapability-report: creates/updatesreports/cloud-agent-capability-report.md- includes helper script:
.cursor/skills/capability-report/scripts/render_report_template.py
- includes helper script:
scripts/cloud_agents_api.py- supports common API operations:
launchlist-agentsstatuswaitconversationfollowupstopdeletememodelsrepositories
- includes scenario runner:
run-scenario subagent-smokerun-scenario subagent-skill-chain
- supports common API operations:
subagent-smoke.md: explicit subagent invocation smoke testsubagent-skill-chain.md: tests subagent invocation + subagent-driven skill invocation
- Cloud Agents API overview: https://cursor.com/docs/cloud-agent/api/overview
- Cloud Agents OpenAPI spec: https://cursor.com/docs-static/cloud-agents-openapi.yaml
- Subagents: https://cursor.com/docs/context/subagents
- Skills: https://cursor.com/docs/context/skills
- A Cursor API key (
CURSOR_API_KEY) - Repo accessible by your Cursor account in GitHub
- Python 3
- Cursor GitHub integration enabled for the repo/org
- Create/find your API key in Cursor Dashboard:
- Make sure the account tied to that key can access the target GitHub repo.
- Confirm Cursor has GitHub access for the repository (and org, if private).
- The Cloud Agent must be able to clone and push a branch in that repo.
You can set these manually or via .env.
Required:
CURSOR_API_KEY: your Cursor API key
Optional (recommended):
CURSOR_API_AUTH_MODE(default:basic)CURSOR_API_BASE_URL(default:https://api.cursor.com)CURSOR_API_REQUEST_TIMEOUT_SECONDS(default:60)CURSOR_REPOSITORY(default repository URL for commands)CURSOR_SOURCE_REF(default source branch/ref, e.g.main)CURSOR_REMOTE_NAME(default:origin, used with--infer-repository)CURSOR_MODEL(default model for launch/scenario commands)CURSOR_API_POLL_INTERVAL_SECONDS(default:15)CURSOR_API_WAIT_TIMEOUT_SECONDS(default:1800)
Use the template:
cp .env.example .envThen load it in your shell:
set -a && source .env && set +aexport CURSOR_API_KEY="<your-cursor-api-key>"Or, if using .env:
set -a && source .env && set +apython3 scripts/cloud_agents_api.py me
python3 scripts/cloud_agents_api.py models
python3 scripts/cloud_agents_api.py repositoriespython3 scripts/cloud_agents_api.py run-scenario subagent-smoke \
--infer-repository \
--ref main \
--save-conversation artifacts/subagent-smoke-conversation.jsonpython3 scripts/cloud_agents_api.py run-scenario subagent-skill-chain \
--infer-repository \
--ref main \
--save-conversation artifacts/subagent-skill-chain-conversation.jsonpython3 scripts/cloud_agents_api.py launch \
--infer-repository \
--ref main \
--branch-name "cursor-api/manual-$(date +%Y%m%d-%H%M%S)" \
--prompt-file scenarios/subagent-skill-chain.mdThen poll status and inspect conversation:
python3 scripts/cloud_agents_api.py status <agent-id>
python3 scripts/cloud_agents_api.py wait <agent-id>
python3 scripts/cloud_agents_api.py conversation <agent-id>Default auth mode is basic (matching docs examples). You can switch if needed:
export CURSOR_API_AUTH_MODE=beareror pass --auth-mode bearer on each command.
run-scenario checks assistant-side conversation output for required markers:
SUBAGENT_USED: orchestration-testerSKILL_USED: capability-checklistSKILL_USED: capability-report(for skill-chain scenario)
If markers are missing, the command exits non-zero.
python3 -m unittest discover -s tests -p "test_*.py"- The Cloud Agents API docs currently call out Basic Authentication and link to the OpenAPI spec.
- API docs note that MCP is not yet supported via Cloud Agents API.