Trigger Background Agent Programmatically

It would be great if I could trigger a new Background Agent to run programmatically from an API endpoint.

We have a ton of use cases for this. For example, whenever some leaves a batch of review comments on a PR, it should immediately trigger Cursor to run a new Background Agent to address all of the review comments.

8 Likes

Yes, that would likely be an extension of the Slack bot and BugBot integrations.

Slack Bot offers that already for now. But would be great to see it integrated in GH… :slight_smile:

1 Like

There’s hands on keyboards and things in the works - watch this space!

3 Likes

Yes! We would love to be able to tag @Cursor or something of the like on Github.

But honestly we’d love to trigger a Background Agent from GitHub Actions, cronjobs, static code analysis tools, etc. There are so many small workflow tasks we’d love to hand over to agents.

1 Like

The new slack integration looks so fantastic!! Sadly, my team and communities mostly operate in discord… seems like an obvious next step but would be lovely to hear someone from Cursor confirm whether or not the same slack bot functionality is coming to Discord?

Thank you!

tagging @danperks directly!

Feel free to also add Discord usage as a feature request!

3 Likes

It will be great if I could spawn several background agents using REST api from github actions or 8n8 workflows, and stream in/out the conversation

After thinking about Background Agents on Github Issues - #2 by condor I come to realize that the simplest/easiest solution would be for Cursor to release its Background Agents as APIs inside Cursor MCP.

People could authenticate with their account and ask to spawn a Background for some repo and a text prompt.

1 Like

hi so generally +1 to this feature request. I was about to send a new message, but found this thread. So c&p :slight_smile:

Our use case:

In GitHub Actions, I want to have an extra quality check running in parallel with (or after) unit tests and linting. The idea is to compare the business requirements with the actual changeset of the branch’s PR.

Is that already possible to build? In the #background-agent channel in Cursor Discord, someone suggested:

I don’t think they currently have a public API, but a possible workaround would be for your GitHub Action to send a message to a Slack channel and @ the Agent that’s listening there. :slightly_smiling_face:

If that’s still the case, are there any plans to add a public API? Or is it unlikely due to the setup of each agent being bound to a user (and user identification in the action is kind of awkward — API key via secret, etc.)?

In that case, would an org-wide, bot-style agent (counted separately from normal users) be a possible solution?

P.S.

Ideally, the fetching of business requirements should happen via an MCP server (e.g. from Jira). However, MCP servers within Background-agents don’t seem to be working right now. I hope this gets picked up soon, since it would really unlock some powerful automation flows.

would be very cool to have background agents that run in the background, keeping docs up to date with changes, or periodically run tests

so many cool use cases for triggered agents. I came across this after requesting a similar feature with a slightly different use-case: Triggers for background agents

Could everyone on this thread email me? [email protected], we are looking at some things and want to give you early access @ThomSMG @lucis @izzywdev @flyingsilverfin @joeo @heyJonBray

1 Like

@andrewh up, I am interested as well

Hey, this would be awesome, and maybe I can connect discord bot to the mcp. I sent you an email. <3

Cloud Agents API is here!!

I haven’t tested it yet, but looks promising. Thanks Cursor team!

Looking at the new docs, is bearer token authentication still supported? Or must we using basic auth?

EDIT: Bearer token authentication is still supported.