원클릭으로
api-quota-guardian
Sistema completo de proteção do quota MiniMax — nunca mais health checks ou cron jobs consomem o quota Token Plan do Álvaro
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Sistema completo de proteção do quota MiniMax — nunca mais health checks ou cron jobs consomem o quota Token Plan do Álvaro
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Transforms the Hermes agent from a reactive question-answerer into a proactive autonomous executor. ARCHITECT takes any high-level goal, decomposes it into a dependency-aware task graph, executes each step with validation, self-corrects on failure, and delivers results — all without hand-holding. The missing execution layer for personal AI agents. Zero dependencies. Zero config. Works with any model. Pairs with apex-agent and agent-memoria for the complete autonomous agent stack.
Auto-reflective self-improvement skill — extracts learnings from corrections and success patterns, permanently encodes them into memory and skills. Philosophy: Correct once, never again.
Orchestrate multi-agent teams with defined roles, task lifecycles, handoff protocols, and review workflows. Use when: (1) Setting up a team of 2+ agents with different specializations, (2) Defining task routing and lifecycle (inbox → spec → build → review → done), (3) Creating handoff protocols between agents, (4) Establishing review and quality gates, (5) Managing async communication and artifact sharing between agents.
Integrate existing autonomous agents (like Hermes) into multi-agent orchestration platforms (AionUI, LangChain, etc.) via ACP over stdio.
MiniMax Agent Platform (agent.minimax.io) — MaxHermes, MaxClaw, Skills marketplace. Relacao com Hermes Agent (NousResearch) e OpenClaw.
Paperclip AI agent operations — creating agents with hierarchy, autonomous operation via hierarchical issues, and troubleshooting. Use when: creating agents, setting up org hierarchy, recovering from errors, or monitoring agent health.
| name | api-quota-guardian |
| description | Sistema completo de proteção do quota MiniMax — nunca mais health checks ou cron jobs consomem o quota Token Plan do Álvaro |
Cron jobs de health check estavam a consumir o quota MiniMax Token Plan (4,500 requests/5h) e causando "Rate limited — switching to fallback" no Telegram. A cada 5 minutos, um health check fazia uma chamada LLM real ao MiniMax, esgotando o quota antes do Álvaro poder conversar.
Ficheiro: ~/.hermes/scripts/quota_guard.py
Verifica o quota MiniMax ANTES de qualquer cron job que use LLM. Se o quota estiver > 70% usado OU se houver erros 429/401 recentes, o cron job é bloqueado.
Estratégia de detecção:
load_hermes_dotenv()/v1/token_plan/remains para quota realExit codes:
0 = pode executar (quota OK)1 = skip (quota em risco)Ficheiro: ~/.hermes/scripts/telegram_healer.py
Monitoriza o Telegram e faz auto-recuperação se detectar problemas.
Verificações:
~/.hermes/endpoint_health.json — estado actual do TelegramAcções de recuperação:
373a26da5c01): cada 15 min — regista quotafd58db18a3d3): cada 15 min — auto-heal Telegram| Job | ID | Schedule |
|---|---|---|
| Session Replay | 8e1d019adb06 | 00:30 diária |
| Learning Loop Daily | 5de2c83955ea | 04:00 diária |
| Learning Loop Weekly | 08664971b643 | Sunday 22h |
| Smart Memory Daily | b3dfaa0c3adc | 03:00 diária |
| Autonomous Suggestion Processor | 68ea14482e88 | cada 2h |
python3 ~/.hermes/scripts/quota_guard.py; echo $?
# 0 = pode executar, 1 = skip
python3 ~/.hermes/scripts/telegram_healer.py; echo $?
# 0 = OK, 1 = problema detectado
tail -5 ~/.hermes/logs/quota_guard.log
tail -5 ~/.hermes/logs/telegram_healer.log 2>/dev/null
O .env tem MINIMAX_API_KEY=*** (mascarado). Ler directamente não funciona. O método correcto é usar o Python do hermes-agent venv com load_hermes_dotenv():
HERMES_VENV_PY = os.path.expanduser("~/.hermes/hermes-agent/venv/bin/python")
script = """
import os, sys; sys.path.insert(0, '.')
from hermes_cli.env_loader import load_hermes_dotenv
from pathlib import Path
load_hermes_dotenv(hermes_home=Path.home() / '.hermes')
sys.stdout.write(os.environ.get('MINIMAX_API_KEY', ''))
"""
result = subprocess.run([HERMES_VENV_PY, "-c", script], capture_output=True, text=True,
cwd=os.path.expanduser("~/.hermes/hermes-agent"))
key = result.stdout.strip()
O que NÃO funciona: /proc/{pid}/environ, systemctl --user show hermes-gateway, grep directo ao .env.
Token Plan quota: https://api.minimax.io/v1/token_plan/remains (NÃO www.minimax.io — dá 403 Cloudflare).
proactive_monitor.py já é HTTP-only (não consome quota MiniMax). Server Resilience Manager corre a cada 30 min.
.env mas mascarada como ***. O hermes-agent usa load_hermes_dotenv() que retorna a key real.api.minimax.io (não www.minimax.io — 403 Cloudflare).