
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.