Background Agents API

Hi Cursor team. Thank you so much for building background agents. It’s the perfect UI/UX for running autonomous software development agents such as Opus and Sonnet. But I would like to be able to access and send messages to my agents from my phone, so I really need an API.

I’m curious if you guys have any plans of building a Cursor API for this. It would be really, really appreciated, keep up the good work!

8 Likes

+1 for this request! API, native support, something. I want to be able to kick off agents with as little friction as possible. I always have my phone with me :slight_smile:

5 Likes

Hi Oliver, while API is not planned for now to be accessible, there is already a Slack integration if that helps for now :slight_smile:

1 Like

Thanks for your reply, I’m still curious, is this something you guys are considering?

How would you use it? It’s something we’ve talked about!

@andrewh I would use this API all the time. We are considering building an unofficial API via Slack right now to get around this because that’s how much we need it.

Software development is evolving so quickly - I think most of our company’s engineering work is happening on the cloud with Codex, Claude Code, and Cursor background agents.

We basically want the freedom to build custom MCP servers and CLI tools for complete SWE automation. I want to assign tasks to Cursor from anywhere by hitting a REST API.

Here’s a quick example: We have an internal planner and architecture design agent (basically an AI PM) which creates a series tasks in a queue after the design plan passes human review.

Right now, we manually tag @Cursor to send tasks, so I want to make a CLI tool or a custom MCP server for my AI PM so it can spawn background agents in a custom container and review their progress.

This would also automate reviewing code, which we mostly do manually right now. Instead of commenting @Cursor on github, I’d much rather have an AI reviewer agent automatically pop new tasks to background agents to fix issues in the PR.

If I had an API right now, I’m pretty sure I could vibe code a simple PWA in a few hours that looks and works better than Codex. Cursor’s retrieval, agentic coding, container tooling, MCP support, and all the other infra around the models is so much better than all the competitors that I don’t want to use anything else right now.

6 Likes

Hi @amxv checkout my repo I made this morning. GitHub - mjdierkes/cursor-background-agent-api: Use Cursor Background Agents as an API or MCP Server

It’s a reverse engineered solution of the background agent api.

1 Like

+1 for this feature. My use case is that I would like to build a Jira plugin where where someone can trigger an agent to work on a card before engineers start.

1 Like

I would love this too! I am trying to automate through the slack integration, but it does not work if the one calling cursor is an app, so I am blocked… I will try the non-official API but I am afraid of reverse engineer solutions because they break easily… an official API will be much appreciated

1 Like

I also tried this as a workaround and it didn’t work. I tried user a user token as well as a bot token and neither one would trigger cursor.

For the time being we are switching to GitHub Copilot since you can create an issue and assign it to Copilot programatically.

I think a gigantic opportunity for background agents is to allow automation to trigger the agents – not just people manually triggering work.

1 Like

I also think the API would be super valuable thinking on integrating a CI/CD Pipleine with a background agent to Have a AI_Agent_Staging PR branch, Where when a new ticket labled as AI Achievable Would go through a couple Planning LLM calls and then through the background agent to open a Hot fix PR so I Can review. I would love to test the acceptance criteria this PR have right away.

1 Like

But it doesn’t actually work with programmatic messages :frowning: I entered a bug report on this.

Here is a link to the bug: Slack bot doesn't respond to messages posted programmatically

+1 for this as a formal feature. Here is the workflow we’d be trying to implement:

  1. A ticket is created in Linear / JIRA / etc.
  2. The ticket is assigned a specific tag like “autofix”
  3. Creation triggers a lambda function or similar that then calls the Cursor Background API and instructs the system to implement the ticket and open a PR

Bonus:
4) BugBot automatically runs on the PR, and the background agent picks up/implements the feedback
5) Background agent monitors checks/github actions and automatically proposes fixes for failing tests, etc.

In general, a simple API that allows me to trigger a background agent would support this whole use case when combined with a little bit of orchestration.

We would really like this feature in order to automatically have a background agent investigate support issues we get from our customers.
So the flow would be:

  • Customer raises issue
  • Is classified as technical issue
  • Issue context is sent to Cursor
  • Background agent starts working
  • Replies back so that we can link the PR in our issue tracking system

Just give us one curl command and call it a treasure hunt :joy:

1 Like

I’d like to make a telegram bot that can be added do chat with developers. So I could just /cursor Check ESP-205 PR comments and fix

I also NEED Cursor API as well for my project

is this repo allows for another program to send prompt to the cursor agent?

Totally needed. The Holy Grail - Cursor API

2 Likes

It’s finally here!! Thank you Cursor

1 Like