Skip to content

Add listRecentCursorAgents chat tool for Cursor Cloud status#1076

Draft
ryokun6 wants to merge 1 commit intomainfrom
cursor/list-recent-cursor-agents-a303
Draft

Add listRecentCursorAgents chat tool for Cursor Cloud status#1076
ryokun6 wants to merge 1 commit intomainfrom
cursor/list-recent-cursor-agents-a303

Conversation

@ryokun6
Copy link
Copy Markdown
Owner

@ryokun6 ryokun6 commented Apr 30, 2026

Adds a read-only listRecentCursorAgents developer tool alongside cursorRyOsRepoAgent.

Behavior

  • Same gate as the repo agent: owner account (ryo) + CURSOR_API_KEY.
  • Calls Cursor Cloud Agents API v1 (GET /v1/agents with paging, then GET /v1/agents/{id} and latest run detail) scoped to CURSOR_CLOUD_REPO_URL or default https://github.com/ryokun6/ryos.
  • Inputs: optional limit (default 10, max 100), optional status (matches agent status or latest run status, case-insensitive).
  • Returns compact JSON per run (run id, agent id, timestamps, status, prompt preview from agent name, branch / startingRef / repo URL, dashboard URL). Model field omitted when API does not expose it.

Graceful failures

  • Missing key: clear actionable message (no secrets in logs/response body).
  • Upstream unreachable / auth failure: concise error + hint.

Other

  • Client: useAiChat server-side passthrough + isError recovery list; Telegram status string; EN UI strings.
  • Docs: AGENTS optional env note for CURSOR_API_KEY.
  • Limitation documented in-module: @cursor/sdk runs may not appear in v1 list until Cursor reconciles; tool lists whatever the REST API returns.

Tested
bun test tests/test-cursor-repo-agent-tool.test.ts and bun run build succeeded.

Open in Web Open in Cursor 

Uses Cursor Cloud Agents API v1 (GET /v1/agents + detail + latest run).
Same owner/key gating as cursorRyOsRepoAgent; optional limit and status filter.
Wire client recovery, telegram status, EN strings; document CURSOR_API_KEY in AGENTS.

Co-authored-by: Ryo Lu <me@ryo.lu>
@ryos-deploy
Copy link
Copy Markdown

ryos-deploy Bot commented Apr 30, 2026

The preview deployment for ryos-dev is ready. 🟢

Open Preview | Open Build Logs | Open Application Logs

Last updated at: 2026-04-30 00:43:54 CET

const withScheme = /^https?:\/\//i.test(u) ? u : `https://${u}`;
const parsed = new URL(withScheme);
const parts = parsed.pathname.split("/").filter(Boolean);
if (parts.length >= 2 && parsed.hostname.includes("github.com")) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants