curl --request GET \
--url https://api.cursor.com/v0/agents \
--header 'Authorization: Bearer <token>'{
"agents": [
{
"id": "bc_abc123",
"name": "Add README Documentation",
"status": "RUNNING",
"source": {
"repository": "https://github.com/your-org/your-repo",
"ref": "main"
},
"target": {
"url": "https://cursor.com/agents?id=bc_abc123",
"branchName": "cursor/add-readme-1234",
"prUrl": "https://github.com/your-org/your-repo/pull/1234",
"autoCreatePr": false
},
"createdAt": "2024-01-15T10:30:00Z",
"summary": "Added README.md with installation instructions and usage examples"
}
],
"nextCursor": "bc_def456"
}为已认证用户获取其所有后台代理的分页列表。
curl --request GET \
--url https://api.cursor.com/v0/agents \
--header 'Authorization: Bearer <token>'{
"agents": [
{
"id": "bc_abc123",
"name": "Add README Documentation",
"status": "RUNNING",
"source": {
"repository": "https://github.com/your-org/your-repo",
"ref": "main"
},
"target": {
"url": "https://cursor.com/agents?id=bc_abc123",
"branchName": "cursor/add-readme-1234",
"prUrl": "https://github.com/your-org/your-repo/pull/1234",
"autoCreatePr": false
},
"createdAt": "2024-01-15T10:30:00Z",
"summary": "Added README.md with installation instructions and usage examples"
}
],
"nextCursor": "bc_def456"
}API key from Cursor Dashboard
Number of background agents to return
1 <= x <= 100Pagination cursor from the previous response
1"bc_xyz789"
Agents retrieved successfully
List of agents
显示 子属性
Unique identifier for the background agent
"bc_abc123"
Name for the agent
"Add README Documentation"
Current status of the background agent
RUNNING, FINISHED, ERROR, CREATING, EXPIRED "RUNNING"
显示 子属性
URL to view the agent in Cursor Web
"https://cursor.com/agents?id=bc_abc123"
The Git branch name where the agent is working
"cursor/add-readme-1234"
URL to view the pull request in GitHub, if any
"https://github.com/your-org/your-repo/pull/1234"
Whether a pull request will be automatically created
false
When the agent was created
"2024-01-15T10:30:00Z"
Summary of the agent's work
"Added README.md with installation instructions and usage examples"
Cursor for fetching the next page of results
"bc_def456"
此页面对您有帮助吗?