AI agents: machine-readable docs and automated org setup at /llms.txtAI agents: read setup instructions as HTML at /llms.html

Setting Up Cursor for Agentforce

Getting Started with Cursor

You need an org with Agentforce enabled. Get a LabBox if you need one.

1. Install Cursor

Open Cursor and sign in to your account.

2. Connect Salesforce

Install Salesforce CLI if needed:

1
sf --version

The output should start with @salesforce/cli/.

If the org is already authorized, skip sign-in and use its existing alias.

Use your chosen alias with --target-org in later commands. Include your chosen org alias when you paste the build prompt.

3. Install Agentforce skills

Open your project folder in Cursor, then run this in its terminal:

1
npx skills add forcedotcom/sf-skills

Select your coding tool and the agentforce-generate, agentforce-test, and agentforce-observe skills. Skip this step if they are already available. Restart your coding tool if it does not discover them.

Other installation options.

4. Build an agent

Paste this prompt into Cursor's chat.