This page defines codebase-specific terminology, architectural concepts, and domain jargon used throughout the Hermes Agent project. It serves as a technical reference for onboarding engineers to map natural language concepts to specific code entities and understand their detailed implementation and data flow.
The core orchestration class that manages the conversation loop, tool execution, and agent state. It acts as the "brain" of the system, coordinating interactions between the LLM client, tool registry, session management, and execution environments.
AIAgent class, defined in run_agent.py17-21run_conversation() initiates a conversation; interacts with handle_function_call to dispatch tools.get_tool_definitions to resolve available tools and dispatches calls during conversation flow.Sources: run_agent.py17-21 gateway/run.py78-79
A named logical grouping of tools that provide specific capabilities (e.g., web, terminal, file). Toolsets allow selective enabling/disabling of features per platform or agent context for granularity and security.
model_tools.py, imported and used in run_agent.py (run_agent.py136-141)web toolset contains search and extraction tools, terminal includes command execution tools.config.yaml) and can be restricted at runtime such as disabling certain toolsets during cron or in interactive modes. Config-driven disabling logic is present in cron jobs cron/scheduler.py156-177Sources: run_agent.py136-141 cron/scheduler.py156-177
A concurrency-safe counter managing the allowed number of reasoning and tool invocation iterations per request. This prevents infinite loops and bounds resource expenditure.
IterationBudget class imported from agent/iteration_budget.py and used in run_agent.py run_agent.py116delegate_task tool), it receives a partitioned portion of the parent's iteration budget to honor overall limits.AIAgent.Sources: run_agent.py116
A long-running multi-platform messaging bridge that integrates Hermes with external chat platforms like Telegram, Discord, Slack, WhatsApp, and others.
GatewayRunner class defined in gateway/run.py6-14BasePlatformAdapter interface from gateway/platforms/base.py, with concrete classes for each messaging platform.AIAgent), schedules cron jobs, caches sessions and media, maintains session expiry, and handles security like pairing and allowlists._AGENT_CACHE_MAX_SIZE=128) of live AIAgent instances keyed by session for performance; evicts based on idle TTL gateway/run.py78-79/reset, /model) and routes them accordingly gateway/run.py340-341Sources: gateway/run.py6-14 gateway/run.py78-79 gateway/run.py340-341
This diagram shows how high-level concepts map to crucial code entities, helping engineers navigate the core relationships.
Sources:
run_agent.py17-21
run_agent.py137
run_agent.py139
run_agent.py142
gateway/run.py6-14
hermes_cli/main.py1-44
cron/scheduler.py1-10
hermes_state.py1-23
tools/terminal_tool.py
| Term | Definition | Code Pointer |
|---|---|---|
| ACP | Agent Client Protocol - protocol for editor integration with Hermes (VS Code, Zed IDE). | hermes_cli/main.py40 |
| Auxiliary Client | Secondary LLM client router for side tasks like vision analysis, compression, web extraction with fallback chains. | agent/auxiliary_client.py1-41 |
| CalVer | Calendar Versioning scheme (e.g., 2026.3.15) used for Hermes releases. | scripts/release.py |
| Context Compression | Automatic conversation history summarization done by ContextCompressor to fit token limits, used dynamically. | agent/context_compressor.py1-122 |
| Credential Pool | Mechanism managing multiple API keys/providers for rotation and failover. | agent/credential_pool.py (refer in agent/auxiliary_client.py107) |
| FTS5 | SQLite Full-Text Search module used for efficient session message text search. | hermes_state.py10-15 |
| Honcho | AI-native memory integration plugin providing dialectic queries and prefetch pipelining for session memory. | hermes_cli/main.py21-36 |
| Kanban | SQLite-based task board supporting multi-agent, multi-profile agile task coordination. | hermes_cli/kanban_db.py |
| SOUL.md | Markdown file representing the agent's core identity and personality for system prompt injection. | run_agent.py169 |
| Slash Command | Commands starting with / within CLI and messaging platforms, e.g., /reset, /model. | gateway/run.py340-341 |
| TUI | Terminal User Interface - React Ink-based frontend rendering CLI in full-screen mode with JSON-RPC gateway. | cli.py60-70 |
| Trajectory | Detailed logs of agent reasoning, tool calls, and results for diagnostics and training purposes. | agent/trajectory.py |
| WAL Mode | SQLite Write-Ahead Logging mode for concurrent reads/writes in session storage. | hermes_state.py10-11 |
| Tool | Code encapsulating an external function callable by the agent (e.g. shell command executor, web search). | model_tools.py (tool registry) |
| Iteration Budget | Thread-safe counter limiting number of LLM reasoning or tool calls per session/conversation. | agent/iteration_budget.py |
Sources:
hermes_cli/main.py40
agent/auxiliary_client.py1-41
scripts/release.py
agent/context_compressor.py1-122
agent/auxiliary_client.py107
hermes_state.py10-15
hermes_cli/main.py21-36
hermes_cli/kanban_db.py
run_agent.py169
gateway/run.py340-341
cli.py60-70
agent/trajectory.py
hermes_state.py10-11
model_tools.py
agent/iteration_budget.py
Illustrates how a platform user’s message flows through the gateway, into the agent, and back out after tool invocation and reasoning.
Sources:
run_agent.py17-21
run_agent.py166
run_agent.py139
gateway/run.py1-14
gateway/platforms/base.py
Hermes supports multiple backend environments for running commands securely and portably.
| Backend | Description | Code Pointer |
|---|---|---|
| local | Executes commands directly on the host machine. | run_agent.py68-90 |
| docker | Runs commands isolated inside Docker containers. | run_agent.py68-90 |
| ssh | Executes commands remotely over SSH connections. | run_agent.py68-90 |
| modal | Serverless sandbox execution on Modal cloud. | run_agent.py68-90 |
| daytona | Integration with Daytona cloud development backend. | run_agent.py68-90 |
Note: The backend selection depends on user configuration and runtime environment variables, resolved early in AIAgent or tool calls.
Sources:
run_agent.py68-90
hermes_cli/config.py1-13
Hermes resolves its configuration settings using the following precedence:
hermes chat --model ...).config.yaml): User-editable YAML stored in ~/.hermes/config.yaml. Stores model, provider, gateway, toolset, and feature settings..env files using load_hermes_dotenv, sourced automatically at startup in run_agent.py.HERMES_HOME directory, allowing entirely separate config and session stores per profile.hermes_cli.setup for initial profile and credential provisioning.Sources:
hermes_cli/config.py1-157
run_agent.py126-130
hermes_constants.py
cli.py129-165
hermes_cli/setup.py
This glossary page reflects the technical foundations and key system components for Hermes Agent, enabling onboarded engineers to navigate source code effectively and understand core domain concepts that the code encapsulates.
Refresh this wiki
This wiki was recently refreshed. Please wait 4 days to refresh again.