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
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?Official open source address: https://github.com/NousResearch/hermes-agent; Official document entry: https://hermes-agent.nousresearch.com/_.