Cloud Agents
Cursor Cloud Agent Best Practices: Scoping, Review, Cost
Reliable Cursor cloud agent runs start with the environment. Make sure the agent can reach the secrets and URLs it needs and can test locally, use skills and agents.md to give it context, and provide tools it is good at using. Cursor frames the agent as a smart but low-context human developer: it does its best work when its environment, access, context, and tools mirror what a developer would have.
On this page
Why set up the environment first?
Cursor's first recommendation is to configure the cloud agent's environment before you run it. Like a human developer, the agent does better work when its environment is set up correctly, so the environment is the foundation every other best practice builds on.
The order here is, I think, doing real work. Cursor's trigger for the skills advice is an agent having difficulty testing its changes, and an agent whose environment never came up right presents in exactly that way. Reach for skills first and you have written careful instructions for a test command the machine could not have run.
Getting the order wrong costs more here than it would locally, because every attempt is a whole agent run. You edit the instruction, launch again, wait for the machine to boot and the install to finish, and watch it stop on the same missing dependency.
Nothing further down the page can be verified until this part works.
Use the Cloud agent setup flow so Cursor has its environment configured, then layer access, context, and tools on top of it.
This exact topic is a hands-on lesson: Agent Review Before You Accept Work — about 5 minutes, free to read. Or try it live in the simulator →
How do I make sure the agent can access what it needs?
Before running a cloud agent, Cursor recommends verifying a few prerequisites so the agent can actually run and test your code rather than stalling on missing access. The checks below cover secrets, network egress, and whether your repo is testable in a VM at all.
- Secrets
- Make sure the agent has access to required secrets such as API keys and database credentials through the Secrets tab in your dashboard.
- Egress controls
- If you have network access restrictions enabled, ensure all URLs your local development requires are whitelisted.
- Local testability
- Your repo should run well locally without external services that cannot be reached from a VM. If it is hard for a human to test locally, it will be hard for an agent.
The three checks are not equally cheap, which matters when you are deciding where to spend an afternoon. Secrets and egress are dashboard fields, fixable in a minute once you know which one bit you. Local testability is a property of the repo, so if the answer there is no, the work is repo work and it has to happen before the agent can help.
Egress only applies if someone turned restrictions on. Cloud agents have internet access by default, and the restricted modes are opt in for users, teams and saved environments. Even on Allowlist only, Cursor's own services and your source control provider stay reachable, so a run with a thin allowlist clones the repo and gets all the way to a package install before it reaches a host nobody added. The security and network page covers the modes.
How do skills and AGENTS.md help configure the agent?
If a cloud agent is having difficulty testing its changes, Cursor recommends using skills and agents.md to configure it. Treat the agent as a smart but low-context human developer: the best way to get the right behavior is to give it the context it needs to understand what to do.
Cursor describes how it does this internally. Its agents.md lists tips for running and debugging the most commonly used microservices in its mono-repo, and it maintains many skills covering how to test and debug key services, each with clear instructions on when to use the skill.
Splitting it that way is a context decision as much as an organizational one. A root AGENTS.md carries instructions for the whole project, and nested ones apply to the directory you are working in, so anything you put there is paid for by tasks that will never touch the payments service. A skill's body only arrives when its description matches the task, which is what makes it the right home for six paragraphs about one microservice.
Which puts the weight on the description rather than the body. Cursor's phrasing is that each skill carries clear instructions on when to use it, and in Cursor's skill system that same line decides whether the skill loads at all, since the agent reads names and descriptions at startup and pulls the full file in when one matches. When a skill never fires, the description is usually the thing to rewrite. Cursor Agent SkillsReusable, model-invoked instructions (a SKILL.md with a name, description and steps) the agent loads only when its description matches the task. Press Enter for the full definition. covers the format.
The skills contain in-depth details, such as how to debug a specific microservice or how to set up a third-party dependency when it is needed for testing.
What tools should I give the agent?
Cursor has often found that agents are limited by the tools they have access to. The recommendation is to use MCPModel Context Protocol. A standard that lets an AI agent pull in context from outside the repo, like Jira tickets or internal docs. Press Enter for the full definition. and create custom tools so the agent can reach the same systems a human developer would.
A missing tool rarely announces itself. An agent that was never given a database has nothing to query, so it works from whatever schema file is in the repo and writes something plausible against that. You find out at review, when the diff assumes a column that was renamed two releases ago.
Reading the transcript for workarounds is the cheapest way I know to find the gap. An agent that greps for a value it could have queried, or writes a parser for output some tool would have handed it structured, is naming the next thing to add. Cursor's advice to iterate based on how the agent uses its tools applies to the ones you already gave it.
What does it mean to mold the tools to the agent?
Beyond simply granting tools, Cursor stresses creating tools the agent is good at using, and iterating on them based on how the agent actually uses them. The example below shows why off-the-shelf dev commands are not always enough.
At Cursor we have created a custom CLI for the model to run micro-services in our codebase. We found that when running custom dev commands, e.g. from a package.json file, some models would forget arguments, or agents would get distracted by noisy build logs which human developers knew to ignore.
Two different problems sit inside that example. Forgetting an argument is an interface problem, and the answer is a command with fewer things to get wrong. Noisy build logs are a different complaint. Nothing in the log marks which two hundred lines your team stopped reading years ago, so the cheaper fix is usually quieter output rather than more instructions about what to ignore.
This is the recommendation I would skip on a small team. Cursor is describing a mono-repo full of microservices and a CLI built to drive it, which is a project with an owner and a maintenance cost. A repo with one test command and one dev server gets most of the same benefit from an AGENTS.md line naming the command and the two flags people forget.
What should I check first when a cloud agent run goes wrong?
Work back down the order the page itself builds in: environment, then access, then context, then tools. Environment and access failures both leave their evidence in the run rather than in the diff.
An environment failure shows up early, usually while the install command is still running. An access failure gets further and then stalls on one specific thing, an unset variable or a host that would not resolve. Context and tool problems produce the confusing case, where every command succeeds and the change is simply wrong, and that is the case worth slowing down for.
I read this page for a long time as a setup checklist you complete once. Two of the four are that. Skills and custom tools are not, since both only get good by revision, and Cursor's own wording on tools is to iterate based on observations of how the agent uses them. Book the second pass for after the first bad week, not for day one.
Frequently asked questions
What is the most important step to improve a Cursor cloud agent?
Set up the environment first. Cursor recommends using the Cloud agent setup flow so the environment is configured before you run an agent, because like a human developer the agent does better work when its environment is set up correctly.
What should I check before running a Cursor cloud agent?
Verify three prerequisites: the agent has access to required secrets through the Secrets tab, any URLs your local development needs are whitelisted if network restrictions are on, and your repo can be tested locally without external services that a VM cannot reach.
How does Cursor recommend giving a cloud agent the right tools?
Use MCP and create custom tools so the agent can reach the same systems a developer would, then mold those tools to the agent by creating tools it is good at using and iterating based on how it actually uses them.
In what order should I apply Cursor's cloud agent best practices?
Cursor states one ordering outright: set up the environment first. The page then covers access, context through skills and agents.md, and tools. Cursor's trigger for the skills advice is an agent having difficulty testing its changes, which is also how an unconfigured environment presents, so configuring skills first can mean documenting a test command the machine could never have run. When a run goes wrong, work back down the same order.
Sources & last verified
- Cursor Docs - Cloud Agent Best Practices
- Cursor - Cloud agent setup
- Cursor - Security & Network
- Cursor - Skills
Cursor ships frequently. Last updated July 28, 2026.
Keep reading
Rather do it than read about it? Run 11 interactive Cursor walkthroughs in a simulated editor. Free, no account needed.