Skip to content
agentforce-2025 logo

Agentforce: AI Agents for Salesforce (2025)

agentforce-2025

Salesforce Agentforce AI agents and autonomous automation (2025-2026). PROACTIVELY activate for: (1) building Agentforce agents and topics, (2) Agent Builder configuration, (3) Atlas Reasoning Engine usage, (4) Agentforce action setup (Apex, Flow, Prompt Templates), (5) topic-based routing and in...

SKILL.md

Full skill instructions

🚨 CRITICAL GUIDELINES

Windows File Path Requirements

MANDATORY: Always Use Backslashes on Windows for File Paths

When using Edit or Write tools on Windows, you MUST use backslashes (\) in file paths, NOT forward slashes (/).

Examples:

  • ❌ WRONG: D:/​repos/​project/​file.tsx
  • ✅ CORRECT: D:\repos\project\file.tsx

This applies to:

  • Edit tool file_path parameter
  • Write tool file_path parameter
  • All file operations on Windows systems

Documentation Guidelines

NEVER create new documentation files unless explicitly requested by the user.

  • Priority: Update existing README.md files rather than creating new documentation
  • Repository cleanliness: Keep repository root clean - only README.md unless user requests otherwise
  • Style: Documentation should be concise, direct, and professional - avoid AI-generated tone
  • User preference: Only create additional .md files when user specifically asks for documentation

Agentforce: AI Agents for Salesforce (2025)

What is Agentforce?

Agentforce is Salesforce's enterprise AI agent platform that enables autonomous, proactive applications to execute specialized tasks for employees and customers. Agentforce agents use large language models (LLMs) with the Atlas Reasoning Engine to analyze context, reason through decisions, and take action autonomously.

Key Distinction: Agentforce represents the evolution from Einstein Copilot (conversational assistant) to autonomous agents that can complete tasks without human prompting.

Core Architecture

Atlas Reasoning Engine

The Atlas Reasoning Engine is the brain of Agentforce, enabling agents to:

  • Understand: Analyze full context of customer interactions or automated triggers
  • Decide: Reason through decisions using LLMs and business logic
  • Act: Execute actions autonomously across any system
  • Learn: Improve over time based on outcomes and feedback

Agent Components

┌─────────────────────────────────────────────────┐
│              Agentforce Agent                   │
├─────────────────────────────────────────────────┤
│  1. Topics (what agent handles)                 │
│  2. Actions (what agent can do)                 │
│  3. Instructions (how agent behaves)            │
│  4. Channel Integrations (where agent works)    │
│  5. Data Sources (what agent knows)             │
└─────────────────────────────────────────────────┘

Agentforce 2.0 (GA December 2024)

Agentforce 2.0 is the digital labor platform for enterprises, enabling a limitless workforce through AI agents. Key enhancements:

  • Pre-built Skills Library: Rapid agent customization with out-of-the-box capabilities
  • Workflow Integrations: MuleSoft for Flow, MuleSoft API Catalog, Topic Center (Q1 2025)
  • Slack Deployment: Native Slack integration for collaboration agents
  • Enhanced RAG: Improved retrieval augmented generation for accurate responses
  • Advanced Reasoning: More sophisticated Atlas Reasoning Engine capabilities
  • Pricing: $2 per conversation (GA October 25, 2024)

Agentforce Builder Workflow

Detailed Agentforce Builder workflow — agent creation, topics, instructions, actions, grounding, testing, publishing, Data Cloud integration, trust / guardrails, and deployment mechanics — lives in references/​agentforce-builder.md. Load that reference when building or configuring agents rather than just selecting an architecture.

Agent Types and Use Cases

1. Service Agent (Customer Support)

Capabilities:

  • Answer FAQs from Knowledge Base
  • Retrieve order/​account status
  • Process returns and exchanges
  • Reset passwords and unlock accounts
  • Create and route cases to specialists
  • Provide troubleshooting steps

Example Flow:

