An intelligent lightweight AI agent system that transforms high-level business requirements into detailed Salesforce implementation plans through natural language conversation. Built with a custom agent framework optimized for deployment and performance.
Try the application online β (Replace with your actual deployment URL)
git clone https://github.com/yourusername/sf_agents.git
cd sf_agents
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
streamlit run app.py
This system uses a collaborative team of lightweight AI agents to automate the journey from business requirements to Salesforce configurations. The application provides an intelligent, conversational interface for planning Salesforce implementations with minimal dependencies and maximum performance.
- π€ Lightweight Agent Framework: Custom agent system built directly on OpenAI API
- π― Specialized Agents: Schema Expert, Technical Architect, and Dependency Resolver
- π Real-time Salesforce Integration: Live connection to your Salesforce org
- π‘ Smart Requirement Enhancement: Automatically identifies and fills gaps
- π¬ Natural Language Interface: Streamlit-based GUI for seamless interaction
- π§ Persistent Memory: Conversation history and context retention
- π Automated Planning: Structured Salesforce implementation plans
- π§ User Choice Workflow: Accept, modify, or skip expert suggestions
- π Session Management: Save, load, and export conversation sessions
- π Enhanced Conversations: Clarification β Expert Analysis β Suggestions β Planning
- β‘ Fast Deployment: Minimal dependencies for quick cloud deployment
The system uses a lightweight, custom agent framework designed for deployment efficiency:
sf_agents/
βββ agents/ # AI Agent modules
β βββ __init__.py
β βββ simple_agent.py # Lightweight OpenAI wrapper
β βββ memory_manager.py # Conversation memory & persistence
β βββ master_agent.py # Main orchestrator agent
β βββ salesforce_expert_agent.py # Schema and database expert
β βββ technical_architect_agent.py # Technical design specialist
β βββ dependency_resolver_agent.py # Task and dependency creator
β βββ salesforce_connector.py # Real-time Salesforce integration
βββ data/ # Data storage
β βββ conversation_history/ # Session conversation logs
β βββ implementation_plans/ # Generated implementation plans
βββ app.py # Main Streamlit application
βββ config.py # Configuration management
βββ requirements.txt # Minimal dependencies
- Python 3.8+
- OpenAI API key
- Virtual environment (recommended)
-
Clone and navigate to the project:
cd sf_agents
-
Activate your virtual environment:
source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Configure environment variables:
Create a
.env
file in the project root:OPENAI_API_KEY=your_openai_api_key_here DEBUG=True LOG_LEVEL=INFO
-
Run the application:
streamlit run app.py
-
Open your browser: Navigate to
http://localhost:8501
-
Enter your business requirement in natural language
- Example: "We need a customer support ticketing system"
- Example: "Create a lead management process for our sales team"
-
Engage with clarification questions
- The agent will ask follow-up questions to understand your needs
- Provide detailed responses about business goals, user roles, data requirements
-
Confirm and generate plan
- Once the agent has sufficient information, confirm to proceed
- Receive a comprehensive Salesforce implementation plan
π€ User: "We need a customer support ticketing system"
π€ Master Agent: "I'll help you design a customer support ticketing system!
Let me understand your core business needs first..."
π€ User: [Provides basic information about business goals]
π€ Master Agent: "Great! I have the core requirements. Let me consult with
our Salesforce Expert Agent to identify any gaps and
suggest enhancements..."
π Expert Analysis: [Identifies missing security, integration, and UX considerations]
π€ Master Agent: "Our expert identified several valuable enhancements:
- Security permissions and field-level access
- Integration with email systems
- Mobile-friendly interface design
- Automated escalation workflows
Would you like to include these suggestions?"
π€ User: "Accept the security and integration suggestions"
π€ Master Agent: [Generates comprehensive implementation plan with selected enhancements]
Key Enhancement: You no longer need to think of every detail upfront - the Expert Agent fills gaps with industry best practices!
The generated plans include:
- π Executive Summary: Business requirement overview
- ποΈ Salesforce Components: Custom objects, fields, relationships
- βοΈ Development Components: Apex classes, triggers, LWC components
- π€ Automation: Flows, process builders, validation rules
- π Security: Permission sets, profiles, sharing rules
- π Integration: External systems, APIs, data migration
- π Implementation Phases: Timeline and dependencies
- π§ͺ Testing Strategy: Unit, integration, and UAT approaches
Variable | Description | Required |
---|---|---|
OPENAI_API_KEY |
Your OpenAI API key | β Yes |
DEBUG |
Enable debug mode | No (default: True) |
LOG_LEVEL |
Logging level | No (default: INFO) |
Edit config.py
to customize:
- Data storage paths
- Model parameters
- Agent behavior settings
- Automatic saving: All conversations are automatically saved
- Session IDs: Unique identifiers for each conversation
- History loading: Resume previous conversations anytime
- Conversation Export: Download complete conversation history as JSON
- Implementation Plans: Export generated plans for documentation
- Session Management: Load, create, or switch between sessions
- Requirement Analysis: Understands complex business needs
- Expert Collaboration: Works with specialized agents for enhanced solutions
- Intelligent Clarification: Asks relevant follow-up questions
- Salesforce Expertise: Deep knowledge of platform capabilities
- Structured Planning: Creates actionable implementation roadmaps
- Context Retention: Maintains conversation memory throughout sessions
- Gap Analysis: Identifies missing requirements automatically
- Best Practice Recommendations: Suggests industry-standard approaches
- Architecture Validation: Reviews solutions for scalability and performance
- Security Assessment: Ensures proper permission and security models
- Integration Guidance: Recommends optimal integration patterns
- Industry Expertise: Provides sector-specific recommendations
- Risk Mitigation: Identifies and prevents common implementation issues
- Initial: First requirement submission
- Clarifying: Gathering core business information
- Expert Analysis: AI expert identifying gaps and enhancements
- Suggestions Review: User choosing which expert recommendations to include
- Planning: Ready to generate implementation plan
- Completed: Plan generated with expert enhancements, follow-up supported
agents/master_agent.py
: Core AI agent logicagents/memory_manager.py
: Conversation persistenceapp.py
: Streamlit user interfaceconfig.py
: Configuration management
For future phases, the architecture supports:
- Additional specialized agents
- Salesforce API integration
- Automated deployment capabilities
- Multi-agent collaboration workflows
Try these sample requirements to test the system:
- "Create a basic contact management system"
- "Set up opportunity tracking for sales"
- "Build a simple case management solution"
- "Design a multi-stage approval process for purchase orders with budget controls and automated notifications"
- "Create an inventory management system with automated reordering, vendor integration, and cost tracking"
- "Build a customer onboarding workflow with document collection, approval stages, and integration with external systems"
-
OpenAI API Key Error
- Ensure your API key is correctly set in the
.env
file - Verify you have sufficient API credits
- Ensure your API key is correctly set in the
-
Import Errors
- Make sure all dependencies are installed:
pip install -r requirements.txt
- Verify you're using the correct virtual environment
- Make sure all dependencies are installed:
-
Streamlit Issues
- Clear browser cache and refresh
- Check the terminal for detailed error messages
Enable debug mode in your .env
file:
DEBUG=True
This provides detailed error traces and additional logging.
Phase 2 (Planned):
- Specialized agent team (Security, Integration, UI/UX agents)
- Salesforce API integration
- Automated metadata generation
Phase 3 (Planned):
- Automated deployment to Salesforce orgs
- Real-time collaboration between agents
- Advanced testing and validation
This project is built for demonstration and educational purposes.
This is a demonstration project. For questions or suggestions, please refer to the project documentation.
- Fork this repository
- Visit share.streamlit.io
- Connect your GitHub account
- Select this repository
- Deploy automatically
- Visit railway.app
- Connect your GitHub account
- Deploy this repository
- Set environment variables in Railway dashboard
- Create Heroku app
- Connect GitHub repository
- Set environment variables
- Deploy from Heroku dashboard
See deployment-guide.md for detailed instructions.
- App shows configuration popup for API keys
- No environment variables needed
- Perfect for end users
- Set
USE_ENV_CONFIG=True
in.env
- Uses environment variables directly
- Perfect for development/testing
- β No sensitive data in code
- β Environment variables properly ignored
- β In-app credential collection
- β Secure API key handling
sf_agents/
βββ app.py # Main Streamlit application
βββ config.py # Configuration management
βββ requirements.txt # Python dependencies
βββ Procfile # Heroku deployment
βββ runtime.txt # Python version
βββ railway.json # Railway deployment
βββ .streamlit/config.toml # Streamlit configuration
βββ agents/ # AI agent modules
β βββ master_agent.py # Main orchestration agent
β βββ salesforce_expert_agent.py # Schema specialist agent
β βββ technical_architect_agent.py # Architecture design agent
β βββ dependency_resolver_agent.py # Task planning agent
β βββ memory_manager.py # Conversation memory
β βββ salesforce_connector.py # Salesforce API integration
βββ data/ # Data storage
βββ conversation_history/ # Chat sessions
βββ implementation_plans/ # Generated plans
Tapas Mukherjee
AI Engineer & Salesforce Specialist
Built with β€οΈ using a lightweight agent framework, Streamlit, and OpenAI