Dev Agent Quick Start
Dev Agent is your AI-powered development partner for Salesforce development that can execute commands and perform complex workflows automatically. We'll help you start using Dev Agent effectively for your Salesforce development tasks.
What makes Dev Agent 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 Dev Agent.
- Essential commands and request patterns.
- Real-world development workflow examples.
- Best practices for effective collaboration.
Before getting started, ensure you have:
- Agentforce for Developers installed and enabled in VS Code or Code Builder.
- Dev Agent feature flag enabled in your settings.
- Active Salesforce DX project open in VS Code.
- Connected Salesforce org with appropriate permissions.
Need Setup Help? See Enable Dev Agent for configuration instructions.
-
Open the Chat Interface:
- Click the Agentforce icon in the VS Code Activity Bar.
- The Dev Agent 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:
Expected Response: Dev Agent 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 Dev Agent does:
- Analyze your project structure.
- List Lightning Web Components, Apex classes, and other metadata.
- Provide an overview of your project organization.
Dev Agent follows this interaction pattern:
- You make a request in natural language.
- Dev Agent analyzes and proposes actions.
- You review and approve the proposed actions.
- Dev Agent executes and provides results.
- You can ask follow-up questions or request modifications.
Category | Example Request | What Dev Agent 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 Dev Agent explore your codebase to build context.
- Share relevant documentation or requirements.
- Explain your coding standards and preferences.
Workflow Automation:
- Use Dev Agent for repetitive tasks like test generation.
- Automate deployment and validation processes.
- Let Dev Agent handle multi-step workflows.
Once you're comfortable with basic Dev Agent usage:
- Learn about Rules: Set up Dev Agent Rules for consistent coding standards
- Master Context Management: Optimize your workflow with Dev Agent Context
- Explore Complex Workflows: Try advanced scenarios in Dev Agent Workflows
- Understand MCP: Deep dive into tool integration with Understand MCP
Practice Regular Workflows:
- Use Dev Agent 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.