sleepless-agent  by context-machine-lab

AI agentOS for continuous development automation

Created 2 weeks ago

New!

322 stars

Top 84.2% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides a 24/7 AI agent, "Sleepless Agent," designed to automate development tasks using Claude Code Pro via Slack. It targets developers and power users seeking to maximize their AI tool's uptime, transforming it into an "AgentOS" that handles tasks, manages isolated workspaces, and integrates with Git for commits and pull requests, especially during off-hours.

How It Works

Sleepless Agent operates as a Python daemon, interfacing with users through Slack commands. It leverages the Claude Code CLI and its Python Agent SDK to execute tasks within isolated workspaces, ensuring true parallelism. A SQLite database manages a persistent task queue, while Git integration automates version control, including commit generation and optional PR creation for serious tasks. A key feature is its intelligent scheduling, which monitors Claude Code usage and dynamically adjusts task execution based on configurable day/night thresholds to balance automated work with manual user needs.

Quick Start & Requirements

  • Primary install: pip install sleepless-agent
  • Prerequisites: Python 3.11+, Slack workspace admin access, Claude Code CLI (npm install -g @anthropic-ai/claude-code), Git, gh CLI (optional for PR automation).
  • Setup: Requires creating a Slack app, configuring OAuth scopes and slash commands, setting Slack bot and app tokens in a .env file, and potentially configuring Git remote repository details in config.yaml.
  • Links: Documentation: https://context-machine-lab.github.io/sleepless-agent/, Discord: https://discord.gg/74my3Wkn.

Highlighted Details

  • Continuous Operation: Runs as a 24/7 daemon, always ready to process tasks submitted via Slack.
  • Slack Integration: Submit tasks, check status, manage reports, and handle trash via intuitive Slack slash commands (/think, /check, /report, etc.).
  • Git Management: Automatically commits random thoughts to a thought-ideas branch and creates feature branches with PRs for serious tasks.
  • Usage Optimization: Intelligently schedules tasks based on Claude Code usage thresholds, prioritizing manual use during the day and aggressive processing at night.
  • Isolated Workspaces: Each task executes in its own dedicated directory, preventing interference and ensuring clean parallel processing.
  • Multi-Agent Workflow: Supports configurable Planner, Worker, and Evaluator agents for complex task decomposition and execution.
  • Task Auto-Generation: Employs strategies to create new tasks or refine existing ones during idle periods.

Maintenance & Community

The project is community-driven, with a Discord server available for support and discussion. As an initial release (v0.1.0), it is actively under development, with a roadmap indicating planned enhancements such as advanced scheduling and daily reporting.

Licensing & Compatibility

Released under the MIT License, this project is permissive for commercial use and integration into closed-source projects.

Limitations & Caveats

This project is at an early stage (v0.1.0) with a roadmap indicating ongoing development. Setup involves configuring external services like Slack and Claude Code CLI, which can be complex. Its functionality is dependent on the availability and correct installation of these external tools.

Health Check
Last Commit

1 week ago

Responsiveness

Inactive

Pull Requests (30d)
6
Issues (30d)
4
Star History
327 stars in the last 14 days

Explore Similar Projects

Feedback? Help us improve.