Customer: "Where is my order #12345?"
↓
Agent: Validates order number
↓
Agent: Queries Order object
↓
Agent: Retrieves tracking information
↓
Agent: "Your order #12345 shipped yesterday and will arrive Thursday.
       Tracking: UPS 1Z999AA10123456784. Need anything else?"

2. Sales Development Agent (SDR)

Capabilities:

  • Qualify inbound leads
  • Answer product questions
  • Handle objections with sales playbooks
  • Book meetings with sales reps
  • Send follow-up emails
  • Update lead scores based on engagement

Example Flow:

Lead: "Tell me about your enterprise plan"
↓
Agent: Retrieves product information
↓
Agent: Explains features, pricing
↓
Agent: Detects buying intent
↓
Agent: "Would you like to schedule a demo with our sales team?"
↓
Agent: Creates meeting, updates lead status to "Meeting Scheduled"

3. Personal Shopper Agent (E-commerce)

Capabilities:

  • Recommend products based on preferences
  • Answer product questions
  • Check inventory and availability
  • Process orders and payments
  • Apply discounts and promotions
  • Handle cart abandonment

4. Operations Agent (Internal Automation)

Capabilities:

  • Process employee requests (PTO, equipment)
  • Automate approvals based on rules
  • Onboard new employees
  • Generate reports and insights
  • Monitor system health
  • Trigger workflows based on events

Integrating Agentforce with Platform Events

Publish events to trigger Agentforce actions:

// Publish event when order status changes
public class OrderEventPublisher {
    public static void publishOrderUpdate(Id orderId, String newStatus) {
        OrderStatusChangeEvent__e event = new OrderStatusChangeEvent__e(
            OrderId__c = orderId,
            NewStatus__c = newStatus,
            Timestamp__c = System.now()
        );

        EventBus.publish(event);

        // Agentforce subscribes to this event
        // Triggers proactive customer notification
    }
}

// Trigger
trigger OrderTrigger on Order (after update) {
    for (Order ord : Trigger.new) {
        if (ord.Status != Trigger.oldMap.get(ord.Id).Status) {
            OrderEventPublisher.publishOrderUpdate(ord.Id, ord.Status);
        }
    }
}

Agentforce Flow (subscribed to OrderStatusChangeEvent__e):

1. Receive event
2. Query order and customer details
3. Determine notification channel (email, SMS, push)
4. Generate personalized message using LLM
5. Send notification via preferred channel
6. Log interaction in Customer timeline

Agentforce with External AI Systems

Integrate Agentforce with external AI providers:

OpenAI GPT Integration

public class AgentOpenAIIntegration {
    @InvocableMethod(label='Generate Response with GPT-4')
    public static List<String> generateResponse(List<AIRequest> requests) {
        List<String> responses = new List<String>();

        for (AIRequest req : requests) {
            HttpRequest httpReq = new HttpRequest();
            httpReq.setEndpoint('callout:OpenAI/​v1/​chat/​completions');
            httpReq.setMethod('POST');
            httpReq.setHeader('Content-Type', 'application/​json');

            Map<String, Object> payload = new Map<String, Object>{
                'model' => 'gpt-4',
                'messages' => new List<Object>{
                    new Map<String, String>{
                        'role' => 'system',
                        'content' => req.systemPrompt
                    },
                    new Map<String, String>{
                        'role' => 'user',
                        'content' => req.userMessage
                    }
                },
                'temperature' => 0.7,
                'max_tokens' => 500
            };

            httpReq.setBody(JSON.serialize(payload));

            Http http = new Http();
            HttpResponse httpRes = http.send(httpReq);

            if (httpRes.getStatusCode() == 200) {
                Map<String, Object> result = (Map<String, Object>)JSON.deserializeUntyped(httpRes.getBody());
                List<Object> choices = (List<Object>)result.get('choices');
                Map<String, Object> choice = (Map<String, Object>)choices[0];
                Map<String, Object> message = (Map<String, Object>)choice.get('message');
                responses.add((String)message.get('content'));
            }
        }

        return responses;
    }

    public class AIRequest {
        @InvocableVariable(required=true)
        public String systemPrompt;
        @InvocableVariable(required=true)
        public String userMessage;
    }
}

