Get Sleepless Agent running in 5 minutes! This guide covers the minimal setup needed to start processing tasks.
💡 Slack is optional. You can use the
sleCLI to submit tasks, check status, and start the daemon without any Slack configuration. Skip to Step 3 if you want to try it without Slack first.
Before starting, ensure you have:
- ✅ Python 3.11+ installed
- ✅ Node.js 16+ installed
- ✅ Claude Code CLI installed
- ⬜ Slack workspace access (optional)
npm install -g @anthropic-ai/claude-codeVerify installation:
claude --versionpip install sleepless-agentOr from source:
git clone https://github.com/context-machine-lab/sleepless-agent
cd sleepless-agent
pip install -e .
⚠️ Windows / WSL —slenot found? Afterpip install, theslescript may not be on yourPATH.
Quick fix (WSL/Linux):echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc
Quick fix (Windows PowerShell):$d = python -m site --user-scripts; [Environment]::SetEnvironmentVariable("PATH","$env:PATH;$d","User")— then restart your terminal.
Or just use a virtual environment (python -m venv venv && venv/bin/activate) to avoid PATH issues entirely.
If you want to submit tasks via Slack slash commands, set up a Slack app first. If you just want to use the sle CLI, skip this step.
- Visit https://api.slack.com/apps
- Click "Create New App" → "From scratch"
- Name it "Sleepless Agent" and select your workspace
- Go to Settings → Socket Mode → Enable
- Create an app-level token (name: "sleepless-token")
- Save the
xapp-...token
Go to Features → Slash Commands and create:
/think- Submit tasks/check- Check status/chat- Interactive chat mode with Claude/usage- Show Claude Code Pro plan usage
Features → OAuth & Permissions → Bot Token Scopes:
chat:writecommandschannels:history(for chat mode)reactions:write(for chat mode)
Features → Event Subscriptions → Enable Events → Subscribe to bot events:
message.channelsmessage.groups
- Click "Install to Workspace"
- Save the
xoxb-...bot token
See the full Slack Setup Guide for a complete walkthrough.
Create a .env file:
# Optional: only needed if you want Slack integration
SLACK_BOT_TOKEN=xoxb-your-bot-token-here
SLACK_APP_TOKEN=xapp-your-app-token-here
# Optional: Custom workspace location
AGENT_WORKSPACE=./workspaceIf you don't have Slack tokens yet, you can leave them out and use the
sleCLI directly. The daemon will start in CLI-only mode.
sle daemonWithout Slack tokens the agent starts in CLI-only mode — you won't see Slack log lines but task processing works normally. With Slack tokens configured you should see:
2025-10-24 23:30:12 | INFO | Sleepless Agent starting...
2025-10-24 23:30:12 | INFO | Slack bot started and listening for events
Without Slack — use the CLI directly:
sle think "Research Python async patterns"
sle checkWith Slack — try these commands in your workspace:
/think Research Python async patterns
/check
The agent should acknowledge your task and show the queue status.
Start an interactive session with Claude:
/chat my-project
This creates a Slack thread where you can have a real-time conversation with Claude.
⚠️ Important: All messages to Claude must be sent inside the thread, not in the main channel. Claude will only respond to messages within the chat thread.
In the thread, try:
Create a hello world Python script
To end the session, type exit in the thread or use /chat end.
-
Set up Git integration for automated commits:
git config --global user.name "Sleepless Agent" git config --global user.email "agent@sleepless.local"
-
Configure Pro plan thresholds in
config.yaml:claude_code: threshold_day: 20.0 # Pause at 20% during day threshold_night: 80.0 # Pause at 80% at night
-
Set working hours for optimal usage:
claude_code: night_start_hour: 20 # 8 PM night_end_hour: 8 # 8 AM
- 📖 Read the Architecture Overview
- 🔧 Complete Slack Setup for all features
- 🎯 Try the First Task Tutorial
- 📊 Learn about Task Management
- WSL/Linux:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc - Windows: Run
python -m site --user-scriptsto find the Scripts dir, then add it to yourPATHin System Settings → Environment Variables - Use a virtual environment to avoid this entirely:
python -m venv venv && source venv/bin/activate(orvenv\Scripts\activateon Windows)
- Verify Socket Mode is enabled
- Check both tokens are correct in
.env - Ensure the bot is in your channel
- Run
claude --versionto verify CLI installation - Check
sle checkfor usage limits - Review logs:
tail -f workspace/data/agent.log
- Agent pauses at configured thresholds
- Wait for 5-hour window reset
- Adjust thresholds in
config.yamlif needed
🎉 Congratulations! You now have a 24/7 AI agent working for you. Check out the tutorials to learn more advanced features.