Back to AI Q&A
How does Hermes Agent pick up Olama?

How does Hermes Agent pick up Olama?

AI Q&A Admin 107 views

The key to connecting with Olama is to regard Olama as an OpenAI-compatible custom endpoint. It's not difficult to run. What's really easy to step on is that the context length is too small: the tool schema and system prompts may fill up the 4k context, causing the agent to appear to have "amnesia" or cannot call the tool.

Basic steps

ollama pull qwen2.5-coder:32b
OLLAMA_CONTEXT_LENGTH=32768 ollama serve
_
and run: 

_CODE_BLOCK_1___1_

Select custom endpoint, fill in the URL_CODE_INLINE_2__, the API key can be skipped, and the model name should be filled in the model name in Ollama.

Check key points

  • Use_CODE_INLINE_3__to see if CONTEXT reaches 16k or 32k.
  • Local small models may not be good at complex tool calls, so test with simple file tasks first.

  • On Windows, make sure that the Olama service can be accessed by WSL or Docker.

    In a word:

    Hermes Agent is not difficult to connect with Olama. The difficulty is to provide enough context and choose a model that can stabilize tool calls.

      What is local models suitable for?Olama is more suitable for privacy-sensitive, low-cost, light to medium file processing and simple code tasks. If you want to let Hermes Agent plan for a long time, continuously tune tools, and process large warehouses, the reasoning capabilities and context windows of the local model will become bottlenecks. Test with small tasks such as "Read a file and summarize" and "List a directory and modify a text" before using it for formal automation.
    • Official open source address: https://github.com/NousResearch/hermes-agent; Official document entry: https://hermes-agent.nousresearch.com/_.

  • Recommended Tools

    More