New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

sf-agent-framework

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sf-agent-framework

AI Agent Orchestration Framework for Salesforce Development - Two-phase architecture with 70% context reduction

latest
Source
npmnpm
Version
9.0.0
Version published
Weekly downloads
31
416.67%
Maintainers
1
Weekly downloads
 
Created
Source

SF-Agent Framework v4.0

SF-Agent Framework Salesforce AI Agents Version Status

AI-Powered Salesforce Development Framework | 70% Less Context | 3x Faster Delivery

🚀 Quick Start | 📚 Documentation | 💡 Features | 🤖 Agents | 📦 Installation

📋 Table of Contents

Overview

SF-Agent Framework is an intelligent orchestration system that transforms Salesforce development through AI agents. It dramatically reduces development time and improves code quality by leveraging specialized AI agents that understand Salesforce best practices.

Why SF-Agent Framework?

BenefitImpactHow It Works
70% Less ContextFaster AI responses, lower costsTwo-phase architecture separates planning from coding
3x Faster Development20-minute story implementationLean agents optimized for specific tasks
85% First-Pass SuccessLess rework, higher qualityAgents trained on Salesforce best practices
30+ Specialized AgentsComplete coverageEach agent masters specific Salesforce domains
Enterprise-ReadyProduction-safeBuilt-in security, compliance, and governance

Real-World Results

  • Implementation Time: 60 min → 20 min per story
  • Context Usage: 100k → 30k tokens per task
  • Documentation: 30 min → 6 min generation
  • Test Coverage: 75% → 90% automated

Features

🔄 Two-Phase Development Architecture

Separate planning from coding for maximum efficiency:

PLANNING PHASE (128k context)        DEVELOPMENT PHASE (32k context)
┌─────────────────────┐              ┌──────────────────────┐
│ • Full requirements │              │ • Focused stories    │
│ • Architecture      │    ────→     │ • Fast execution     │
│ • Complex analysis  │              │ • Lean agents        │
│ • Story generation  │              │ • 3x faster          │
└─────────────────────┘              └──────────────────────┘

📝 Story-Based Development

Transform requirements into actionable, self-contained stories:

# STORY-001: Implement Customer Portal Login

## Context

All information needed for implementation...

## Requirements

- User authentication via OAuth 2.0
- Session management with 30-min timeout
- Multi-factor authentication support

## Technical Specifications

- Apex controller: CustomerPortalController
- LWC component: customerLogin
- Integration: Auth0 SSO

🤖 Specialized Agent Teams

  • Architecture Team: Solution design, technical patterns, data modeling
  • Development Team: Apex/LWC coding, configuration, testing
  • Deployment Team: CI/CD, release automation, monitoring

📦 Enterprise Workflows

Pre-built workflows for common scenarios:

  • New Salesforce implementations
  • Org enhancements and features
  • Lightning migration
  • DevOps pipeline setup
  • Package development

Installation

Prerequisites

  • Node.js >= 20.0.0
  • Git
  • 8GB RAM minimum
  • 2GB disk space

Install Commands

# Global installation (recommended)
npm install -g sf-agent-framework@latest

# Verify installation
sfa --version
# Output: 4.0.1

# Or use directly with npx
npx sf-agent-framework install

Quick Start

1. Initialize Your Project

# Create new project
sfa init my-salesforce-project
cd my-salesforce-project

# Or add to existing project
cd existing-project
sfa install

2. Start Building (5 Minutes)

# Start interactive workflow
sfa workflow

# Or use agents directly
sfa phase planning
/sf-business-analyst *requirements "customer portal"
/sf-architect *design

# Switch to development
sfa phase development
/sf-developer-lean *implement
/sf-qa-lean *test
/sf-devops-lead-lean *deploy

3. Common Commands

CommandDescriptionExample
sfa init [name]Create new projectsfa init my-app
sfa workflowStart interactive workflowsfa workflow
sfa phase [mode]Switch context modesfa phase planning
sfa story createGenerate storiessfa story create --from requirements.md
sfa helpShow all commandssfa help

How It Works

Step 1: Planning Phase (Rich Context)

sfa phase planning

AI agents analyze requirements with full context to create comprehensive plans.

Step 2: Story Generation

sfa story create --from requirements.md

Requirements are broken into self-contained, implementable stories.

Step 3: Development Phase (Lean Context)

sfa phase development

Switch to optimized agents that work 3x faster with focused context.

Step 4: Implementation

/sf-developer-lean *implement

Lean agents implement each story with all necessary context included.

Agents

Planning Phase Agents (Rich Context)

AgentSpecializationCommands
sf-business-analystRequirements gathering*requirements, *analysis
sf-architectSolution architecture*design, *patterns
sf-technical-architectTechnical design*integration, *api
sf-data-architectData modeling*datamodel, *migration
sf-security-architectSecurity framework*security, *compliance

