# Learn Hermes Agent

A 27-chapter, code-first Python tutorial that builds an autonomous AI agent from scratch, covering the agent loop, tools, memory, MCP, and a multi-platform chat gateway.

Learn Hermes Agent is a hands-on tutorial for building a production-grade autonomous AI agent from zero in Python, inspired by another agent codebase but focused on teaching the mechanisms that let an agent work autonomously across platforms rather than mirroring every product detail. Each of its 27 chapters ships a runnable reference implementation alongside a prose explanation in English and Chinese, covering the conversation loop, a self-registering tool dispatch layer, SQLite-with-FTS5 session persistence, prompt assembly, context compression, memory and skill management, a permission system that detects dangerous commands, a gateway spanning Telegram, Discord, Slack, and WeChat, terminal backends that run commands locally, in Docker, over SSH, or on serverless platforms, and scheduling, MCP, and voice integration.

The stated teaching goal is to explain the real design backbone of an autonomous agent well enough that a reader can rebuild it themselves, teaching unfamiliar concepts before relying on them and staying close to real system structure rather than drowning the reader in product-specific detail.

Website: https://github.com/longyunfeigu/learn-hermes-agent