Anthropic Claude Integration

public class AgentClaudeIntegration {
    @InvocableMethod(label='Generate Response with Claude')
    public static List<String> generateResponse(List<AIRequest> requests) {
        List<String> responses = new List<String>();

        for (AIRequest req : requests) {
            HttpRequest httpReq = new HttpRequest();
            httpReq.setEndpoint('callout:Anthropic/​v1/​messages');
            httpReq.setMethod('POST');
            httpReq.setHeader('Content-Type', 'application/​json');
            httpReq.setHeader('anthropic-version', '2023-06-01');

            Map<String, Object> payload = new Map<String, Object>{
                'model' => 'claude-3-5-sonnet-20241022',
                'max_tokens' => 1024,
                'system' => req.systemPrompt,
                'messages' => new List<Object>{
                    new Map<String, String>{
                        'role' => 'user',
                        'content' => req.userMessage
                    }
                }
            };

            httpReq.setBody(JSON.serialize(payload));

            Http http = new Http();
            HttpResponse httpRes = http.send(httpReq);

            if (httpRes.getStatusCode() == 200) {
                Map<String, Object> result = (Map<String, Object>)JSON.deserializeUntyped(httpRes.getBody());
                List<Object> content = (List<Object>)result.get('content');
                Map<String, Object> contentBlock = (Map<String, Object>)content[0];
                responses.add((String)contentBlock.get('text'));
            }
        }

        return responses;
    }
}

Monitoring and Analytics

Agent Performance Metrics

Track agent effectiveness:

  • Resolution Rate: % of interactions resolved without escalation
  • Average Handle Time: Time to resolve customer request
  • Customer Satisfaction: Post-interaction survey scores
  • Containment Rate: % of interactions handled by agent vs human
  • Action Success Rate: % of successful action executions

Custom Reporting Object:

public class AgentInteractionLogger {
    public static void logInteraction(String agentName, String topic,
                                     Boolean resolved, Decimal duration) {
        AgentInteraction__c interaction = new AgentInteraction__c(
            AgentName__c = agentName,
            Topic__c = topic,
            Resolved__c = resolved,
            Duration__c = duration,
            Timestamp__c = System.now()
        );
        insert interaction;
    }
}

Analytics Dashboard Queries

-- Resolution rate by agent
SELECT AgentName__c,
       COUNT(Id) as TotalInteractions,
       SUM(CASE WHEN Resolved__c = true THEN 1 ELSE 0 END) as Resolved,
       AVG(Duration__c) as AvgDuration
FROM AgentInteraction__c
WHERE CreatedDate = LAST_N_DAYS:30
GROUP BY AgentName__c

-- Top topics requiring human escalation
SELECT Topic__c,
       COUNT(Id) as Escalations
FROM AgentInteraction__c
WHERE Resolved__c = false
  AND CreatedDate = LAST_N_DAYS:30
GROUP BY Topic__c
ORDER BY COUNT(Id) DESC
LIMIT 10

Best Practices

Security and Compliance

  • Field-Level Security: Always use WITH SECURITY_ENFORCED in SOQL
  • Data Access: Respect sharing rules with with sharing keywords
  • PII Protection: Never log sensitive data (SSN, credit cards, passwords)
  • Audit Trail: Log all agent actions for compliance
  • Human Oversight: Require approval for high-impact actions

Performance Optimization

  • Batch Processing: Group similar actions to reduce API calls
  • Caching: Cache frequently accessed data (product catalogs, FAQs)
  • Async Execution: Use @future or Queueable for non-critical actions
  • Rate Limiting: Implement throttling for external API calls
  • Timeout Handling: Set appropriate timeouts and retry logic

User Experience

  • Response Time: Aim for <3 second responses
  • Personalization: Use customer data for personalized responses
  • Transparency: Clearly identify agent vs human interactions
  • Escalation: Provide easy path to human agent when needed
  • Feedback Loop: Collect user feedback to improve agent

