Running an Unlimited Hermes Agent on Claude
Hermes Agent is an autonomous AI agent framework with over 40 built-in tools, subagent delegation, cron-scheduled tasks, multi-channel messaging (Telegram, Discord, Slack, WhatsApp, Signal, Matrix), and a self-improving learning loop. Unlike interactive coding tools that only run when you are at the keyboard, Hermes operates 24/7 — processing messages, executing scheduled tasks, and improving its own skills continuously. This always-on nature makes it the most API-intensive tool in this guide, and the strongest case for flat-rate unlimited access.
Why Hermes Consumes API Tokens Around the Clock
Hermes is not a tool you open and close. Once deployed, it listens on multiple messaging channels simultaneously — Telegram, Discord, Slack, and others. Every incoming message triggers an inference call. Every scheduled cron task fires an inference call. Every learning loop iteration fires inference calls. The agent never sleeps, and neither does its API consumption.
Subagent delegation compounds this further. When Hermes encounters a complex request, it delegates subtasks to specialized subagents that each run their own Claude conversations. A single user message might spawn three subagents — one researching, one drafting, one verifying — each consuming tokens independently. Across dozens of daily interactions, the subagent overhead accumulates significantly.
The learning loop is the final multiplier. Hermes periodically reviews its own interactions, identifies patterns where it could improve, and updates its internal skills. This self-improvement process runs on a schedule (configurable, typically every few hours) and involves multiple inference calls to analyze past conversations and synthesize improvements. It runs whether or not any user is interacting with the agent.
Environment Configuration and API Setup
Hermes reads API configuration from ~/.hermes/.env. Set ANTHROPIC_BASE_URL to https://unlimited.aiprimetech.io (root host, no /v1) and ANTHROPIC_API_KEY to your AI Prime Tech Unlimited key. These environment variables follow the standard Anthropic SDK conventions — the SDK appends /v1/messages automatically.
Create the .env file if it does not exist: mkdir -p ~/.hermes && touch ~/.hermes/.env, then add the two variables. Hermes loads this file on startup and passes the configuration to its inference engine. If you change the values, restart the Hermes process for the new configuration to take effect.
For deployments where you want the .env file in a different location (Docker containers, systemd services, cloud deployments), set the HERMES_CONFIG_DIR environment variable to point to your configuration directory. Hermes will look for .env in whatever directory HERMES_CONFIG_DIR specifies instead of the default ~/.hermes/.
Custom Providers for Advanced Routing
Hermes supports a custom_providers configuration for advanced setups where you need different API endpoints for different models or tasks. In ~/.hermes/config.yaml, define provider entries with name, base_url, api_key, and supported_models. This lets you route Opus requests to one endpoint and Haiku requests to another, or have a fallback provider if the primary is unavailable.
For most unlimited users, a single provider pointing to the AI Prime Tech gateway handles everything. The custom_providers feature becomes relevant if you want to split traffic — perhaps routing low-priority learning loop calls to a different endpoint than high-priority user interactions, or using a local model for trivial tasks while reserving Claude for complex reasoning.
Provider selection can be automatic (Hermes picks based on task complexity) or explicit (you assign providers to specific capabilities in the config). On unlimited, the simplest approach is one provider for everything — the flat rate covers all models and there is no cost incentive to route traffic differently.
Subagent Delegation and Task Decomposition
Hermes uses the delegate_task tool to spawn subagents for complex work. When the main agent determines that a request requires multiple steps or specialized handling, it creates a subagent with a focused brief and waits for the result. Subagents can themselves delegate further, creating a tree of concurrent conversations.
Each subagent starts with a fresh context containing only its brief and relevant tools. It runs independently, accumulating its own conversation history as it works. When complete, it returns a summary to the parent agent. The parent's context grows to include the delegation instruction and the returned summary, but not the subagent's full internal conversation.
On unlimited, configure Hermes to delegate aggressively. In config.yaml, set delegation_threshold to a low value so the agent delegates more often rather than trying to handle everything in a single context. More delegation means more parallel conversations but also means each conversation stays focused and within its optimal context range. The flat rate covers all subagent work regardless of how many spawn.
Cron Scheduler for Automated Tasks
Hermes includes a built-in cron scheduler that fires tasks on configurable schedules. Common use cases include: daily report generation, periodic data collection, scheduled message delivery, routine system checks, and the learning loop itself. Each cron execution is a full inference call — Hermes reads the task description, executes it using available tools, and stores the result.
Configure cron tasks in ~/.hermes/cron.yaml with standard cron syntax. Each entry specifies a schedule, a task description (in natural language), and optionally which tools and subagents are available for that task. A busy Hermes deployment might have ten or more cron tasks firing throughout the day, each consuming API tokens.
On per-token billing, users minimize cron tasks to control costs — running reports daily instead of hourly, disabling the learning loop, limiting automated checks. On unlimited, schedule as frequently as useful. Run system health checks every fifteen minutes, generate reports hourly, update data feeds continuously. The flat rate covers all scheduled execution without per-invocation cost.
Multi-Channel Gateway Configuration
Hermes connects to messaging platforms through its gateway system. Each channel (Telegram bot, Discord bot, Slack app, WhatsApp Business, Signal, Matrix) maintains its own conversation state and can receive messages independently. Every incoming message on any channel triggers an inference call to generate a response.
Configure channels in ~/.hermes/channels.yaml with platform-specific credentials (bot tokens, webhook URLs, API keys). Hermes manages conversation threading per-channel and per-user, maintaining separate context for each active conversation. A Hermes instance connected to five channels with ten active users across them means fifty separate conversation contexts, each growing independently.
The multi-channel nature is what makes Hermes uniquely expensive on per-token billing. Each channel is effectively an open inference faucet — any user on any platform can send a message at any time and trigger a Claude call. On unlimited, this is exactly the intended use case. Connect all your channels, serve all your users, and let Hermes handle conversations 24/7 without cost scaling with message volume.
Learning Loop and Self-Improvement
Hermes's learning loop periodically reviews past interactions to identify improvement opportunities. It analyzes conversations where it performed poorly, extracts patterns, and synthesizes new skills that get injected into its system prompt for future interactions. This is a multi-step inference process: retrieve past conversations, analyze them, generate improvement suggestions, validate the suggestions, and update the skill store.
Each learning loop iteration can involve five or more API calls as Hermes reads its history, reasons about patterns, drafts skill updates, and self-validates. If configured to run every few hours, this adds a steady baseline of token consumption that happens regardless of user activity. Over a month, the learning loop alone might account for thousands of API calls.
On unlimited, enable the learning loop at full frequency. Set it to run every two to four hours for continuous improvement. The agent gets measurably better over time as it accumulates skills from its real interactions. This is one of Hermes's most powerful features, but it is prohibitively expensive on per-token billing for most users. Flat-rate access makes it practical to leave running indefinitely.
# ~/.hermes/.env
ANTHROPIC_BASE_URL="https://aiprimetech.io"
ANTHROPIC_API_KEY="<your AI Prime Tech Unlimited key>"
# ~/.hermes/config.yaml (optional advanced setup)
# model: claude-sonnet-4-5
# learning_loop:
# enabled: true
# interval: 4h
# model: claude-opus-4-6
# delegation:
# threshold: medium
# max_depth: 3
# subagent_model: claude-sonnet-4-5
# Start Hermes:
# hermes start --config ~/.hermes/config.yaml
Frequently asked questions
How much API usage does Hermes generate when idle?
Even with no user messages, Hermes consumes tokens from cron tasks and learning loop iterations. A typical setup with five cron tasks and a 4-hour learning loop fires 10-20 API calls daily when idle. With active users across multiple channels, consumption scales linearly with message volume. Unlimited covers all of it.
Can I run Hermes on multiple channels simultaneously?
Yes. Configure each channel in channels.yaml with platform-specific credentials. Hermes maintains separate conversation contexts per channel and per user. Every incoming message on any channel triggers a Claude inference call. On unlimited, connect all channels without per-message cost concerns.
Does the learning loop actually improve Hermes over time?
Yes. The learning loop analyzes past interactions, identifies patterns, and synthesizes skills injected into future system prompts. Over weeks of operation, Hermes handles recurring patterns more efficiently and accurately. It requires consistent API access to run — unlimited makes it practical to leave enabled permanently.
How do subagents affect my fair-use rate limits?
Each subagent makes its own API calls, counting against the same per-minute rate limits as the parent agent. If Hermes delegates aggressively during a burst of user messages, it may temporarily hit the rate cap. The gateway queues excess requests and processes them after the rate window resets.
Can I use different models for different Hermes capabilities?
Yes. Configure the main model for user interactions, a separate model for the learning loop (Opus recommended for deeper analysis), and a subagent model for delegated tasks. On unlimited, use the strongest model for each role — there is no cost difference between tiers.
Get an API key — no Anthropic account or waitlist required.
Get your API keyAI Prime Tech is an independent API gateway. It is not affiliated with, endorsed by, or a reseller of Anthropic. Claude and related model names are trademarks of their respective owners.