Clark Farming CompanySoftware Foundry

Agent Stack · Optimization

Hermes Agent Optimization

Domain: AI Agents, Fine-Tuning, Tool Calling Status: Active Research Strategic Importance: High — Core to retired internal project agent capabilities Hermes Agent Optimization is a specialized approach to training language models for tool-calling and multi-step task execution within the Hermes Agent framework. Unlike generic chat models or benchmark-optimized systems, Hermes-optimized models prioritize harness-native behavior — exec…

activeinferred-with-source-trail2 source links5 resolved links
wiki/wiki/concepts/hermes-agent-optimization.md

Answer

Domain: AI Agents, Fine-Tuning, Tool Calling Status: Active Research Strategic Importance: High — Core to retired internal project agent capabilities Hermes Agent Optimization is a specialized approach to training language models for tool-calling and multi-step task execution within the Hermes Agent framework. Unlike generic chat models or benchmark-optimized systems, Hermes-optimized models prioritize harness-native behavior — exec…

Auto-generated neutral summary from the source page — needs human review before trusted use.

Evidence & Source Cards

Externalhttps://huggingface.co/kai-os/Carnice-9bexternal/unverified
Externalhttps://github.com/NousResearch/hermes-agent-self-evolutionexternal/unverified

Source Excerpt

Domain: AI Agents, Fine-Tuning, Tool Calling

Status: Active Research

Strategic Importance: High — Core to retired internal project agent capabilities


Executive Summary

Hermes Agent Optimization is a specialized approach to training language models for tool-calling and multi-step task execution within the Hermes Agent framework. Unlike generic chat models or benchmark-optimized systems, Hermes-optimized models prioritize harness-native behavior — executing tools accurately, handling terminal operations, managing multi-turn workflows, and maintaining proper action structure inside the Hermes runtime.

Key Insight: Models trained on Hermes-specific traces (Carnice Model Family-9b) outperform generic tool-trained models because they learn the actual patterns and constraints of the harness, not abstract tool schemas.


Core Principles

1. Harness-Native Over Generic

Problem: Most "agent" models are trained on generic tool schemas (OpenAI Functions, generic JSON schemas) that don't match the actual structure and flow of real agent frameworks.

Solution: Train on actual Hermes traces — real conversations, tool calls, terminal outputs, file edits, and multi-step workflows from inside the Hermes harness.

Result: Models that "think in Hermes" — natural action structure, proper error handling, correct tool sequencing.

2. Execution Quality Over Benchmark Scores

Problem: Leaderboard optimization (MMLU, GSM8K, HumanEval) doesn't correlate with agent execution quality.

Solution: Optimize for:

Result: Models that actually get work done instead of looking good on benchmarks.

3. Two-Stage Training Architecture

Stage A — Reasoning Repair:

Stage B — Hermes-Specific Refresh:

Critical: Stage B is the differentiator — without it, models have generic reasoning but awkward harness behavior.


Technical Implementation

Training Data Requirements

Data TypePurposeExample Sources
Reasoning DataFoundational CoTBespoke-Stratos-17k, NuminaMath-CoT
Hermes TracesHarness-native behaviorCarnice Model Family-glm5-hermes-traces
Agent WorkflowsMulti-step executionOpenThoughts-Agent-v1-SFT
Tool SchemasAction structureHermes-native tool definitions
Error RecoveryHandling failuresReal agent error traces

Model Architecture Considerations

Base Model Selection:

Precision:

Context Length:

Evaluation Metrics

Not These (Generic Benchmarks):

These (Agent-Specific):


retired internal project Applications

Current Implementation

Carnice Model Family-9b is the primary Hermes-optimized model for retired internal project:

AttributeValue
Base ModelQwen/Qwen3.5-9B
FormatMerged standalone checkpoint
LicenseApache 2.0 (commercial use OK)
DeploymentMac Mini (Q4_K_M ~6GB), Mac Studio (Q8/bf16)
Use CasePrimary agent model for tool calling

Performance Characteristics:

Deployment Strategy

Mac Mini (16GB) — Edge Nodes:

Model: Carnice Model Family-9b @ Q4_K_M (~6GB)
Context: 8K-16K
Use: Small workspaces, single-agent tasks
Concurrent: 1-2 instances

Mac Studio (256GB) — Central Hub:

Model: Carnice Model Family-9b @ Q8 or bf16 (~18-20GB)
Context: 16K-32K
Use: Primary agent, complex workflows
Concurrent: 2-3 instances (with larger model)

Ubuntu 3090 (24GB) — GPU Workers:

Model: Carnice Model Family-9b @ bf16 or Q6_K (~18GB)
Context: 16K-32K
Use: Batch inference, fine-tuning experiments
Concurrent: Multiple parallel workspaces

Future: Carnice-27B

Expected Benefits:

Action Plan:

  1. Monitor @kai-os HuggingFace for release
  2. Immediate download and validation
  3. Quantize to Q4_K_M, Q5_K_M, Q6_K
  4. Benchmark vs 9B on retired internal project workflows
  5. Deploy as primary model if improvement confirmed

Comparison to Alternatives

ApproachTool AccuracyHarness FitReasoningSizeretired internal project Fit
Carnice Model Family-9b (Hermes-native)⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐9B✅ Excellent
Generic Tool-Trained⭐⭐⭐⭐⭐⭐⭐⭐⭐7-70B⚠️ Awkward
Chat-Only Models⭐⭐⭐⭐⭐7-70B❌ Wrong use case
Carnice Model Family-27B (pending)⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐27B⭐ Ideal

Key Researchers & Sources

Person/OrgContribution
@kai-osCarnice Model Family model creator, Hermes optimization pioneer
Teknium (Nous Research Research)Hermes framework, Carnice Model Family contributor
Zachary Mueller (Lambda)Carnice Model Family contributor, GPU training
Nous Research ResearchHermes Agent framework development

Related Concepts


Open Questions

  1. Optimal Context Length: Is 16K sufficient, or does 32K meaningfully improve complex workflows?
  2. Fine-Tuning Depth: Should retired internal project fine-tune Carnice Model Family further on proprietary workflows?
  3. Multi-Model Strategy: When to use 9B vs 27B vs larger models?
  4. Evaluation Benchmark: What's the right retired internal project-specific agent benchmark?

Follow-up Actions


Metadata


Source excerpt truncated at 220 of 222 lines. Open the canonical wiki path above for the full page.

Relationships

Outbound links

Referenced by

Tags

agentshermesfine-tuningtool-callingharness-native