Aulafy
Courses/Claude Code + Local AI/Local coding agent with Hermes and Ollama

Local coding agent with Hermes and Ollama

Hermes Agent lets you set up an agent that works with tools, memory, and skills using local providers such as Ollama. The important part is not making it fully autonomous: it's giving it limits, verification, and a clear way to stop.

  • Understand the role of Hermes, Ollama, and the local model.
  • Configure a safe workflow for editing code on a branch.
  • Avoid loops, broken tool calling, and changes without tests.

Minimal architecture

For a local coding agent, think in three layers: Hermes orchestrates the task, Ollama serves the model, and Git/tests verify whether the change deserves to stay. If one of those layers is missing, the system becomes fragile.

  • Hermes: memory, skills, tools, and work loop.
  • Ollama: compatible local endpoint for inference.
  • Repository: isolated branch, tests, lint, and reviewable diff.
TerminalCode
# Comprueba que Ollama responde
ollama --version
ollama list
curl http://localhost:11434/api/tags

# Elige un modelo pequeño para empezar
ollama pull qwen2.5-coder:7b
ollama run qwen2.5-coder:7b "Resume qué hace este archivo package.json"

# Trabaja siempre en rama
git checkout -b agent/hermes-prueba-segura

Recommended initial assignment

A local agent should not start by editing. It should observe, scope, and propose a plan first. This pattern reduces impulsive changes and lets you detect when context is insufficient.

TerminalCode
Objetivo:
Corrige el bug descrito en BUG.md sin tocar otras áreas.

Reglas:
- Primero lista archivos relevantes y riesgos.
- No edites hasta proponer un plan de 5 pasos.
- Máximo 8 pasos de agente.
- Si una tool falla dos veces, para y resume.
- Después de editar, ejecuta lint/test/build disponibles.
- No hagas commit sin mostrar diff y resultado de pruebas.

Stop logic so it doesn't wander off

TerminalCode
limits:
  max_steps: 8
  max_tool_calls_total: 20
  max_repeated_tool_args: 2
  max_runtime_minutes: 15
  stop_when:
    - tests_pass
    - same_error_twice
    - missing_context
    - needs_secret_or_external_login

Official sources

  • Ollama: Hermes Agent integration
  • Hermes Agent documentation
  • Hermes Agent: AI providers
  • Google Gemma 4 model card
  • Ollama API