{"slug": "building-an-ai-automation-system-for-myzubster", "title": "Building an AI Automation System for MyZubster", "summary": "A developer built an AI automation system for the open-source MyZubster ecosystem that automatically handles GitHub issues, bounties, and Telegram notifications. The system uses local AI models (Gemma, Llama, DeepSeek) via Ollama, with Node.js, Express, MongoDB, and React, and includes a Telegram bot with commands for status, bounties, and AI analysis.", "body_md": "🚀 Building an AI Automation System for MyZubster\n\nIntroduction\n\nMyZubster is an open-source ecosystem for plant mapping, privacy-first payments with Monero, and human-centered AI. In this post, I'll share how I built an AI automation system that automatically handles GitHub issues, bounties, and Telegram notifications.\n\n📋 The Problem\n\nManaging an open-source project like MyZubster is complex:\n\n```\nToo many issues requiring manual triage\n\nBounties need to be created and managed manually\n\nSlow communication with contributors\n\nManual monitoring of GitHub activity\n```\n\n🎯 The Solution\n\nI built a modular system that:\n\n```\nMonitors GitHub - Automatically detects new issues and PRs\n\nAnalyzes with AI - Uses local models (Gemma, Llama, DeepSeek)\n\nCreates bounties - Automatically for labeled issues\n\nSends notifications - Real-time alerts on Telegram\n\nOrchestrates everything - With automatic fallback between AI models\n```\n\n🏗️ Architecture\n\ntext\n\n┌─────────────────────────────────────────────────────────────┐\n\n│ MyZubster AI Automation │\n\n├─────────────────────────────────────────────────────────────┤\n\n│ │\n\n│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │\n\n│ │ Telegram │ │ GitHub │ │ AI Models │ │\n\n│ │ Bot Handler │ │ Monitor │ │ │ │\n\n│ └──────────────┘ └──────────────┘ └──────────────┘ │\n\n│ │ │ │ │\n\n│ └─────────────────┼──────────────────┘ │\n\n│ │ │\n\n│ ┌────────▼────────┐ │\n\n│ │ Automation │ │\n\n│ │ Orchestrator │ │\n\n│ └─────────────────┘ │\n\n│ │ │\n\n│ ┌─────────────────┼──────────────────┐ │\n\n│ │ │ │ │\n\n│ ┌──────▼──────┐ ┌───────▼───────┐ ┌──────▼──────┐ │\n\n│ │ Database │ │ Backend │ │ Frontend │ │\n\n│ │ (MongoDB) │ │ (Node.js) │ │ (React) │ │\n\n│ └─────────────┘ └───────────────┘ └─────────────┘ │\n\n│ │\n\n└─────────────────────────────────────────────────────────────┘\n\n🛠️ Technology Stack\n\nCore Technologies\n\n```\nNode.js - Runtime environment\n\nExpress - API server\n\nMongoDB - Database with Mongoose ODM\n\nReact - Frontend with Leaflet maps\n```\n\nAI Stack\n\n```\nOllama - Local AI model runner\n\nGemma 2B - Google's lightweight AI model (default)\n\nLlama 3.2 - Meta's powerful model (fallback)\n\nDeepSeek R1 - Reasoning model (fallback)\n```\n\nAutomation Stack\n\n```\nnode-telegram-bot-api - Telegram integration\n\nOctokit - GitHub API client\n\nnode-cron - Scheduled tasks\n\nsystemd - Service management\n\nWinston - Logging\n```\n\n🧠 AI Models Setup\n\nThe AI models run locally using Ollama. Here's how I set them up:\n\nInstalling Ollama\n\nbash\n\ncurl -fsSL [https://ollama.com/install.sh](https://ollama.com/install.sh) | sh\n\nPulling the Models\n\nbash\n\nollama pull gemma:2b\n\nollama pull llama3.2:3b\n\nollama pull deepseek-r1:1.5b\n\nTesting the Models\n\nbash\n\nollama run gemma:2b \"What is MyZubster?\"\n\n🤖 The Telegram Bot\n\nThe bot provides interactive commands for the community:\n\nAvailable Commands\n\nCommand Description\n\n/start Welcome message and guide\n\n/status System and services status\n\n/github Recent GitHub activity\n\n/bounties List of active bounties\n\n/analyze AI analysis of an issue\n\n/help Show all available commands\n\nBot Configuration\n\njavascript\n\nclass TelegramBotHandler {\n\nasync start() {\n\nthis.bot = new TelegramBot(this.token, { polling: true });\n\n```\n    // Register command handlers\n    this.bot.onText(/^\\/start/, this.handleStart.bind(this));\n    this.bot.onText(/^\\/status/, this.handleStatus.bind(this));\n    this.bot.onText(/^\\/bounties/, this.handleBounties.bind(this));\n    this.bot.onText(/^\\/github/, this.handleGitHub.bind(this));\n    this.bot.onText(/^\\/analyze/, this.handleAnalyze.bind(this));\n\n    this.running = true;\n    this.logger.info('Telegram bot is ready');\n}\n```\n\n}\n\n🐙 GitHub Monitor\n\nThe GitHub Monitor watches repositories and emits events:\n\njavascript\n\nconst { Octokit } = require('@octokit/rest');\n\nconst EventEmitter = require('events');\n\nclass GitHubMonitor extends EventEmitter {\n\nconstructor(token, logger) {\n\nsuper();\n\nthis.token = token;\n\nthis.logger = logger;\n\nthis.issues = {};\n\nthis.repo = process.env.GITHUB_REPO;\n\n}\n\n```\nasync start() {\n    this.octokit = new Octokit({\n        auth: this.token,\n        userAgent: 'MyZubster-AI-Automation'\n    });\n\n    this.running = true;\n    await this.checkNewIssues();\n    this.startPeriodicCheck();\n}\n\nstartPeriodicCheck() {\n    setInterval(() => {\n        this.checkNewIssues().catch(error => {\n            this.logger.error('Periodic check failed:', error);\n        });\n    }, 300000); // 5 minutes\n}\n```\n\n}\n\n🧠 AI Orchestrator\n\nThe AI Orchestrator is the brain of the system. It uses multiple models with fallback strategies:\n\njavascript\n\nclass AIOrchestrator {\n\nconstructor(logger) {\n\nthis.logger = logger;\n\nthis.models = {\n\ngemma: {\n\nurl: '[http://localhost:11434/api](http://localhost:11434/api)',\n\nmodel: 'gemma:2b'\n\n},\n\nllama: {\n\nurl: '[http://localhost:11434/api](http://localhost:11434/api)',\n\nmodel: 'llama3.2:3b'\n\n},\n\ndeepseek: {\n\nurl: process.env.DEEPSEEK_API_URL,\n\nkey: process.env.DEEPSEEK_API_KEY\n\n}\n\n};\n\n}\n\n``` js\nasync analyzeIssue(issue) {\n    const prompt = `\n```\n\nAnalyze this GitHub issue:\n\nTitle: ${issue.title}\n\nDescription: ${issue.body}\n\nLabels: ${issue.labels.map(l => l.name).join(', ')}\n\nProvide:\n\nSuggested Bounty Amount\n\n`;\n\n``` js\n// Try models in order with fallback\nconst models = [\n    { name: 'gemma', config: this.models.gemma, method: 'ollama' },\n    { name: 'llama', config: this.models.llama, method: 'ollama' },\n    { name: 'deepseek', config: this.models.deepseek, method: 'api' }\n];\n\nfor (const model of models) {\n    try {\n        return await this.analyzeWithModel(model, prompt);\n    } catch (error) {\n        this.logger.warn(`${model.name} failed, trying next...`);\n    }\n}\n\nreturn this.getDefaultAnalysis(issue);\n```\n\n}\n\n}\n\n🔧 Systemd Service Management\n\nFor production deployment, I created a systemd service:\n\nini\n\n[Unit]\n\nDescription=MyZubster AI Automation Service\n\nAfter=network.target mongod.service\n\n[Service]\n\nType=simple\n\nUser=root\n\nWorkingDirectory=/root/myzubster/myzubster-merged/services/ai-automation\n\nExecStart=/usr/bin/node /root/myzubster/myzubster-merged/services/ai-automation/index.js\n\nRestart=always\n\nRestartSec=10\n\nEnvironment=NODE_ENV=production\n\nEnvironment=PORT=5678\n\n[Install]\n\nWantedBy=multi-user.target\n\n📊 Real Example Analysis\n\nHere's a real analysis from the system on a Monero payment issue:\n\ntext\n\n📊 AI Analysis Results:\n\n**1. Summary:**\n\nThe issue proposes adding Monero (XMR) payment support for bounties.\n\n**2. Complexity:**\n\nHigh. The integration of a new cryptocurrency like XMR involves technical\n\ncomplexities related to API integration, smart contract development, and\n\npotential compatibility issues with existing systems.\n\n**3. Priority:**\n\nHigh. Integrating XMR payments would attract crypto-focused users.\n\n**4. Technical Approach:**\n\n• Develop an API integration with the Monero blockchain\n\n• Create smart contracts for managing bounties\n\n• Integrate with the bounty platform\n\n• Implement user interfaces\n\n**5. Estimated Effort:**\n\n3-4 weeks (120-160 hours)\n\n**6. Suggested Bounty:**\n\n0.01 XMR per bounty (~$2-5 USD)\n\n🚀 Results\n\nAfter deploying the system, I saw immediate benefits:\n\nMetric Before After\n\nIssue response time 24-48 hours < 5 minutes\n\nBounty creation Manual (2-3 days) Automatic (5 minutes)\n\nContributor notifications Manual emails Automatic Telegram\n\nTime spent on triage 5+ hours/week 0 hours (automated)\n\n📁 Project Structure\n\ntext\n\nservices/ai-automation/\n\n├── src/\n\n│ ├── telegram/\n\n│ │ └── bot.js # Telegram bot handler\n\n│ ├── github/\n\n│ │ └── monitor.js # GitHub monitor\n\n│ ├── ai/\n\n│ │ └── orchestrator.js # AI orchestrator\n\n│ └── orchestrator/\n\n│ └── index.js # Main orchestrator\n\n├── logs/\n\n├── scripts/\n\n├── .env.example\n\n├── index.js\n\n├── package.json\n\n└── README.md\n\n💡 Key Lessons Learned\n\n```\nLocal AI is Powerful - Running models locally saves API costs and keeps data private\n\nFallback Strategies Matter - Multiple models ensure reliability\n\nEvent-Driven Architecture - Makes the system extensible and maintainable\n\nMock Mode - Enables testing without external dependencies\n\nSystemd - Essential for production deployment\n```\n\n🔗 Links\n\n```\nRepository: https://github.com/MyZubster-Ecosystem/myzubster\n\nTelegram Bot: @myzubster_bot\n\nTelegram Channel: @myzubster\n\nAI Service: services/ai-automation\n```\n\n📝 Try It Yourself\n\nbash\n\ngit clone [https://github.com/MyZubster-Ecosystem/myzubster.git](https://github.com/MyZubster-Ecosystem/myzubster.git)\n\ncd myzubster/services/ai-automation\n\nnpm install\n\ncp .env.example .env\n\nnpm start\n\n🎯 What's Next?\n\nI'm planning to add:\n\n```\nWeb Dashboard - Visual monitoring of all services\n\nSlack Integration - Alternative notification channel\n\nAuto-Reply - AI-powered responses to common issues\n\nSentiment Analysis - Understanding contributor sentiment\n\nMulti-Repo Support - Monitor multiple repositories\n```\n\n🙏 Conclusion\n\nBuilding this AI-powered automation system has transformed how I manage MyZubster. What started as a simple idea grew into a complete ecosystem that handles complex tasks automatically.\n\nThe best part? It's all open source and you can use it for your own projects too!\n\nBuilt with ❤️ by the MyZubster Team", "url": "https://wpnews.pro/news/building-an-ai-automation-system-for-myzubster", "canonical_source": "https://dev.to/danielioni/building-an-ai-automation-system-for-myzubster-4k2", "published_at": "2026-07-31 08:01:30+00:00", "updated_at": "2026-07-31 08:33:58.064371+00:00", "lang": "en", "topics": ["artificial-intelligence", "ai-agents", "developer-tools"], "entities": ["MyZubster", "Ollama", "Gemma", "Llama", "DeepSeek", "GitHub", "Telegram", "Node.js"], "alternates": {"html": "https://wpnews.pro/news/building-an-ai-automation-system-for-myzubster", "markdown": "https://wpnews.pro/news/building-an-ai-automation-system-for-myzubster.md", "text": "https://wpnews.pro/news/building-an-ai-automation-system-for-myzubster.txt", "jsonld": "https://wpnews.pro/news/building-an-ai-automation-system-for-myzubster.jsonld"}}