Cloud Agents
Cursor Cloud Agents: Best Practices
To get more reliable Cursor cloud agent runs, set up the environment first, 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.
Use the Cloud agent setup flow so Cursor has its environment configured, then layer access, context, and tools on top of it.
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.
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. The guiding idea is to 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.
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. and create custom tools so the agent can reach the same systems a human developer would.
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.
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.
Sources & last verified
- Cursor Docs - Cloud Agent Best Practices
- Cursor - Cloud agent setup
- Cursor - Security & Network
- Cursor - Skills
Cursor ships frequently. Facts verified against primary sources on June 29, 2026.