---
schema_version: "1"
id: 5596c865184e349bbc2f00e395642ba95ded058c6b38ffc1d36405177616fd03
title: Agentforce Plan and Act Modes
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/salesforcedx/einsteinfordevs/guides/files/devagent-planact.md
canonical_url: https://developer.salesforce.com/docs/platform/einstein-for-devs/guide/devagent-planact.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 0fe9f9bfa7262d759860fcf7d332455a6c866f5ee4e7a439b88566cbe20ffd60
products:
  - Agentforce Vibes Developer Guide (Deprecated)
  - salesforcedx
---
# Agentforce Plan and Act Modes

Agentforce has two distinct interaction modes that optimize your Salesforce development workflow: Plan mode for strategic thinking, and Act mode for implementation. This dual-mode approach helps you create more maintainable, accurate solutions while reducing development iterations and ensuring thoughtful architecture decisions. Plan and Act modes separate strategic thinking from execution, helping you tackle complex Salesforce projects more effectively. The toggle on the bottom right of the chat lets you switch between these two modes.

In Act mode, Focus Chain provides an automatic todo list management with real-time progress tracking throughout your tasks.

**Plan Mode** - Think first:

- Analyze your project without making changes.
- Identify risks and plan architecture.
- Build comprehensive context about your org.

**Act Mode** - Build it:

- Execute planned solutions with full tool access.
- Remember all planning decisions.
- Take direct action on your codebase.

**Use Plan Mode for**: New features, complex debugging, architectural decisions.
**Use Act Mode for**: Implementing solutions, routine changes, established patterns.

## Understanding Plan Mode

Plan mode focuses on analysis and strategy without making changes to your files or org:

- **Analyze**: Project structure, custom objects, Apex classes, Lightning components.
- **Plan**: Implementation strategies, deployment sequences, testing approaches.
- **Identify Risks**: Governor limits, security considerations, integration challenges.

### Example Plan Mode Session

```
"I need to add a customer portal feature. Help me understand what's involved."
→ Agentforce analyzes org setup, customer objects, security.

"What's the best approach for customer self-service?"
→ Agentforce proposes architecture, authentication strategy, security model.

"Create a detailed implementation plan."
→ Agentforce provides step-by-step sequence, components, testing strategy.
```

## Understanding Act Mode

Act mode provides full tool access to implement solutions:

- **Create and Modify**: Apex classes, triggers, Lightning components, metadata.
- **Execute**: Salesforce CLI commands, tests, deployments.
- **Implement**: Follow established plans with real-time validation and error handling.

### Example Act Mode Session

```
"Implement the customer portal solution, starting with the data model."
→ Agentforce creates objects, fields, security rules, deploys to org.

"Create the Lightning components for the portal interface."
→ Agentforce generates LWC components, Jest tests, integrates with data model.

"Run all tests and validate functionality."
→ Agentforce executes tests, reports coverage, validates deployment.
```

## Common Workflows

### New Feature Development

- **Plan Mode**: Analyze requirements, design architecture, identify risks.

- **Act Mode**: Implement components, deploy metadata, run tests.

### Bug Investigation

- **Plan Mode**: Analyze code patterns, identify root causes, plan optimization.

- **Act Mode**: Refactor code, implement fixes, validate with tests.

### Architecture Review

- **Plan Mode**: Review existing code, identify improvements, plan refactoring.
- **Act Mode**: Implement modern patterns, update dependencies, ensure coverage.

## Best Practices

### Planning Phase

- Share complete business context and constraints.
- Let Agentforce explore your codebase structure.
- Ask for multiple solution approaches.
- Document plans for team reference.

### Implementation Phase

- Follow the established plan consistently.
- Monitor code quality and test coverage.
- Return to Plan mode for unexpected complexity.
- Validate each step against requirements.