Testing

  • Unit Tests: Test individual actions in isolation
  • Integration Tests: Test end-to-end agent flows
  • Load Tests: Simulate high volume to test scalability
  • User Acceptance Tests: Validate with real users in sandbox
  • A/​B Testing: Compare different agent configurations

Agentforce Pricing and Licensing (2025)

  • Agentforce Service Agent: $2 per conversation (GA October 2024)
  • Agentforce Sales Development Agent: $2 per conversation
  • Custom Agents: Available with Einstein 1 Edition or add-on
  • Agent Runs: 600 free orchestration runs per year (Enterprise+)
  • Consumption Model: Pay-per-use based on conversations
  • Vision: One billion agents with Agentforce by end of 2025

Spring '25 and Summer '25 Updates

Spring '25 (API 63.0) - Available Q2 2025

  • Enhanced Service Agent: 4 new agent actions + 1 new topic
  • Salesforce LLM Open Connector: Connect any LLM (OpenAI, Claude, custom models)
  • Conversation Context Testing: Specify language, app, page type for precise testing
  • Einstein Decision Element: Automate flow paths based on email engagement metrics
  • Einstein-Powered Flow Creation: New Einstein Panel in Flow Builder

Summer '25 (API 64.0) - Available Q3 2025

  • Hybrid Search: Combines semantic search with keyword search for accuracy
  • Multi-language Semantic Search: Cross-language case similarity (e.g., French → English)
  • Report Formula Generation: Plain language descriptions create complex formulas
  • AI-driven Account Summarization: Automated insights for service agents

Resources

Migration from Einstein Copilot

IMPORTANT: Einstein Copilot was retired in January 2025 and renamed to "Agentforce (Default)". It is now one of the Agentforce agents.

If you have Einstein Copilot (now Agentforce Assistant), migration path:

Einstein Copilot → Agentforce (Default)
- Automatically migrated in January 2025
- Conversational UI remains the same
- Add autonomous triggers and workflows
- Convert Copilot Actions to Agent Actions
- Add proactive agent behaviors
- Enable multi-channel deployment (including Slack in 2.0)

Action Migration Example:

// Einstein Copilot Action (reactive)
@InvocableMethod(label='Copilot: Get Account Info')
public static List<Account> getAccountInfo(List<Id> accountIds) {
    return [SELECT Id, Name, Industry FROM Account WHERE Id IN :accountIds];
}

// Agentforce Action (proactive + reactive)
@InvocableMethod(label='Agent: Monitor and Alert on Account Changes')
public static void monitorAccounts(List<Id> accountIds) {
    // Not only retrieve data, but also:
    // 1. Monitor for changes
    // 2. Detect anomalies (sudden revenue drop)
    // 3. Proactively alert account manager
    // 4. Suggest next best actions
}

Agentforce represents a paradigm shift from conversational assistants to autonomous agents that can complete complex, multi-step tasks without human intervention while maintaining trust and security.

More skills from JosiahSiegel

debugging-troubleshooting-2025 logo
JosiahSiegel/claude-plugin-marketplace

debugging-troubleshooting-2025

Comprehensive bash script debugging and troubleshooting techniques for 2025. PROACTIVELY activate for: (1) debugging a misbehaving bash script, (2) using set -x, set -e, set -u, set -o pipefail (strict mode), (3) customizing PS4 for richer trace output, (4) trap DEBUG, ERR, and EXIT for diagnosti...

58 0
View
tailwindcss-accessibility logo
JosiahSiegel/claude-plugin-marketplace

tailwindcss-accessibility

