Last year I was running a 12-person team and paying for:
- ๐ Trello โ task management ($12/user/mo)
- ๐ Notion โ knowledge base ($10/user/mo)
- โก Zapier โ workflow automation ($30/mo)
- ๐ง Gmail โ email (free, but 5 tabs of context switching)
- ๐ค Some chatbot tool โ AI assistant ($50/mo)
Total: ~$600/month. Five tools. Five bills. Five places where information went to die. ๐ฉ
I kept thinking: why can't one thing do all of this? ๐ค
So I built HiveOps ๐ โ a self-hosted company operating system with AI agents that actually execute tasks, not just chat.
And I open-sourced it. ๐
๐ What HiveOps Actually Does
It's a full-stack Node.js app that gives your team:
๐ Task Management โ priority levels, status tracking, assign to users or AI agents, comments, file attachments.
๐ค AI Agents โ not chatbots. Real agents that execute tasks with retry logic, exponential backoff, and a dead letter queue. Assign a task to an agent and it runs it. โก
๐ Workflow Automation โ event-driven rules. Trigger โ Conditions โ Actions. Example: "When an urgent task is created, notify the department manager and auto-assign it to an agent."
๐ง Real Email โ inbox, sent, drafts, starred. IMAP polling for inbound. SMTP for outbound. AI drafts replies. Not a mock โ real email. โ๏ธ
๐ฌ Real-Time Chat โ Socket.IO with typing indicators, channels, direct agent chat.
๐ Knowledge Base โ full-text search, categories, CRUD.
โฐ Scheduler โ DB-persisted cron. Interval, daily, weekly. Auto-creates tasks and triggers agents.
๐ The Tech Stack
๐ฅ๏ธ Backend: Node.js + Express
๐จ Frontend: Next.js 14 (App Router) + Tailwind
๐พ Database: SQLite (dev) or PostgreSQL (production)
โก Real-time: Socket.IO
๐ Auth: JWT + bcrypt
๐ง AI: Any OpenAI-compatible API
๐ง Email: Nodemailer + ImapFlow
๐ Deploy: docker-compose up
The database adapter is the part I'm most proud of. Same API, two backends:
// This works on SQLite AND PostgreSQL โ zero changes needed โจ
const user = await db.prepare('SELECT * FROM users WHERE id = ?').get(id);
const tasks = await db.prepare('SELECT * FROM tasks WHERE status = ?').all('pending');
await db.prepare('INSERT INTO users (...) VALUES (...)').run(...);
SQLite for local dev (no Docker needed ๐). PostgreSQL for production (one env var). Auto-converts ? placeholders to $1, $2. Auto-handles boolean differences. Auto-coerces bigint strings from COUNT queries. ๐ง
๐ค The AI Agent System (This Is The Interesting Part)
Most "AI agent" projects are chatbots with extra steps. HiveOps agents are different:
// ๐ Agent auto-execution loop:
// 1. Pick pending tasks assigned to active agents
// 2. Execute via LLM with the agent's system prompt
// 3. On failure -> retry with exponential backoff (10s, 20s, 40s)
// 4. After 3 retries -> dead letter queue + notify task creator ๐
Agents can also delegate to each other ๐ค:
// Agent A (marketing) delegates to Agent B (engineering)
await agentDelegate(marketingAgentId, engineeringAgentId,
"We need a landing page for the Q2 campaign", taskId);
And the workflow engine ties it all together ๐:
// When a task is created with priority "urgent":
// -> Check: is priority === "urgent"? โ ๏ธ
// -> Action 1: notify the department manager ๐ข
// -> Action 2: auto-assign to the ops agent ๐ค
// -> Action 3: send a message to the #urgent channel ๐ฌ
No Zapier. No monthly fee. Just rules that run. โ
๐ How to Run It
git clone https://github.com/mamoor123/hiveops.git && cd hiveops
cp .env.example .env
openssl rand -base64 32 # paste into JWT_SECRET ๐
docker-compose up --build
Open http://localhost:3000. That's it. ๐ฏ
Or if you don't want Docker โ SQLite mode works out of the box:
cd server && npm install && npm run migrate
JWT_SECRET=your-secret npm run dev
๐ง What I Learned Building This
1๏ธโฃ Dual-database adapters are worth the effort. Supporting SQLite + PostgreSQL from day one means devs can contribute without Docker, and you deploy with Postgres for real workloads. The adapter is ~250 lines and handles all the quirks (bigint strings, boolean differences, placeholder syntax). ๐ง
2๏ธโฃ AI agents need execution infrastructure, not just prompts. The prompt is 10% of the work. The retry logic, error handling, dead letter queues, concurrency control โ that's the other 90%. ๐ช
3๏ธโฃ Real-time is a superpower for internal tools. Socket.IO notifications feel alive compared to polling. Users notice the difference. โก
4๏ธโฃ Open source is a force multiplier. I built this for myself, but open-sourcing it means I get bug reports, feature requests, and contributors for free. ๐
๐ฎ What's Next
- ๐ฑ Mobile-friendly responsive UI
- ๐ Calendar view for tasks
- ๐ Webhook integrations
- ๐ข Multi-tenant support
- ๐ SSO (SAML/OIDC)
โญ Try It
GitHub: github.com/mamoor123/hiveops ๐
Star it โญ if you find it useful. Open an issue ๐ if you find a bug. PRs welcome ๐
If you're paying for 5+ tools and your team is under 50 people โ give it a spin. You might save $600/month like I did. ๐ฐ
What tools are you paying for that you wish were one thing? Drop a comment below ๐ โ I'd love to hear!
Top comments (2)
This is really impressive. I like that you didnโt just build another โAI chatbot,โ but a full operating system for a small team with tasks, workflows, email, chat, and actual execution through agents.
The dual database adapter is also a very smart design choice. SQLite for local development and PostgreSQL for production makes the project much easier for others to try and contribute to.
Open-sourcing it was definitely the right move. Thanks for sharing this โ I can see this being very useful for small teams that want more control and lower costs.
Thanks ๐