This repository contains all the configuration files, security policies, and simulation scripts used in the video tutorial on setting up Nous Hermes as an autonomous SRE agent on a Linux VPS.
config.yaml— Configured to run direct Gemini API (fast, low-cost token execution).SOUL.md— The custom system prompt shaping the agent's personality as Ron Weasley (Muggle IT Specialist).env.example— A template for your API keys and secure Telegram allowed-user restrictions.sudoers.d_template— The security policy granting passwordlesssystemctl restartaccess for your daemon.test_api.py— A diagnostic script to verify your Gemini API key and Telegram connection before running setup.inject_error.py— Script to simulate a live Django NameError typo (500 Error).restore_code.py— Script to instantly recover from the simulated error.
- Install Hermes Agent:
curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash -s -- --non-interactive --skip-setup - Download this Repository:
git clone https://github.com/kiacoder/hermes-vps-sre.git /tmp/hermes-sre
- Verify API & Telegram Connection (Recommended):
Create a
.envfile from theenv.exampletemplate, fill in your credentials, and run:python3 /tmp/hermes-sre/test_api.py
- Run the Setup Wizard:
The setup script will ask for your Gemini API Key, Telegram Bot Token, allowed User ID, project path, and systemd service name. It will then automatically configure all templates, set permission controls, deploy the sudoers security policy, and start the system service!
bash /tmp/hermes-sre/setup.sh
این مخزن شامل تمام فایلهای پیکربندی، سیاستهای امنیتی و اسکریپتهای شبیهسازی است که در ویدیوی آموزشی راهاندازی Nous Hermes به عنوان یک ایجنت خودمختار SRE (پشتیبان سرور) روی سرور مجازی لینوکس استفاده شده است.
config.yaml— پیکربندی برای اجرای مستقیم API جمینای (اجرای سریع و ارزان).SOUL.md— دستورالعمل سیستم (پرامپت) برای شکلدهی شخصیت ایجنت به عنوان رون ویزلی (متخصص آیتی مشنگها!).env.example— قالب کلیدهای API و ایدیهای مجاز تلگرام جهت امنیت ربات.sudoers.d_template— سیاست امنیتی برای اعطای دسترسی ریاستارت سرویس جنگو بدون نیاز به رمز عبور.test_api.py— اسکریپت عیبیابی و تست صحت کلیدهای جمینای و اتصال تلگرام قبل از اجرای نصب.inject_error.py— اسکریپت شبیهسازی خطای جنگو (خطای ۵۰۰).restore_code.py— اسکریپت بازیابی سریع کدها به حالت عادی.
- نصب ایجنت هرمس:
curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash -s -- --non-interactive --skip-setup - دانلود قالبها و ابزارهای پروژه:
git clone https://github.com/kiacoder/hermes-vps-sre.git /tmp/hermes-sre
- تست صحت کلیدها و ارتباط تلگرام (توصیه شده):
یک فایل
.envبر اساس فایلenv.exampleایجاد کرده و پس از پر کردن مشخصات، اسکریپت را اجرا کنید:python3 /tmp/hermes-sre/test_api.py
- اجرای جادوگر نصب خودکار:
اسکریپت نصب از شما کلید API جمینای، توکن ربات تلگرام، آیدی تلگرام، مسیر پروژه و نام سرویس سیستم را میپرسد و سپس تمام فایلها را تنظیم کرده، سطوح دسترسی را اعمال میکند و سرویس پسزمینه را راهاندازی میکند!
bash /tmp/hermes-sre/setup.sh
To trigger the live SRE repair demonstration during video recordings:
python3 /var/www/hamrahvision/inject_error.py
sudo systemctl restart hamrahvisionThen message your Telegram bot: "The homepage is down, please check the error and restart hamrahvision."
- English: The personality of the SRE bot (Ron Weasley) is hard-coded in
SOUL.mdwhich loads by default. If you change the Telegram bot character name (e.g. to Harry Potter), the agent's inner prompt and responses will not line up. You need to update both theSOUL.mdfile contents and the Telegram bot display name (via @BotFather) together to keep them consistent! - Persian: شخصیت ربات پشتیبان سرور (رون ویزلی) به صورت ثابت در فایل
SOUL.mdتعریف شده است. اگر نام کاراکتر ربات را در تلگرام به چیز دیگری (مثلاً هری پاتر) تغییر دهید، لحن صحبت و رفتار ایجنت با نام کاراکتر همخوانی نخواهد داشت. برای یکپارچگی، باید محتوای فایلSOUL.mdو نام نمایشی ربات در تلگرام (از طریق BotFather) را همزمان با هم تغییر دهید!
- YouTube (English): @HesabAgent
- Aparat (Persian): Kia_coder