Agentforce Quick Start
Agentforce is your AI-powered development partner for Salesforce development that can execute commands and perform complex workflows automatically. We'll help you start using Agentforce effectively for your Salesforce development tasks.
What makes Agentforce different
- Takes Action: Executes commands and tools, not just provides suggestions.
- Context Aware: Understands your Salesforce project structure and org metadata.
- Workflow Automation: Handles multi-step development processes automatically.
- Natural Language: Responds to conversational requests instead of remembering command syntax.
What you'll learn
- How to access and interact with Agentforce.
- Essential commands and request patterns.
- Real-world development workflow examples.
- Best practices for effective collaboration.
Before getting started, ensure you have:
- Agentforce Vibes installed and enabled in VS Code or Code Builder.
- Active Salesforce DX project open in VS Code.
- Connected Salesforce org with appropriate permissions.
Need Setup Help? See Set Up Agentforce Vibes Extension for configuration instructions.
-
Open the Chat Interface:
- Click the Agentforce Vibes icon in the VS Code Activity Bar.
- The Agentforce chat interface opens.
-
Switch to Act Mode:
- Look for the mode selector in the chat interface.
- Switch to "Act mode" to enable agentic capabilities.
- Confirm when prompted to enable MCP servers.
-
Verify Connection:
- Look for green status indicators showing MCP servers are connected.
- You should see "Salesforce DX" MCP server as available.
Start with a simple request to verify everything is working.
Try this:
"Show me my authorized orgs"
Expected Response: Agentforce will execute the Salesforce CLI command and display a formatted table of your connected orgs, including aliases, usernames, and connection status.
Get familiar with your current development environment.
Request:
"What Salesforce components are in my project?"
What Agentforce does:
- Analyze your project structure.
- List Lightning Web Components, Apex classes, and other metadata.
- Provide an overview of your project organization.
Agentforce follows this interaction pattern:
- You make a request in natural language.
- Agentforce analyzes and proposes actions.
- You review and approve the proposed actions.
- Agentforce executes and provides results.
- You can ask follow-up questions or request modifications.
| Category | Example Request | What Agentforce Does |
|---|---|---|
| Information | "What's in my AccountController class?" | Reads and analyzes the file content. |
| Execution | "Run tests for OpportunityTrigger" | Executes Salesforce CLI test commands. |
| Creation | "Create a Lightning component for contact search" | Generates code and file structure. |
| Deployment | "Deploy my changes to the sandbox" | Executes deployment commands with confirmation. |
✅ Good Requests:
- "Run all Apex tests and show me the coverage report".
- "Create a Lightning Web Component for displaying product information".
- "Deploy the AccountController class to my dev sandbox".
- "Show me what metadata has changed since my last deployment".
❌ Less Effective Requests:
- "Help" (too vague).
- "Fix my code" (no specific context).
- "Do something with accounts" (unclear intent).
- "Test" (needs more specificity).
Here are some common development workflows that you might use.
Run Specific Tests:
Check Overall Coverage:
Test and Fix Issues:
Create New Components:
Generate Test Classes:
Add Functionality:
Deploy Specific Components:
Check Deployment Status:
Retrieve Metadata:
Be Specific About Context:
- Mention specific files, classes, or components.
- Include the target org when relevant.
- Specify the scope of work (single class vs. entire feature).
Provide Clear Intent:
- Explain what you're trying to accomplish.
- Mention any constraints or requirements.
- Include business context when helpful.
Example: Instead of: "Fix my trigger". Try: "My AccountTrigger is causing governor limit exceptions during bulk inserts. Help me optimize it for handling large data volumes."
Start Simple:
- Begin with smaller, focused requests.
- Build up to more complex workflows.
- Test each step before proceeding.
Review Before Execution:
- Always review proposed actions before approving.
- Ask questions if you don't understand something.
- Request modifications if needed.
Project Understanding:
- Let Agentforce explore your codebase to build context.
- Share relevant documentation or requirements.
- Explain your coding standards and preferences.
Workflow Automation:
- Use Agentforce for repetitive tasks like test generation.
- Automate deployment and validation processes.
- Let Agentforce handle multi-step workflows.
Once you're comfortable with basic Agentforce usage:
- Learn about Rules: Set up Agentforce Rules for consistent coding standards
- Master Context Management: Optimize your workflow with Agentforce Context
- Explore Complex Workflows: Try advanced scenarios in Agentforce Workflows
- Understand MCP: Deep dive into tool integration with Understand MCP
Practice Regular Workflows:
- Use Agentforce for daily development tasks.
- Experiment with different request patterns.
- Build familiarity with common Salesforce scenarios.
Share and Learn:
- Document successful patterns for your team.
- Share effective rules and context files.
- Collaborate on best practices with other developers.