TL;DR
- Install the Slack Agent Skill, run the wizard with your coding agent, and choose the type of agent you want.
- Follow the five-stage setup process using the Slack Agent Template to go from idea to deployment on Vercel.
- Utilize Workflow DevKit for complex interactions and AI Gateway for versatile model integration.
Prerequisites
Before beginning, ensure you have the following:
- A Slack Workspace where you have permission to add and manage apps.
- A Vercel account for deploying your application.
- Access to a coding agent like Claude Code or OpenCode.
- Basic understanding of Slack API and Git.
Step-by-Step Instructions
1. Install the Slack Agent Skill
- Access the Skill Directory: Navigate to your coding agent’s skill directory.
- Install the Skill: Use the following command in the coding agent CLI:
install skill slack-agent-skill
2. Run the Wizard
- Launch the Wizard: Run the skill using your agent:
run skill slack-agent-skill - Define Your Agent: Respond to prompts about your agent's purpose (e.g., "support agent" or "standup bot").
3. Follow the Five-Stage Setup
Stage 1: Project Setup
- Choose LLM Provider: Select the large language model (LLM) provider for your agent.
- Scaffold the Project: Your agent will create a new project using the Slack Agent Template.
Stage 2: Slack App Creation
- Manifest Configuration: Customize
manifest.jsonwith app attributes like name and description. - Console Guidance: Follow the steps in the Slack API console to create and install the app in your workspace.
Stage 3: Environment Configuration
- Set Up Secrets: Configure your signing secret and bot token.
- API Keys: Input any necessary API keys for additional integrations.
Stage 4: Local Testing
- Dev Server: Start the development server to test real-time bot responses.
npm start # or equivalent command - Test Interactions: Send messages to your bot on Slack to see immediate responses.
Stage 5: Production Deployment
- Deploy to Vercel: Use Vercel CLI to deploy your app:
vercel --prod - Environment Setup: Configure any environment variables required for your production app.
Tips and Best Practices
- Iterative Testing: Regularly test each component in Slack before moving to the next setup stage.
- Utilize Templates: Leverage provided templates to avoid common configuration errors.
- Monitor Feedback: Continually gather user feedback to refine your agent's responses and efficiency.
Common Issues
- OAuth Scope Errors: Ensure all required OAuth scopes are set in Slack console.
- Deployment Failures: Double-check Vercel environment variables and logs for deployment issues.
- Response Latency: If response times exceed Slack’s 3-second window, streamline your webhook handling logic.
Next Steps
After successfully deploying your Slack agent:
- Extend Features: Explore adding custom tools by instructing your coding agent to integrate with internal systems.
- Learn Advanced Concepts: Enroll in the Vercel Academy Slack Agents course for comprehensive insights.
- Continuous Integration: Set up automated testing and staging deployments with Vercel’s preview features.
By following this guide, you can efficiently deploy a Slack agent using the Slack Agent Skill and Vercel, customizing it to fit your specific business needs while maintaining efficiency and reliability.
