Skip to content

[harness] Add Cloud Agent API providers (Cursor, Copilot, Claude Agent SDK) #295

@santoshkumarradha

Description

@santoshkumarradha

Parent Epic

Part of #291 — Add Cursor as a Harness Provider (Cursor Cloud component)

Summary

Beyond local CLI harnesses, several providers now offer cloud-hosted agent APIs that can execute tasks remotely. This issue tracks research and implementation of cloud agent providers as a new category of harness.

Cloud Agent API Landscape (as of March 2026)

Provider API Maturity How It Works
Cursor REST API at api.cursor.com/v0/agents Beta (all plans) POST to launch agent, poll/webhook for status, operates on GitHub repos, creates PRs
GitHub Copilot REST + GraphQL API Production (Pro/Business/Enterprise) Assign issues to Copilot via API, runs as background agent, creates PRs
Anthropic Claude Claude Agent SDK (claude-agent-sdk) Available (Python + TypeScript) Programmatic query() function with streaming, local execution, not a hosted API
OpenAI Codex ChatGPT UI only No public REST API Cloud agent in ChatGPT sidebar, no programmatic access yet

Design Considerations

These are fundamentally different from CLI providers:

Aspect CLI Providers Cloud Agent Providers
Execution Local subprocess Remote HTTP/REST
File access Local filesystem GitHub repos (or none)
Output stdout (text/JSON/NDJSON) REST polling or webhooks
Latency Real-time streaming Async (minutes to hours)
State Session ID for resume Agent ID for follow-up
Cost model Per-token (user's API key) Per-task or subscription

Open Questions

  1. Should cloud agents implement the same Provider interface? They're async by nature — Execute() would need to either block-and-poll or return a handle for later collection.
  2. Should this be a separate CloudProvider interface? With methods like Launch(), Status(), Collect(), Followup(), Stop().
  3. How to handle file I/O? CLI providers read/write local files. Cloud agents operate on remote repos. The .agentfield_output.json pattern doesn't directly apply.
  4. Webhook vs polling? Cursor supports webhooks. Copilot uses status polling. How to unify?

Suggested Approach

Phase 1: Implement Cursor Cloud as the first cloud provider — it has the most complete REST API.
Phase 2: Add Copilot (if GitHub API access is available).
Phase 3: Evaluate Claude Agent SDK (it's more of a library than a cloud API).

Cursor Cloud API Reference

POST   /v0/agents              — Launch agent (prompt, model, repo, branch, webhook)
GET    /v0/agents              — List agents
GET    /v0/agents/:id          — Agent status (CREATING → RUNNING → FINISHED)
GET    /v0/agents/:id/conversation — Conversation history
GET    /v0/agents/:id/artifacts    — Generated files
POST   /v0/agents/:id/followup    — Follow-up prompt
POST   /v0/agents/:id/stop        — Stop agent
DELETE /v0/agents/:id              — Delete agent
GET    /v0/models              — Available models
Auth:  Basic auth (API key as username)

Acceptance Criteria

  • Design decision on interface (unified vs. separate CloudProvider)
  • Cursor Cloud provider implementation (Python SDK first)
  • Copilot provider implementation (if feasible)
  • Async execution model (launch → poll/webhook → collect)
  • Tests with mocked HTTP responses
  • Documentation for cloud vs. local provider differences

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:harnessCoding agent harness integrationcore-teamMaintained by core team — not open for external contributionenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions