by JudyaiLab
Multi-agent autonomous framework โ let your AI work while you sleep ๐
# Add to your Claude Code skills
git clone https://github.com/JudyaiLab/ai-night-shiftA multi-agent autonomous framework that lets your AI assistants work while you sleep.
AI Night Shift is an open-source framework for running multiple AI agents (Claude Code, Gemini, and more) in coordinated autonomous sessions during off-hours. Born from 30+ real production night shifts, this isn't theoretical โ it's battle-tested.
Most "autonomous agent" tools run a single agent in isolation. AI Night Shift orchestrates multiple heterogeneous AI agents working together:
| Agent | Engine | Role | Mode | |-------|--------|------|------| | Developer | Claude Code | Coding, debugging, deploying | Continuous (hours) | | Researcher | Gemini CLI | Research, data gathering, triage | Periodic (minutes) | | Coordinator | Any LLM | Task routing, monitoring | Heartbeat (30min) |
They communicate through shared protocols โ a file-based message queue, shared chat log, and task board integration.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ AI Night Shift โ
โ โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โ
โ โ Claude โ โ Gemini โ โHeartbeat โ โ
โ โ Code โ โ CLI โ โ Agent โ โ
โ โ โ โ โ โ โ โ
โ โ night_ โ โ patrol. โ โ heartbeatโ โ
โ โ shift.sh โ โ sh โ โ _config โ โ
โ โโโโโโฌโโโโโโ โโโโโโฌโโโโโโ โโโโโโฌโโโโโโ โ
โ โ โ โ โ
โ โโโโโโโโฌโโโโโโโโดโโโโโโโฌโโโโโโโโ โ
โ โ โ โ
โ โโโโโโโโผโโโโโโโ โโโโโโผโโโโโโ โ
โ โ night_chat โ โ bot_inboxโ โ
โ โ .md โ โ (JSON) โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโ โ
โ โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โ
โ โ Plugins โ โDashboard โ โTemplates โ โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
No comments yet. Be the first to share your thoughts!
git clone https://github.com/judyailab/ai-night-shift.git
cd ai-night-shift
bash install.sh
# Copy the example config and edit your settings
cp config.env.example config.env
nano config.env
# Customize the night shift prompt
nano claude-code/prompt_template.txt
# Run a single round to verify setup
bash claude-code/night_shift.sh --max-rounds 1
# The installer adds cron jobs automatically, or set up manually:
crontab -e
# Add: 0 1 * * * cd ~/ai-night-shift && bash claude-code/wrapper.sh
| Module | Description | Docs |
|--------|-------------|------|
| Claude Code | Continuous developer sessions | README |
| Gemini | Periodic patrol and research | README |
| OpenClaw | Heartbeat coordinator pattern | README |
| Protocols | Inter-agent communication | README |
| Plugins | Extensible pre/post/task hooks | README |
| Dashboard | Visual monitoring interface | Open dashboard/index.html |
| Templates | Prompt templates by use case | 4 templates included |
| Template | Use Case |
|----------|----------|
| development.txt | Coding, testing, debugging |
| research.txt | Data gathering, analysis |
| content.txt | Writing, translation, SEO |
| maintenance.txt | System admin, monitoring |
Extend your night shift with pre-built or custom plugins:
# Enable a plugin
ln -s plugins/examples/system_health.sh plugins/enabled/
# List all plugins
bash plugins/plugin_loader.sh --list
Built-in plugins: System Health, Backup, Git Commit Summary, Morning Report, De-Sloppify
Open dashboard/index.html in a browser. Drag and drop your report files to visualize:
The night shift runner is agent-agnostic. Switch agents with one config change:
# In config.env
AGENT_ADAPTER=claude-code # default
# AGENT_ADAPTER=codex-cli # OpenAI Codex CLI
# AGENT_ADAPTER=aider # Aider
# AGENT_ADAPTER=custom # Your own (copy adapters/custom.sh)
Or via CLI flag:
bash claude-code/night_shift.sh --adapter codex-cli
Create your own adapter: copy adapters/custom.sh, implement 5 functions, done. See adapters/ for details.
The most common pitfall: your agent stops mid-task and waits for confirmation that never comes.
All included templates have an Autonomy Rules block that prevents this:
See docs/advanced.md for the full prompt design guide.
npm install -g @anthropic-ai/claude-code)npm install -g @google/gemini-cli)cron and timeout (GNU coreutils; macOS: brew install coreutils)See CONTRIBUTING.md for guidelines.
MIT โ Judy AI Lab
Built with real-world experience from 30+ autonomous night shifts. If your AI works harder while you sleep, you're doing it right. ๐