Overview
Give a Cursor cloud agent a short service brief and let it draft the infrastructure, deployment and CI files for a new service on its own branch, as a pull request you review before anything is applied.
Problem or Objective
More in Coding and Code Review
AI Agents and Models
Tools and Integrations
- Tools
- Cursor
- Prerequisites
- A Cursor plan that includes Cloud Agents (Premium and higher, Teams, Enterprise, or a legacy paid plan; Free and Plus don't include them), with source control connected by an account admin. Your own infrastructure-as-code, container and CI tools.
How It Works
Write a one-page service brief in your repository: the service name, language, ports, environments, the cloud resources it needs, how it is deployed and which checks CI must run. Add a list of the exact folders the agent may create or change, and state that it must not delete or edit anything outside them. Start a Cursor cloud agent on the repository with the brief, and ask it to draft the infrastructure-as-code files, the container deployment manifests and the CI pipeline, then run the formatters, validators and dry-run commands your tools offer inside its environment. It works on a separate branch and opens a pull request. Review the diff file by file, check that nothing outside the allowed folders changed, and run the plan or preview step of your infrastructure tool yourself. Apply infrastructure and merge only after that review.
Implementation Workflow
Steps assembled from the agents, tools and prompt of this entry. Adapt them to your own setup.
- Choose the agentSet up Cursor.
- Connect the toolsConnect the tools this workflow relies on: Cursor.
- Check the prerequisitesA Cursor plan that includes Cloud Agents (Premium and higher, Teams, Enterprise, or a legacy paid plan; Free and Plus don't include them), with source control connected by an account admin. Your own infrastructure-as-code, container and CI tools.
- Gather your detailsCollect what the prompt asks for: Where the service brief is, New service name, An existing service to copy conventions from, Folders the agent may change.
- Run the starter promptPaste the starter prompt below into Cursor and adapt it to your case.
- Check against the documentationCompare what you get with the documentation at cursor.com before you rely on it.
Practical Starter Prompt: Scaffold a service from its brief
Fill the fields to adapt the prompt. Empty fields stay as visible [placeholders].
Read the service brief at [Where the service brief is]. Draft the infrastructure-as-code files, the container deployment manifests and the CI pipeline for [New service name], following the conventions already used in [An existing service to copy conventions from]. Create or change files only under [Folders the agent may change]; do not delete or edit anything else. Run the formatters, validators and dry-run checks available in your environment and report their output. Open a pull request with a file list and a summary. Do not apply any infrastructure change or merge anything; I will review the pull request first.Check the pull request file list against the allowed folders, review every file, and run your infrastructure tool's plan or preview yourself before applying or merging.
Expected Results and Benefits
This is a suggested workflow, not a reported result. The points below are what the cited documentation says the tools can do.
This is a suggested workflow, not a reported outcome. Cursor's documentation says cloud agents clone your repository, work on a separate branch, push changes for handoff and produce merge-ready pull requests, and that an admin must connect source control first. No cited page covers any infrastructure, container or CI tool, so whether the generated files are correct for your platform is what your review and dry runs establish.
Limitations and Considerations
Keep cloud credentials that can change live infrastructure out of the agent's environment; the pull request is the handoff, and applying changes stays with you. Name the allowed folders in the brief and check the file list of every pull request against them. Cloud agents need a plan that includes them and use your plan's usage at the model's rate, and you set a spend limit when you first start. Results depend on your setup and were not independently reproduced by Top 200 Repos.
Sources
- Cloud Agents | Cursor Docs (opens in a new tab)
Project documentation · cursor.com · Undated · Source checked 26 Nov 2026, 17:27 UTC
What this source supports
- Cloud agents clone your repo from GitHub, GitLab, Azure DevOps Services, or Bitbucket Cloud and work on a separate branch, then push changes to your repo for handoff.
- Cloud agents produce merge-ready PRs with artifacts to demo their changes.
- Before anyone can start a cloud agent from a repository, a Cursor account admin needs to connect source control for the account.
- You need a plan that includes Cloud Agents: Premium and higher, Teams, Enterprise, or a legacy paid plan. Free and Plus don't include them.
- You'll be asked to set a spend limit when you first start using them.