Adding a Platform Adapter
Adding a Platform Adapter This guide covers adding a new messaging platform to the Hermes gateway. A platform adapter connects Hermes to an external messaging s
This guide covers adding a new messaging platform to the Hermes gateway. A platform adapter connects Hermes to an external messaging service (Telegram, Discord, WeCom, etc.) so users can interact with the agent through that service. …
What this page covers
- Architecture Overview
- Plugin Path (Recommended)
- plugin.yaml
- adapter.py
- Configuration
- What the Plugin System Handles Automatically
- Env-Driven Auto-Configuration
- YAML→env Config Bridge
- Cron Delivery
- Out-of-process cron delivery
- Surfacing Env Vars in hermes config
- Platform-Specific Slow-LLM UX
- Pattern: subclass keeptyping to layer mid-flight UX
- Pattern: subclass send to route through a cache instead of sending immediately
- When this pattern is appropriate
- Reference Implementation
- Reference Implementations (Plugin Path)
- Step-by-Step Checklist (Built-in Path)
- 1. Platform Enum
- 2. Adapter File
- 3. Gateway Config (gateway/config.py)
- 4. Gateway Runner (gateway/run.py)
- 5. Cross-Platform Delivery
- 6. CLI Integration
- 7. Tools
- 8. Toolsets
- 9. Optional: Platform Hints
- 10. Tests
- 11. Documentation
- Parity Audit
- Common Patterns
- Long-Poll Adapters
- Callback/Webhook Adapters
- Token Locks
- Reference Implementations
Section outline mirrored from the official Hermes Agent documentation. Follow any heading to read the complete text on the source site.
More in Developer Guide
Contributing
Thank you for contributing to Hermes Agent! This guide covers setting up your dev environment, understanding the codebase, and getting your PR merged. Contribut
Architecture
This page is the top level map of Hermes Agent internals. Use it to orient yourself in the codebase, then dive into subsystem specific docs for implementation d
Agent Loop Internals
The core orchestration engine is 's class — a large file that handles everything from prompt assembly to tool dispatch to provider failover. Core Responsibiliti
Prompt Assembly
Hermes deliberately separates: cached system prompt state ephemeral API call time additions This is one of the most important design choices in the project beca
Context Compression and Caching
Context Compression and Caching Hermes Agent uses a dual compression system and Anthropic prompt caching to manage context window usage efficiently across long
Gateway Internals
The messaging gateway is the long running process that connects Hermes to 20+ external messaging platforms through a unified architecture. Key Files File Purpos