Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
The Hermes Agent Guide: From Zero to Autonomous Agent
New

The Hermes Agent Guide: From Zero to Autonomous Agent

From your first local chat to a fine-tuned model: build AI agents by hand with Hermes and Ollama
Created byMeadowwave AI
Last updated 7/2026
English

What you'll learn

  • Run the open-weight Hermes model locally with Ollama and call it from Python through both the native and OpenAI-compatible endpoints
  • Read and write ChatML directly, and use the system prompt to steer the model's behavior and swap personas
  • Build a function-calling agent that parses tool calls, runs a real API, and feeds the result back to the model
  • Get reliable structured output with Pydantic schemas, validation, and a repair-and-retry pass
  • Implement the ReAct loop by hand and build a multi-tool agent that plans and completes multi-step tasks
  • Build a fully local RAG pipeline that answers questions from your own documents and cites its sources
  • Design multi-agent systems, including a writer-and-critic loop and a planner that coordinates researchers and a writer
  • Add guardrails that redact sensitive data, evaluate agents with an LLM-as-judge, and handle broken output safely
  • Fine-tune Hermes yourself with LoRA and QLoRA, train an adapter on your own machine, and run the model you trained in Ollama
  • Connect the self-hosted Hermes Agent to memory files, markdown skills, a cron scheduler, and Telegram

Course content

11 sections164 lectures5h 51m total length
  • What You Will Build In This Course2:16

Requirements

  • No previous experience is needed! All you need is your laptop

Description

Note: This course contains the use of artificial intelligence.


This course covers how to build AI agents on top of NousResearch's Hermes, an open-weight model you run yourself instead of calling a hosted API. Everything runs locally through Ollama on Hermes 3 8B, so the course has no API costs and works offline. The code is plain Python with the standard requests and ollama calls, not a wrapper framework, which means you work directly with the model's chat endpoint and see the raw ChatML the model actually receives.


You begin with the runtime: installing Ollama, pulling Hermes, and calling both the native /api/chat endpoint and the OpenAI-compatible /v1 route. You'll look at ChatML directly, including the <|im_start|> and <|im_end|> tokens, the role turns, and how the system prompt steers generation. The course uses apply_chat_template rather than hand-writing tokens, and explains where the two differ.


Function calling is the core of the course. You'll work with Hermes's native tool format, the <tools>, <tool_call>, and <tool_response> blocks, and the official function-calling system prompt. You build an agent that parses a <tool_call> out of the model output, executes a real API, and feeds the result back as a <tool_response> for the model to answer from. Then you cover the easier path through Ollama's tools=[...] parameter and where the JSON parsing tends to break.


For structured output you define schemas with Pydantic, pass the JSON schema into the system prompt, parse the reply, and feed validation errors back for a repair pass. For agents you implement the ReAct loop directly, reason, act, observe, and cap the iterations, and build a multi-tool version with a calculator, a file reader, and a fetch tool. The RAG module builds a local retrieval pipeline with an embedding model, cosine-similarity search over your own document chunks, and a grounded answer that cites the passage it used.


The multi-agent section builds a writer-and-critic loop and a planner that splits a question into sub-questions, sends each to a researcher that retrieves and answers from the source, and passes the findings to a writer. You'll add guardrails that combine regex and a model pass to redact emails, phone numbers, and names, an LLM-as-judge evaluator with a grading schema, and a safe_json retry that falls back to constrained output when a reply won't parse.


The final section is fine-tuning. You cover LoRA and QLoRA and why 4-bit adapters fit in Mac memory, generate a small ChatML training set, train an adapter, and check the trainable-parameter count and the loss curve across epochs. You then export the result and load it back into Ollama so you can run the model you trained. The course closes on the self-hosted Hermes Agent, its memory and markdown skills files, the cron scheduler, and a Telegram connection.


This course is for people who want to understand how agents work at the level of the actual prompt and the actual tool-call parsing, rather than through a framework's abstractions. By the end, you'll have a complete understanding of how modern AI agents actually work under the hood.

Who this course is for:

  • Developers comfortable reading Python and using a terminal who want to build AI agents directly rather than through a framework
  • People who have used ChatGPT or Claude and want to understand how agents work at the level of the prompt and the tool call
  • Anyone who wants to run capable AI locally for free, keep their data on their own machine, and skip per-call API costs
  • Learners who want to try fine-tuning and train their own model without a GPU rig or a cloud bill
  • Tinkerers building a private AI setup they run and control themselves