curl --request POST \
--url https://api.cursor.com/v0/agents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"prompt": {
"text": "Add a README.md file with installation instructions",
"images": [
{
"data": "iVBORw0KGgoAAAANSUhEUgAA...",
"dimension": {
"width": 1024,
"height": 768
}
}
]
},
"source": {
"repository": "https://github.com/your-org/your-repo",
"ref": "main"
}
}'
{
"id": "bc_abc123",
"name": "Add README Documentation",
"status": "CREATING",
"source": {
"repository": "https://github.com/your-org/your-repo",
"ref": "main"
},
"target": {
"branchName": "cursor/add-readme-1234",
"url": "https://cursor.com/agents?id=bc_abc123",
"autoCreatePr": false
},
"createdAt": "2024-01-15T10:30:00Z"
}
저장소에서 작업할 새 백그라운드 에이전트를 시작해.
curl --request POST \
--url https://api.cursor.com/v0/agents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"prompt": {
"text": "Add a README.md file with installation instructions",
"images": [
{
"data": "iVBORw0KGgoAAAANSUhEUgAA...",
"dimension": {
"width": 1024,
"height": 768
}
}
]
},
"source": {
"repository": "https://github.com/your-org/your-repo",
"ref": "main"
}
}'
{
"id": "bc_abc123",
"name": "Add README Documentation",
"status": "CREATING",
"source": {
"repository": "https://github.com/your-org/your-repo",
"ref": "main"
},
"target": {
"branchName": "cursor/add-readme-1234",
"url": "https://cursor.com/agents?id=bc_abc123",
"autoCreatePr": false
},
"createdAt": "2024-01-15T10:30:00Z"
}
API key from Cursor Dashboard
Agent created successfully
The response is of type object
.