วัน: 16 มิถุนายน 2004

Hermes Agent + ollama + vs codeHermes Agent + ollama + vs code

การทำงานร่วมกันระหว่าง Ollama, Hermes Agent และ VS Code เป็นสถาปัตยกรรม Local-first AI Development ที่มีประสิทธิภาพสูง โดยแบ่งหน้าที่กันดังนี้

  • Ollama: ทำหน้าที่เป็น Engine รันโมเดล LLM ในเครื่อง (Local Inference)
  • Hermes Agent: ทำหน้าที่เป็น Agent อัจฉริยะ (สั่งรันคำสั่ง Terminal, ตรวจไฟล์, รัน Test, จำบริบทโปรเจกต์)
  • VS Code: เป็นพื้นที่หลักที่คุณใช้เขียนโค้ดและเปิด Terminal

ขั้นตอนการติดตั้งและเชื่อมต่อใช้งาน

BASH / Shell

+-------------------------------------------------------------+
| VS Code (Integrated Terminal / Editor)                      |
|   |                                                         |
|   +---> รัน Hermes Agent CLI (สั่งการ วางแผน รันเครื่องมือ) |
|            |                                                |
|            +---> ส่ง Prompt & Tool Call ผ่าน Local API       |
|                     |                                       |
|                     v                                       |
|             Ollama (http://localhost:11434/v1)              |
|             โมเดล: qwen2.5-coder / llama3.3 / hermes        |
+-------------------------------------------------------------+



เตรียมโมเดลบน Ollama

เปิด Terminal แล้วตรวจสอบว่า Ollama ทำงานอยู่ จากนั้นดึงโมเดลที่รองรับ Tool Calling หรือ Coding ได้ดี

BASH / Shell

brew install ollama

หรือ

BASH / Shell

# ตัวอย่าง: ใช้โมเดลสำหรับ Coding และ Tool Calling
ollama pull qwen2.5-coder:14b
# หรือ
ollama pull llama3.3

ตรวจสอบว่า Ollama ให้บริการ API อยู่ที่
http://localhost:11434




ติดตั้งและตั้งค่า Hermes Agent

  • macOS / Linux / WSL2

    BASH / Shell

    brew install hermes-agent
    

หรือ

  • Windows (PowerShell)
  • BASH / Shell

    # รันคำสั่ง installer ตามที่ Nous Research กำหนด
    irm https://hermes-agent.nousresearch.com/install.ps1 | iex
    



    ตั้งค่าให้ Hermes Agent ชี้ไปที่ Ollama

    รันคำสั่ง setup

    BASH / Shell

    hermes setup
    

    หรือเลือกเปลี่ยน Endpoint ไปที่ Ollama ผ่านคำสั่ง

    BASH / Shell

    hermes model