Categories

Learning path Intermediate

Self-hosted Agentic Models and Tool Calling

Run tool-calling models on your own hardware: Nous Hermes 3 and 4, Qwen-Agent, function calling with Ollama, which open models support tools, and the structured-output libraries Instructor, Outlines and DSPy.

  • 8 resources
  • ~66 min
  • Intermediate

What you will learn

This path teaches you to run tool-calling models on your own hardware, without relying on closed third-party APIs. It’s built for readers who already know the basics of LLMs and self-hosting and want to move on to building agents that call functions, query external data, or return structured output with guarantees.

What you’ll be able to do

By the end you will know how to deploy open models with tool support, decide which one fits your use case, and force their responses to follow a concrete schema instead of free text. This is an intermediate-level path: some prior experience with Ollama or running models locally helps, though every article covers the concepts you need along the way.

How the sequence builds

The path opens with Nous Hermes 3 and its successor, Nous Hermes 4, two open-weight agentic models that give you a practical base for understanding how a tool-using model reasons and acts. From there it moves into Qwen-Agent and function calling with Ollama, where theory turns into real configuration on your own machine. The path continues with a comparison of open tool-calling models to help you pick the right one, then closes with the structured-output libraries: Instructor, Outlines and DSPy, which solve the problem of getting an LLM to return exactly the format your application needs.

None of these steps require a data-center GPU: the models and libraries covered here run on consumer hardware, which makes this path a realistic starting point for building your own agents without depending on OpenAI or Anthropic for every tool call.

  1. Nous Hermes 3: an open-weight agentic model

    Hermes 3 is Nous Research's family of open-weight models, fine-tuned on Llama 3.1 in 8B, 70B and 405B sizes. Its strength is tool use through JSON-formatted function calls. You can run it on your own machine with Ollama or vLLM and give it agentic capabilities without depending on a paid API.

    • 8 min
  2. Nous Hermes 4: The Agentic Model with Hybrid Reasoning

    Hermes 4 is the family of open-weight models Nous Research released in August 2025, in 14B, 70B and 405B parameter sizes. Its headline change is hybrid reasoning: one model answers directly or deliberates with think tags before replying, and it keeps the Hermes tool-calling format for agents.

    • 8 min
  3. Qwen-Agent: tool use with Qwen models

    Qwen-Agent is the Qwen team's official framework for giving their models tools: function calling, a sandboxed code interpreter, RAG and MCP. It is on version 0.0.34, released in February 2026, has around 16,800 GitHub stars and holds the canonical implementation of Qwen3 tool calling, both in the cloud and on your own machine.

    • 8 min
  4. Function calling with Ollama on your own machine

    Function calling lets a model you run with Ollama on your own machine ask your code to call a function (check the weather, query a database) and use the result to answer. Ollama has supported tools since July 2024; in 2026 models such as qwen3 and llama3.3 do it with reasonable reliability.

    • 9 min
  5. Open models with tool calling: which to choose

    Not every open model calls tools equally well: the Qwen3 family, Nous Hermes, Llama 3.1 and Mistral stand out because they were trained for it. To choose, check the Berkeley Function-Calling Leaderboard, make sure a parser exists for the model's template, and match it to your GPU's VRAM.

    • 9 min
  6. Instructor: reliable structured outputs

    Instructor is the most widely used Python library for getting reliable structured outputs from a language model: you define the result you expect as a Pydantic model, Instructor patches the client so the model honours it, and it retries on its own, with the validation error included, until it returns a valid, already-typed object.

    • 8 min
  7. Constrained generation with Outlines

    Outlines is a Python library for constrained generation: it forces the model to produce output that conforms to a JSON schema, a regular expression or a grammar, with a guarantee by construction rather than statistics. It works with vLLM, Transformers, Ollama and llama.cpp, and its Rust engine adds barely any overhead per token.

    • 8 min
  8. DSPy: optimizing prompts and LLM programs

    DSPy is a Python framework from Stanford that treats calls to an LLM as code: you define signatures with typed inputs and outputs, pick a module such as chain of thought, and let an optimizer write the prompts for you from examples and a metric. That way you compile programs instead of hand-tuning prompts.

    • 8 min