Tailwind CSS accessibility patterns including WCAG 2.2 compliance, touch targets, focus management, and ARIA. PROACTIVELY activate for: (1) building accessible UI with Tailwind, (2) WCAG 2.2 compliance (Level A, AA, AAA), (3) focus rings and focus-visible styling, (4) minimum touch-target sizes (...

58 0
View
sql-server-2025 logo
JosiahSiegel/claude-plugin-marketplace

sql-server-2025

SQL Server 2025 and SqlPackage 170.2.70 (October 2025) — vector databases, AI integration, and modern features. PROACTIVELY activate for: (1) SQL Server 2025 features, (2) vector type and vector indexes for AI, (3) Vector functions (VECTOR_DISTANCE, etc.), (4) AI integration (Azure OpenAI, embedd...

58 0
View
adf-master logo
JosiahSiegel/claude-plugin-marketplace

adf-master

Azure Data Factory (ADF) CI/CD, deployment, and pipeline development. PROACTIVELY activate for: (1) ADF CI/CD setup (npm validation, ARM template export), (2) ADF ARM template deployment, (3) ADF npm build validation in CI, (4) PrePostDeploymentScript for trigger and resource cleanup, (5) ADF Git...

58 0
View
powershell-security logo
JosiahSiegel/claude-plugin-marketplace

powershell-security

Modern PowerShell security practices for 2025 — SecretManagement, JEA, WDAC, credential protection. PROACTIVELY activate for: (1) Microsoft.PowerShell.SecretManagement and SecretStore for credential storage, (2) Just Enough Administration (JEA) endpoints, (3) Windows Defender Application Control ...

58 0
View
nextjs-middleware logo
JosiahSiegel/claude-plugin-marketplace

nextjs-middleware

Complete Next.js Middleware system (Next.js 15.5/16). PROACTIVELY activate for: (1) Creating middleware.ts (Edge) or proxy.ts (Node.js), (2) Matcher configuration, (3) Authentication protection, (4) Role-based access control, (5) Redirects and rewrites, (6) Internationalization (i18n), (7) Securi...

58 0
View
nextjs-data-fetching logo
JosiahSiegel/claude-plugin-marketplace

nextjs-data-fetching

Complete Next.js data fetching system (Next.js 15.5/16). PROACTIVELY activate for: (1) Server Component data fetching, (2) Parallel and sequential fetching, (3) Streaming with Suspense, (4) Route Handlers (API routes), (5) Client-side fetching with SWR/TanStack Query, (6) generateStaticParams for...

58 0
View
advanced-features-2025 logo
JosiahSiegel/claude-plugin-marketplace

advanced-features-2025

Advanced Claude Code plugin features for hooks, MCP integration, team distribution, and progressive disclosure. PROACTIVELY activate for: (1) progressive disclosure design, (2) hook automation, (3) PreToolUse and PostToolUse hooks, (4) MCP server integration, (5) .mcp.json configuration, (6) team...

58 0
View
azure-sql-optimization logo
JosiahSiegel/claude-plugin-marketplace

azure-sql-optimization

Azure SQL Database optimization and platform-specific features. PROACTIVELY activate for: (1) Azure SQL Database optimization, (2) DTU vs vCore selection and right-sizing, (3) automatic tuning (force last good plan, create/drop index), (4) Hyperscale tier and read replicas, (5) Serverless tier an...

58 0
View
github-actions-2025 logo
JosiahSiegel/claude-plugin-marketplace

github-actions-2025

GitHub Actions 2025-2026 features and modernization. PROACTIVELY activate for: (1) 1 vCPU Linux runners (October 2025 public preview), (2) immutable releases for hardened distribution, (3) Node24 migration from Node20, (4) reusable workflows and composite actions, (5) workflow_dispatch with rich ...

58 0
View
git-2-49-features logo
JosiahSiegel/claude-plugin-marketplace

git-2-49-features

Git 2.49 specific features and performance improvements. PROACTIVELY activate for: (1) git-backfill command (new in 2.49) for partial clones, (2) path-walk API improvements, (3) zlib-ng integration for faster compression, (4) reftables backend stabilization, (5) revision-walk performance, (6) bun...

58 0
View
vitest-3-features logo
JosiahSiegel/claude-plugin-marketplace

vitest-3-features

Vitest 3 features and migration from Vitest 2 (2025). PROACTIVELY activate for: (1) Vitest 3 stable features, (2) workspace mode for monorepos, (3) test annotations and reporter API, (4) projects configuration, (5) browser mode in Vitest 3, (6) inline snapshots and toMatchInlineSnapshot, (7) type...

58 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View