cd /news/artificial-intelligence/building-an-ai-automation-system-for… Β· home β€Ί topics β€Ί artificial-intelligence β€Ί article
[ARTICLE Β· art-81556] src=dev.to β†— pub= topic=artificial-intelligence verified=true sentiment=↑ positive

Building an AI Automation System for MyZubster

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.

read6 min views1 publishedJul 31, 2026

πŸš€ Building an AI Automation System for MyZubster

Introduction

MyZubster 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.

πŸ“‹ The Problem

Managing an open-source project like MyZubster is complex:

Too many issues requiring manual triage

Bounties need to be created and managed manually

Slow communication with contributors

Manual monitoring of GitHub activity

🎯 The Solution

I built a modular system that:

Monitors GitHub - Automatically detects new issues and PRs

Analyzes with AI - Uses local models (Gemma, Llama, DeepSeek)

Creates bounties - Automatically for labeled issues

Sends notifications - Real-time alerts on Telegram

Orchestrates everything - With automatic fallback between AI models

πŸ—οΈ Architecture

text

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”

β”‚ MyZubster AI Automation β”‚

β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€

β”‚ β”‚

β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚

β”‚ β”‚ Telegram β”‚ β”‚ GitHub β”‚ β”‚ AI Models β”‚ β”‚

β”‚ β”‚ Bot Handler β”‚ β”‚ Monitor β”‚ β”‚ β”‚ β”‚

β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚

β”‚ β”‚ β”‚ β”‚ β”‚

β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚

β”‚ β”‚ β”‚

β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β” β”‚

β”‚ β”‚ Automation β”‚ β”‚

β”‚ β”‚ Orchestrator β”‚ β”‚

β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚

β”‚ β”‚ β”‚

β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚

β”‚ β”‚ β”‚ β”‚ β”‚

β”‚ β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β” β”‚

β”‚ β”‚ Database β”‚ β”‚ Backend β”‚ β”‚ Frontend β”‚ β”‚

β”‚ β”‚ (MongoDB) β”‚ β”‚ (Node.js) β”‚ β”‚ (React) β”‚ β”‚

β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚

β”‚ β”‚

β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ› οΈ Technology Stack

Core Technologies

Node.js - Runtime environment

Express - API server

MongoDB - Database with Mongoose ODM

React - Frontend with Leaflet maps

AI Stack

Ollama - Local AI model runner

Gemma 2B - Google's lightweight AI model (default)

Llama 3.2 - Meta's powerful model (fallback)

DeepSeek R1 - Reasoning model (fallback)

Automation Stack

node-telegram-bot-api - Telegram integration

Octokit - GitHub API client

node-cron - Scheduled tasks

systemd - Service management

Winston - Logging

🧠 AI Models Setup

The AI models run locally using Ollama. Here's how I set them up:

Installing Ollama

bash

curl -fsSL https://ollama.com/install.sh | sh

Pulling the Models

bash

ollama pull gemma:2b

ollama pull llama3.2:3b

ollama pull deepseek-r1:1.5b

Testing the Models

bash

ollama run gemma:2b "What is MyZubster?"

πŸ€– The Telegram Bot

The bot provides interactive commands for the community:

Available Commands

Command Description

/start Welcome message and guide

/status System and services status

/github Recent GitHub activity

/bounties List of active bounties

/analyze AI analysis of an issue

/help Show all available commands

Bot Configuration

javascript

class TelegramBotHandler {

async start() {

this.bot = new TelegramBot(this.token, { polling: true });

    // Register command handlers
    this.bot.onText(/^\/start/, this.handleStart.bind(this));
    this.bot.onText(/^\/status/, this.handleStatus.bind(this));
    this.bot.onText(/^\/bounties/, this.handleBounties.bind(this));
    this.bot.onText(/^\/github/, this.handleGitHub.bind(this));
    this.bot.onText(/^\/analyze/, this.handleAnalyze.bind(this));

    this.running = true;
    this.logger.info('Telegram bot is ready');
}

}

πŸ™ GitHub Monitor

The GitHub Monitor watches repositories and emits events:

javascript

const { Octokit } = require('@octokit/rest');

const EventEmitter = require('events');

class GitHubMonitor extends EventEmitter {

constructor(token, logger) {

super();

this.token = token;

this.logger = logger;

this.issues = {};

this.repo = process.env.GITHUB_REPO;

}

async start() {
    this.octokit = new Octokit({
        auth: this.token,
        userAgent: 'MyZubster-AI-Automation'
    });

    this.running = true;
    await this.checkNewIssues();
    this.startPeriodicCheck();
}

startPeriodicCheck() {
    setInterval(() => {
        this.checkNewIssues().catch(error => {
            this.logger.error('Periodic check failed:', error);
        });
    }, 300000); // 5 minutes
}

}

🧠 AI Orchestrator

The AI Orchestrator is the brain of the system. It uses multiple models with fallback strategies:

javascript

