Skip to content

tcflying/hermes-agent-windows-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

24 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Hermes-Agent-Windows-Rust πŸ‡¨πŸ‡³ δΈ­ζ–‡

A high-performance AI agent desktop application for Windows, built with Rust + React. Streaming tool calls, multi-provider LLM support, 19 built-in tools, and a 9-page Web UI.

Based on NousResearch/hermes-agent (MIT License). This is a ground-up Rust rewrite targeting Windows desktop with native WebView2 GUI.

UI & feature design inspired by hermes-hud and hermes-workspace.


πŸ‡¨πŸ‡³ δΈ­ζ–‡θ―΄ζ˜Ž


Features

Core Agent

  • Streaming Tool Calls β€” Real-time streaming responses with live tool execution. Resolved a critical parsing bug in the streaming tool_call accumulator (commit d92ca75).
  • Interruptible β€” Stop any in-progress streaming request instantly.
  • Multi-turn Sessions β€” Persistent conversation history with SQLite + FTS5 full-text search.
  • Tool Auto-Skill Generation β€” After complex tasks, the agent autonomously creates reusable skills.

Multi-Provider LLM Support

  • MiniMax (default)
  • OpenAI (GPT-4 series)
  • Anthropic (Claude series)
  • models.dev registry with context-length awareness
  • Per-conversation model override (/model command)

Built-in Tools (19 total)

Tool Description
terminal Execute PowerShell/cmd commands
file_read / file_write / file_edit Full file operations
list_dir Directory listing with tree view
skill_create / skill_list / skill_view / skill_delete Skill lifecycle management
memory_save / memory_search Persistent memory store
browser_navigate / web_search Web automation
execute_code Sandboxed code execution
interrupt Streaming interrupt
delegate Subagent delegation

Frontend UI (9 pages)

  • Chat β€” Main conversation interface with tool call cards, streaming markdown, session switcher
  • Files β€” Monaco editor with file tree, save/load workflow
  • Terminal β€” xterm.js terminal emulator embedded in browser
  • Memory β€” Persistent memory editor with section-based storage
  • Skills β€” Browse, create, and manage auto-generated skills
  • Dashboard β€” Real-time HUD with stats (sessions, skills, messages)
  • Inspector β€” Per-session message history and token usage
  • Settings β€” Theme switcher (default/ares/slate/mono), provider API keys
  • HUD β€” Agent telemetry overlay (total sessions, skills, messages)

Desktop Ready

  • Tauri 2.x β€” Native Windows WebView2 packaging
  • React + Vite β€” Fast HMR development, TypeScript throughout
  • Playwright β€” E2E test suite included in devDependencies

Quick Start

Option A β€” Download Pre-built (Recommended)

  1. Download the latest release: v0.1.0 β†’ release-package.zip
  2. Extract to any folder
  3. Double-click start.bat
  4. Open http://localhost:1420 β†’ Settings β†’ enter your API key β†’ Save
  5. Start chatting!

Option B β€” Build from Source

Prerequisites:

  • Rust 1.93+
  • Node.js 18+
  • Windows 10/11

Build:

# Clone the repo
git clone https://github.com/tcflying/hermes-agent-windows-rust.git
cd hermes-agent-windows-rust

# Build Rust backend
cargo build --release

# Install frontend dependencies
cd crates/ui && npm install && cd ../..

Run:

start.bat    # Starts backend (port 3848) + frontend (port 1420)
stop.bat     # Stops all services

Architecture

