Run the Hermes Agent — a self-improving AI agent by Nous Research — directly on your Android phone via Termux.
شغّل وكيل هيرميس الذكي — الوكيل ذاتي التطوير من Nous Research — مباشرةً على هاتفك الأندرويد عبر Termux.
EN: This repository provides everything you need to install and run Hermes Agent on an Android phone using Termux. It includes a custom installer script, Android-specific patches, and step-by-step guides. No root required. No laptop needed.
AR: هذا المستودع يوفر كل ما تحتاجه لتثبيت وتشغيل وكيل هيرميس على هاتف أندرويد باستخدام Termux. يحتوي على سكريبت تثبيت مخصص، تصحيحات خاصة بأندرويد، وأدلة خطوة بخطوة. بدون روت. بدون لابتوب.
Hermes Agent is a self-improving AI agent that / وكيل هيرميس هو وكيل ذكاء اصطناعي ذاتي التطوير:
- Learns from experience and creates its own skills / يتعلم من التجارب وينشئ مهاراته الخاصة
- Works with any LLM (OpenAI, Anthropic, OpenRouter, NVIDIA NIM, local Ollama, etc.) / يعمل مع أي نموذج لغوي
- Connects to Telegram, Discord, Slack, WhatsApp, Signal / يتصل بتيليغرام، ديسكورد، سلاك، واتساب، سيغنال
- Runs scheduled automations (cron) / يشغّل أتمتة مجدولة
- Has long-term memory and cross-session recall / يمتلك ذاكرة طويلة المدى واستدعاء عبر الجلسات
EN: Make sure you have Termux installed from F-Droid (NOT Google Play — outdated), then run:
AR: تأكد من تثبيت Termux من F-Droid (وليس Google Play — النسخة قديمة)، ثم نفّذ:
curl -fsSL https://raw.githubusercontent.com/leecoin06-commits/hermes-agent-android/main/install-android.sh | bashEN: This single command will:
- ✅ Install all required system packages
- ✅ Clone Hermes Agent
- ✅ Create a Python virtual environment
- ✅ Apply Android-specific patches
- ✅ Compile and install all dependencies
- ✅ Make
hermesavailable on your Termux PATH
AR: هذا الأمر الواحد سيقوم بـ:
- ✅ تثبيت جميع الحزم النظامية المطلوبة
- ✅ استنساخ مستودع Hermes Agent
- ✅ إنشاء بيئة Python افتراضية
- ✅ تطبيق التصحيحات الخاصة بأندرويد
- ✅ تجميع وتثبيت جميع الاعتماديات
- ✅ جعل أمر
hermesمتاحاً على مسار Termux
| Requirement / المتطلب | Notes / ملاحظات |
|---|---|
| Termux | EN: Install from F-Droid (NOT Google Play — that version is outdated) AR: ثبته من F-Droid (وليس Google Play — النسخة قديمة) |
| Android 7+ / أندرويد 7+ | EN: Should work on Android 7 or newer AR: يعمل على أندرويد 7 أو أحدث |
| ~3 GB free storage / ~3 جيجابايت مساحة حرة | EN: For the cloned repo + venv + compiled packages AR: للمستودع + البيئة الافتراضية + الحزم المترجمة |
| Internet connection / اتصال إنترنت | EN: For cloning and package downloads AR: لاستنساخ وتحميل الحزم |
| 4 GB+ RAM | EN: Recommended for smooth compilation AR: مُوصى به لتجميع الحزم بسلاسة |
hermes setupEN: This interactive wizard configures your LLM provider, API keys, default model, and tool preferences.
AR: معالج تفاعلي يساعدك في ضبط مزود النموذج اللغوي، مفاتيح API، النموذج الافتراضي، وتفضيلات الأدوات.
hermes modelEN: Select from:
- Nous Portal — Free access to Hermes models, no API key needed
- OpenRouter — 200+ models, pay-as-you-go
- OpenAI / Anthropic — Your own API keys
- Local Ollama — Run models locally on your phone (requires Ollama installed separately)
AR: اختر من بين:
- Nous Portal — وصول مجاني لنماذج Hermes، بدون مفتاح API
- OpenRouter — 200+ نموذج، ادفع حسب الاستخدام
- OpenAI / Anthropic — بمفاتيح API الخاصة بك
- Ollama محلي — شغّل النماذج محلياً على هاتفك (يتطلب تثبيت Ollama منفصلاً)
hermesEN: Opens the full-featured terminal UI with multiline editing, slash-command autocomplete, streaming tool output, and conversation history.
AR: يفتح واجهة طرفية متكاملة مع تحرير متعدد الأسطر، إكمال تلقائي للأوامر، مخرجات أدوات متدفقة، وسجل المحادثات.
hermes gateway setupEN: Configure your Telegram bot token (get one from @BotFather), then run:
AR: اضبط توكن بوت تيليغرام (احصل عليه من @BotFather)، ثم شغّل:
hermes gateway runEN: If the one-liner doesn't work, follow these steps. Each step includes the exact command and Arabic explanation.
AR: إذا لم يعمل الأمر الواحد، اتبع هذه الخطوات. كل خطوة تتضمن الأمر المطلوب والشرح بالعربية.
pkg update
pkg install -y git python clang rust make pkg-config libffi openssl nodejs ripgrep ca-certificates curl
pkg install -y python-psutilEN: These are the build tools and libraries needed to compile Python packages from source. clang, rust, and make handle C/Rust compilation. python-psutil is the Termux system package (PyPI psutil rejects Android).
AR: هذه أدوات البناء والمكتبات اللازمة لتجميع حزم Python من المصدر. clang و rust و make تتولى تجميع C/Rust. python-psutil هي حزمة Termux النظامية (PyPI يرفض تثبيت psutil على أندرويد).
mkdir -p ~/.hermes
git clone --recurse-submodules https://github.com/NousResearch/hermes-agent.git ~/.hermes/hermes-agent
cd ~/.hermes/hermes-agentEN: Creates the Hermes home directory (~/.hermes) and clones the official Hermes Agent repository with all submodules. --recurse-submodules ensures the Atropos RL environment is included.
AR: ينشئ مجلد Hermes الرئيسي (~/.hermes) ويستنسخ مستودع Hermes Agent الرسمي مع جميع الوحدات الفرعية. --recurse-submodules يضمن تضمين بيئة Atropos RL.
python -m venv venv
source venv/bin/activate
pip install --upgrade pip setuptools wheel
pip install maturinEN: Creates an isolated Python environment so Hermes dependencies don't conflict with other Python projects. maturin is required to build Rust-based packages (pydantic-core, cryptography). Activate with source venv/bin/activate every time you open a new Termux session.
AR: ينشئ بيئة Python معزولة حتى لا تتعارض اعتماديات Hermes مع مشاريع Python أخرى. maturin مطلوب لبناء الحزم المبنية بـ Rust. فعّل البيئة بـ source venv/bin/activate في كل مرة تفتح جلسة Termux جديدة.
VENV_SITE=$(python -c "import site; print(site.getsitepackages()[0])")
echo "/data/data/com.termux/files/usr/lib/python3.13/site-packages" > "$VENV_SITE/system-site.pth"
python -c "import psutil; print('psutil OK:', psutil.__version__)"EN: Since PyPI's psutil rejects Android, we use Termux's python-psutil system package. This .pth file tells the venv to also search Termux system packages. The last command verifies psutil is accessible from the venv.
AR: بما أن psutil على PyPI يرفض أندرويد، نستخدم حزمة Termux النظامية python-psutil. ملف .pth يخبر البيئة الافتراضية بالبحث أيضاً في حزم Termux النظامية. الأمر الأخير يتأكد أن psutil متاح من البيئة الافتراضية.
sed -i 's/"psutil>=5.9.0,<8",/# "psutil>=5.9.0,<8", # Termux provides python-psutil/' pyproject.toml
grep 'psutil' pyproject.tomlEN: Comments out the psutil dependency in Hermes' pyproject.toml since we provide it via the Termux system package. The grep command verifies the change — you should see the line commented out.
AR: يعلّق سطر اعتمادية psutil في ملف pyproject.toml الخاص بـ Hermes بما أننا نوفرها عبر حزمة Termux النظامية. أمر grep يؤكد التعديل — يجب أن ترى السطر مُعلّقاً.
export ANDROID_API_LEVEL="$(getprop ro.build.version.sdk)"
pip install -e '.[termux-all]' -c constraints-termux.txtEN: ANDROID_API_LEVEL tells Rust/C build tools which Android SDK version to target (needed for jiter, cryptography, etc.). The .[termux-all] installs the broadest Termux-compatible profile. This step takes 10–30 minutes — you'll see packages being compiled one by one.
AR: ANDROID_API_LEVEL يخبر أدوات بناء Rust/C بإصدار Android SDK المستهدف (ضروري لـ jiter، cryptography، إلخ). .[termux-all] يثبّت أوسع بروفايل متوافق مع Termux. هذه الخطوة تستغرق 10–30 دقيقة — سترى الحزم تُجمّع واحدة تلو الأخرى.
EN: If termux-all fails, try:
pip install -e '.[termux]' -c constraints-termux.txtAR: إذا فشل termux-all، جرّب:
pip install -e '.[termux]' -c constraints-termux.txtln -sf ~/.hermes/hermes-agent/venv/bin/hermes $PREFIX/bin/hermesEN: Creates a symbolic link so the hermes command works from any directory in Termux. $PREFIX/bin is already on Termux's PATH.
AR: ينشئ رابطاً رمزياً ليعمل أمر hermes من أي مجلد في Termux. $PREFIX/bin موجود مسبقاً في مسار Termux.
hermes version
hermes doctorEN: hermes version shows the installed version. hermes doctor runs a full diagnostic — checks Python, packages, config files, tools, and API connectivity. Address any issues it reports before proceeding.
AR: hermes version يعرض الإصدار المثبت. hermes doctor يشغّل تشخيصاً كاملاً — يفحص Python والحزم والإعدادات والأدوات والاتصال. عالج أي مشاكل قبل المتابعة.
hermes-agent-android/
├── README.md ← EN/AR guide (you are here / أنت هنا)
├── install-android.sh ← One-command installer / سكريبت التثبيت
├── patches/
│ ├── README.md ← Patch documentation / توثيق التصحيحات
│ └── psutil-android.patch ← psutil dependency patch / تصحيح اعتمادية psutil
├── docs/
│ ├── troubleshooting.md ← Common issues and fixes / المشاكل الشائعة
│ └── telegram-setup.md ← Telegram bot configuration / إعداد البوت
└── assets/
└── banner.png ← Repository banner / شعار المستودع
CANNOT LINK EXECUTABLE "ffmpeg": cannot locate symbol "x265_api_get_215"
EN — Impact: TTS/voice message conversion may not work. The core agent, CLI, and Telegram messaging all work fine.
AR — التأثير: قد لا تعمل ميزة تحويل الصوت. الوكيل الأساسي و CLI ومراسلة تيليغرام تعمل بشكل طبيعي.
EN — Fix:
pkg upgrade
dpkg --remove --force-depends ffmpeg
pkg install ffmpegAR — الإصلاح:
pkg upgrade
dpkg --remove --force-depends ffmpeg
pkg install ffmpegEN: The first install takes 10–30 minutes because heavy packages compile from source. If it seems stuck, check with ps -ef | grep rustc — if Rust or Cargo processes are running, it's working.
AR: التثبيت الأول يستغرق 10–30 دقيقة لأن حزماً ثقيلة تُجمّع من المصدر. إذا بدا متوقفاً، تحقق بـ ps -ef | grep rustc — إذا كانت عمليات Rust أو Cargo تعمل، فالتجميع مستمر.
EN: Android kills background processes to save battery. Solutions:
termux-wake-lock # Keep Termux alive
termux-boot # Auto-start on bootDisable battery optimization for Termux in Android Settings → Apps → Termux → Battery → Unrestricted.
AR: أندرويد يقتل العمليات الخلفية لتوفير البطارية. الحلول:
termux-wake-lock # إبقاء Termux حياً
termux-boot # تشغيل تلقائي عند الإقلاععطّل تحسين البطارية لـ Termux في إعدادات أندرويد → التطبيقات → Termux → البطارية → غير مقيد.
EN: The browser automation tool (Playwright) is skipped in the Android installer. Browser tooling on Android is experimental.
AR: أداة التشغيل الآلي للمتصفح (Playwright) لا تُثبّت في مسار أندرويد. أدوات المتصفح على أندرويد تجريبية حالياً.
EN: Local faster-whisper is unavailable (ctranslate2 has no Android wheels). Use cloud instead: Groq Whisper (GROQ_API_KEY) or OpenAI Whisper (VOICE_TOOLS_OPENAI_KEY).
AR: التحويل المحلي faster-whisper غير متاح (ctranslate2 لا تنشر حزماً لأندرويد). استخدم السحابة: Groq Whisper (GROQ_API_KEY) أو OpenAI Whisper (VOICE_TOOLS_OPENAI_KEY).
EN: You can run both Hermes Agent and OpenClaw on the same phone. The key is using different Telegram bot tokens:
| Agent / الوكيل | Bot / البوت | How / الطريقة |
|---|---|---|
| Hermes Agent | Bot #1 / بوت 1 | hermes gateway setup → get token from @BotFather |
| OpenClaw | Bot #2 / بوت 2 | Configure in OpenClaw → use a different token |
AR: يمكنك تشغيل كل من Hermes Agent و OpenClaw على نفس الهاتف. المفتاح هو استخدام توكنات بوت تيليغرام مختلفة. مع توكنات منفصلة، يعمل كلا الوكيلين معاً دون تعارض.
| Resource / المصدر | Link / الرابط |
|---|---|
| Hermes Agent Docs / توثيق هيرميس | https://hermes-agent.nousresearch.com/docs/ |
| Hermes Agent GitHub / مستودع هيرميس | https://github.com/NousResearch/hermes-agent |
| Nous Research | https://nousresearch.com |
| Termux Official / موقع Termux | https://termux.dev/ |
| Termux on F-Droid | https://f-droid.org/packages/com.termux/ |
EN: Found an issue on Android? Have a fix for a device-specific problem? Open an issue or submit a PR!
AR: وجدت مشكلة على أندرويد؟ لديك حل لمشكلة خاصة بجهاز معين؟ افتح issue أو أرسل PR!
- Fork the repo / اعمل fork للمستودع
- Create a feature branch / أنشئ فرعاً للميزة
- Submit a PR with a clear description / أرسل PR مع وصف واضح
EN: Apache 2.0 — same license as Hermes Agent itself (see license).
AR: Apache 2.0 — نفس رخصة Hermes Agent نفسه (راجع الرخصة).
Made with ☕ by the Android agent community — because AI agents shouldn't need a laptop. صُنع بـ ☕ من مجتمع وكلاء أندرويد — لأن وكلاء الذكاء الاصطناعي ينبغي ألا تحتاج لابتوب.