class AIOrchestrator {

constructor(logger) {

this.logger = logger;

this.models = {

gemma: {

url: 'http://localhost:11434/api',

model: 'gemma:2b'

},

llama: {

url: 'http://localhost:11434/api',

model: 'llama3.2:3b'

},

deepseek: {

url: process.env.DEEPSEEK_API_URL,

key: process.env.DEEPSEEK_API_KEY

}

};

}

async analyzeIssue(issue) {
    const prompt = `

Analyze this GitHub issue:

Title: ${issue.title}

Description: ${issue.body}

Labels: ${issue.labels.map(l => l.name).join(', ')}

Provide:

Suggested Bounty Amount

`;

// Try models in order with fallback
const models = [
    { name: 'gemma', config: this.models.gemma, method: 'ollama' },
    { name: 'llama', config: this.models.llama, method: 'ollama' },
    { name: 'deepseek', config: this.models.deepseek, method: 'api' }
];

for (const model of models) {
    try {
        return await this.analyzeWithModel(model, prompt);
    } catch (error) {
        this.logger.warn(`${model.name} failed, trying next...`);
    }
}

return this.getDefaultAnalysis(issue);

}

}

πŸ”§ Systemd Service Management

For production deployment, I created a systemd service:

ini

[Unit]

Description=MyZubster AI Automation Service

After=network.target mongod.service

[Service]

Type=simple

User=root

WorkingDirectory=/root/myzubster/myzubster-merged/services/ai-automation

ExecStart=/usr/bin/node /root/myzubster/myzubster-merged/services/ai-automation/index.js

Restart=always

RestartSec=10

Environment=NODE_ENV=production

Environment=PORT=5678

[Install]

WantedBy=multi-user.target

πŸ“Š Real Example Analysis

Here's a real analysis from the system on a Monero payment issue:

text

πŸ“Š AI Analysis Results:

1. Summary:

The issue proposes adding Monero (XMR) payment support for bounties.

2. Complexity:

High. The integration of a new cryptocurrency like XMR involves technical

complexities related to API integration, smart contract development, and

potential compatibility issues with existing systems.

3. Priority:

High. Integrating XMR payments would attract crypto-focused users.

4. Technical Approach:

β€’ Develop an API integration with the Monero blockchain

β€’ Create smart contracts for managing bounties

β€’ Integrate with the bounty platform

β€’ Implement user interfaces

5. Estimated Effort:

3-4 weeks (120-160 hours)

6. Suggested Bounty:

0.01 XMR per bounty (~$2-5 USD)

πŸš€ Results

After deploying the system, I saw immediate benefits:

Metric Before After

Issue response time 24-48 hours < 5 minutes

Bounty creation Manual (2-3 days) Automatic (5 minutes)

Contributor notifications Manual emails Automatic Telegram

Time spent on triage 5+ hours/week 0 hours (automated)

πŸ“ Project Structure

text

services/ai-automation/

β”œβ”€β”€ src/

β”‚ β”œβ”€β”€ telegram/

β”‚ β”‚ └── bot.js # Telegram bot handler

β”‚ β”œβ”€β”€ github/

β”‚ β”‚ └── monitor.js # GitHub monitor

β”‚ β”œβ”€β”€ ai/

β”‚ β”‚ └── orchestrator.js # AI orchestrator

β”‚ └── orchestrator/

β”‚ └── index.js # Main orchestrator

β”œβ”€β”€ logs/

β”œβ”€β”€ scripts/

β”œβ”€β”€ .env.example

β”œβ”€β”€ index.js

β”œβ”€β”€ package.json

└── README.md

πŸ’‘ Key Lessons Learned

Local AI is Powerful - Running models locally saves API costs and keeps data private

Fallback Strategies Matter - Multiple models ensure reliability

Event-Driven Architecture - Makes the system extensible and maintainable

Mock Mode - Enables testing without external dependencies

Systemd - Essential for production deployment

πŸ”— Links

Repository: https://github.com/MyZubster-Ecosystem/myzubster

Telegram Bot: @myzubster_bot

Telegram Channel: @myzubster

AI Service: services/ai-automation

πŸ“ Try It Yourself

bash

git clone https://github.com/MyZubster-Ecosystem/myzubster.git

cd myzubster/services/ai-automation

npm install

cp .env.example .env

npm start

🎯 What's Next?

I'm planning to add:

Web Dashboard - Visual monitoring of all services

Slack Integration - Alternative notification channel

Auto-Reply - AI-powered responses to common issues

Sentiment Analysis - Understanding contributor sentiment

Multi-Repo Support - Monitor multiple repositories

πŸ™ Conclusion

Building 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.

The best part? It's all open source and you can use it for your own projects too!

Built with ❀️ by the MyZubster Team

── more in #artificial-intelligence 4 stories Β· sorted by recency
── more on @myzubster 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain β€” perfect for shipping the agent you just read about.

$git push zahid main
β†’ Live at https://your-agent.zahid.host βœ“
Get free account β†’ Pricing
from €0/mo Β· no card required
LIVE [news/building-an-ai-autom…] indexed:0 read:6min 2026-07-31 Β· β€”