hermes-rs/
β”œβ”€β”€ crates/
β”‚   β”œβ”€β”€ agent/          # Core agent loop, tool execution, memory, prompt building
β”‚   β”‚   └── src/
β”‚   β”‚       β”œβ”€β”€ chat.rs          # Main streaming chat handler (FIXED: tool_call parser)
β”‚   β”‚       β”œβ”€β”€ tools.json        # 19 tool definitions
β”‚   β”‚       β”œβ”€β”€ memory.rs         # MemoryStore, MemoryManager, MemorySnapshot
β”‚   β”‚       β”œβ”€β”€ memory_nudge.rs   # Periodic nudge injector
β”‚   β”‚       β”œβ”€β”€ skill_commands.rs # /skill slash command handler
β”‚   β”‚       β”œβ”€β”€ iteration.rs      # IterationBudget (max 30 tool calls/turn)
β”‚   β”‚       β”œβ”€β”€ interrupt.rs      # InterruptFlag for streaming stop
β”‚   β”‚       └── auxiliary_client.rs # Vision + summarization clients
β”‚   β”œβ”€β”€ cli/            # HermesCLI β€” slash commands, skin engine, setup wizard
β”‚   β”œβ”€β”€ config/         # YAML config loader, multi-provider schema
β”‚   β”œβ”€β”€ gateway/        # Axum HTTP server, SSE streaming, session routing
β”‚   β”‚   └── platforms/ # Telegram, Discord, Slack, WhatsApp, Signal adapters
β”‚   β”œβ”€β”€ session/        # SQLite + FTS5 session DB, trajectory saving
β”‚   β”œβ”€β”€ tool-registry/  # Central tool registry (stub, pending integration)
β”‚   β”œβ”€β”€ ui/             # React + TypeScript frontend
β”‚   β”‚   └── src/
β”‚   β”‚       β”œβ”€β”€ pages/  # 9 page components (Chat, Files, Terminal, Memory...)
β”‚   β”‚       β”œβ”€β”€ components/ # WorkspaceLayout, FileTree, ToolCallCard...
β”‚   β”‚       └── App.tsx # React Router v7 routing
β”‚   └── utils/          # Shared utilities
β”œβ”€β”€ start.bat           # One-click dev startup
β”œβ”€β”€ stop.bat            # Stop all services
└── Cargo.toml          # Workspace root

Tech Stack

Layer Technology
GUI Shell Tauri 2.x (WebView2)
Frontend React 18, TypeScript, Vite 6
Backend Rust, Tokio, Axum 0.8
Database SQLite + FTS5 (rusqlite, bundled)
Terminal xterm.js
Code Editor Monaco Editor
Markdown react-markdown + shiki
HTTP reqwest (streaming), tower-http
CLI clap (derive)
Logging tracing + tracing-subscriber

Key Fix: Streaming tool_calls Parser

A critical bug in the streaming tool_call accumulation logic caused {"error":"invalid function arguments json string"} on every tool call during streaming responses.

Root Cause: The original state machine used index field to detect tool call boundaries β€” but the index was unreliable across providers and multiple concurrent tool calls caused id flush timing errors.

Fix (commit d92ca75): Replaced index-based detection with id-change detection:

  • Each incoming tool_call chunk is checked for a new id
  • When id changes, the previous tool call is flushed to the accumulated list
  • No mutexes needed for accumulation state β€” simple owned variables

File: crates/agent/src/chat.rs lines 183–283


Configuration

Config file: ~/.hermes/config.yaml

llm:
  provider: minimax
  model: MiniMax-M2.7-highspeed
  api_key: your-api-key

display:
  skin: default        # default / ares / slate / mono
  tool_progress: true
  streaming_thinking: true

gateway:
  host: 0.0.0.0
  port: 3848

memory:
  max_size: 50000
  nudge_interval: 50

Development

# Run tests
cargo test

# TypeScript check (frontend)
cd crates/ui && npx tsc --noEmit

# Format
cargo fmt
cargo clippy --fix

Project Status

Component Status
Core chat + streaming βœ… Working
Tool calling (19 tools) βœ… Working
Skill auto-creation βœ… Working
Memory system βœ… Basic (MemoryStore, nudge)
Session DB + FTS5 βœ… Working
Multi-provider LLM βœ… Working
React UI (9 pages) βœ… Working
HTTP Gateway βœ… Working
CLI + slash commands βœ… Working
Streaming interrupt βœ… Working
Platform adapters βœ… Telegram, Discord, Slack, WhatsApp, Signal
Skill self-evolution βœ… Auto-create, merge duplicates, prune stale
ACP adapter (VS Code) πŸ”œ Not started

License

MIT β€” Same as NousResearch/hermes-agent.

About

High-performance AI agent desktop app for Windows. Built with Rust + React. Streaming tool calls, multi-provider LLM, 19 tools, 9-page Web UI.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors