How andyweidong/hermes-agent works
Hermes Agent is a self-improving conversational agent exposed through CLI/TUI, messaging gateway, desktop/web surfaces, and the Agent Client Protocol. The principal workflow accepts a user turn, runs the agent’s conversation loop with model and tool capabilities, and returns a response through the initiating surface. Distinct product branches include memory and skill learning, scheduled automation, delegation, and research trajectory generation. The graph combines README-documented capabilities with relationships named in the SOURCE INDEX; unsampled implementation details are not assumed.
Main entry points: conversation_loop.py Conversation loop · server.py ACP server · run.py Messaging gateway · tool_executor.py Tool execution
Components 21
Agent runtime
- Conversation loop
agent/conversation_loop.py - Context compression
agent/context_compressor.py - Conversation compression
agent/conversation_compression.py - Response display
agent/display.py - Model selection
hermes_cli/model_switch.py - Model providers
agent/provider_registry.py
Agent capabilities
- Tool execution
agent/tool_executor.py - Terminal backends
tools/terminal_tool.py - Scheduled automation
cron/scheduler_worker_env.py - Subagents
tools/async_delegation.py
Gateway and sessions
- Messaging gateway
gateway/run.py - API routes
gateway/platforms/api_server.py - TUI gateway
tui_gateway/server.py - ACP server
acp_adapter/server.py - Session handling
gateway/session.py
Learning and research
- Memory and recall
agent/memory_manager.py - Skill learning
agent/skill_commands.py - Trajectories
agent/trajectory.py
Other components
- User
Connections 20
- User → Messaging gateway: sends messages
README.md - User → CLI: starts conversation
README.md - User → TUI: chats through
README.md - User → ACP server: connects via ACP
- Messaging gateway → Conversation loop: runs turns
- API routes → Conversation loop: serves agent turns
- TUI gateway → Conversation loop: runs conversation
tui_gateway/server.py - ACP server → Model selection: builds model picker
acp_adapter/server.py - ACP server → Conversation loop: runs agent
acp_adapter/server.py - Conversation loop → Model providers: requests model output
README.md - Conversation loop → Tool execution: invokes tools
README.md - Conversation loop → Context compression: compresses context
- Conversation compression → Context compression: uses compressor
- Conversation loop → Response display: returns response
- Tool execution → Terminal backends: runs terminal tools
README.md - Conversation loop → Memory and recall: recalls knowledge
README.md - Conversation loop → Skill learning: creates and improves
README.md - Scheduled automation → Messaging gateway: delivers scheduled output
README.md - Conversation loop → Subagents: spawns subagents
README.md - Conversation loop → Trajectories: generates trajectories
README.md