Development Phase Agents (Lean Context)

AgentContext SizeFocusSpeed
sf-developer-lean32kApex, LWC, Triggers3x faster
sf-admin-lean24kConfiguration, Fields2.5x faster
sf-qa-lean24kTesting, Quality2x faster
sf-devops-lead-lean30kDeployment, CI/CD2x faster

Workflows

Interactive Workflows

Start with sfa workflow and choose:

  • 🆕 New Salesforce Implementation - Greenfield projects
  • 🔄 Enhance Existing Org - Add features
  • 🚀 Modernize to Lightning - Classic to Lightning
  • 🔧 Setup DevOps - CI/CD pipeline
  • 📦 Build Package - Managed/Unmanaged packages

Workflow Example

$ sfa workflow

? Select your project type: New Salesforce Implementation
? Choose your approach: Requirements-driven development
? Select clouds: Sales Cloud, Service Cloud

✅ Workflow initialized: salesforce-greenfield-fullstack-v2
📋 Generated 12 implementation stories
🚀 Ready to start development!

Templates

AI-powered document generation that adapts to your needs:

TemplatePurposeTime Saved
user-story-enhancedUser stories with acceptance criteria20 min → 2 min
technical-design-enhancedArchitecture documents60 min → 10 min
test-class-enhancedComplete test classes30 min → 5 min
apex-class-enhancedApex classes with best practices15 min → 3 min
lwc-component-enhancedLWC with HTML, JS, metadata25 min → 5 min

Using Templates

# Interactive mode
sfa template process user-story-enhanced

# With variables
sfa template process technical-design-enhanced \
  --var project_name="Customer Portal" \
  --var complexity="high"

Project Structure

your-salesforce-project/
├── .sf-core/              # Framework core (auto-managed)
│   ├── agents/            # 30+ specialized agents
│   ├── workflows/         # Enterprise workflows
│   └── templates/         # Document templates
├── src/                   # Your Salesforce code
│   ├── classes/           # Apex classes
│   ├── lwc/               # Lightning Web Components
│   ├── objects/           # Custom objects
│   └── triggers/          # Apex triggers
├── docs/                  # Generated documentation
│   ├── stories/           # Implementation stories
│   ├── architecture/      # Design documents
│   └── handoffs/          # Agent handoff packages
└── config/                # Configuration files
    └── sf-agent.config.json

Advanced Features

Document Sharding

Break large requirements into manageable stories:

sfa shard docs/100-page-requirements.md
# Output: 20 focused implementation stories

Agent Handoffs

Seamless collaboration between AI agents:

sfa handoff create --from sf-architect --to sf-developer
# Packages all context for smooth transition

Web Bundle Generation

Use with ChatGPT, Claude, or Gemini:

sfa build --teams-only
# Upload dist/teams/salesforce-core-team.txt to any AI chat

IDE Integration

Works with all major IDEs:

  • Cursor
  • VS Code + Salesforce Extensions
  • IntelliJ with Illuminated Cloud
  • Code Builder

Use Cases

Perfect For

Greenfield Implementations - New Salesforce orgs ✅ Feature Development - Complex features for existing orgs ✅ Lightning Migration - Classic to Lightning Experience ✅ DevOps Setup - CI/CD pipelines and automation ✅ Package Development - Managed/unmanaged packages ✅ Integration Projects - Connect with external systems ✅ Data Migration - Move data between orgs

Success Stories

  • Enterprise Retail: 70% reduction in implementation time
  • Financial Services: 85% first-pass code accuracy
  • Healthcare Provider: 3x faster Lightning migration
  • SaaS Company: 90% automated test coverage

Documentation

Core Guides

Getting Help

Contributing

We welcome contributions! Areas where you can help:

  • 🤖 Create new specialized agents
  • 📝 Improve templates and documentation
  • 🔧 Enhance workflows
  • 🐛 Report and fix bugs
  • 💡 Suggest new features

See Contributing Guide for details.

License

MIT License - See LICENSE file for details.

Why Choose SF-Agent Framework?

FeatureSF-AgentTraditional DevGeneric AI
Salesforce Expertise✅ Deep platform knowledge✅ Manual expertise❌ No context
Development Speed✅ 3x faster❌ Standard pace⚠️ Variable
Context Efficiency✅ 70% reduction❌ Full context❌ Massive usage
Code Quality✅ 85% first-pass⚠️ Varies⚠️ Heavy review
Best Practices✅ Built-in⚠️ Manual❌ Unaware
Cost✅ Lower AI costs❌ High dev costs❌ High tokens

🚀 Ready to Transform Your Salesforce Development?

npm install -g sf-agent-framework@latest

Join thousands of developers building smarter with AI

GitHub Stars npm Downloads License

Keywords

salesforce

FAQs

Package last updated on 04 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts