Nous Research released Hermes Agent with a recursive learning architecture that lets agents improve through execution feedback. Co-founder and CTO Jeffrey Quesnelle discussed the technical boundary between model capabilities and harness orchestration on the Practical AI podcast. The system analyzes what works and what fails, then adjusts how it sequences tools and handles errors. Unlike model fine-tuning, Hermes Agent modifies orchestration logic, not model weights.
The Model vs. Harness Split
Quesnelle described the architecture as separating models from harnesses, a distinction that determines where state lives and what can change at runtime. Most agent frameworks bundle inference and orchestration into a single runtime. Hermes Agent separates them:
- Model layer: Handles inference, tool call generation, and response formatting. This is the Hermes model itself, an open-weight LLM trained for agentic tasks.
- Harness layer: Owns execution state, tool routing, retry logic, and the feedback loop that drives self-improvement.
The harness does not modify model weights. It modifies execution strategy: which tools to call, how to sequence them, when to retry, and how to interpret failure signals.
This split matters because the model can be swapped, versioned, or served from a separate endpoint. The harness persists execution history and learned patterns across sessions.
What Recursive Learning Actually Means
The podcast emphasized that agents “grow with you” by learning from their own execution. Recursive learning in Hermes Agent refers to the harness analyzing execution traces and adjusting its orchestration logic. Here is what changes:
- Tool selection heuristics: If a tool call fails repeatedly in a specific context, the harness deprioritizes it for similar future requests.
- Prompt templates: The harness can inject context from past failures into the system prompt to steer the model away from known failure modes.
- Execution graph pruning: If a multi-step plan consistently fails at step three, the harness learns to skip or reorder that step.
The model itself does not change. The harness builds a memory of what worked and what did not, then uses that memory to shape future execution.
State Ownership and Persistence
The harness owns three types of state:
| State Type | What It Stores | Lifetime | Example |
|---|---|---|---|
| Execution trace | Tool calls, responses, errors, latency | Per-session or cross-session | {"tool": "search_api", "status": "timeout", "latency_ms": 5000} |
| Learned heuristics | Tool success rates, failure patterns, context triggers | Persistent across sessions | {"context": "financial_query", "avoid_tool": "web_scraper", "confidence": 0.85} |
| Active plan | Current execution graph, pending tool calls, retry budget | Per-session only | {"step": 2, "pending": ["validate_input", "call_api"], "retries_left": 2} |
Execution traces are the raw material for learning. The harness analyzes them to extract patterns: “Tool X fails when input Y is malformed” or “Step 3 always times out after Step 2 succeeds.”
Learned heuristics are stored in a lightweight key-value structure. The harness queries this structure before making orchestration decisions. If a heuristic says “avoid Tool X in context Y,” the harness respects that unless explicitly overridden.
Active plan state is ephemeral. It lives only for the duration of a single request or conversation turn. Once the plan completes or fails, the harness writes the trace to persistent storage and discards the active plan.
Architecture Sketch
Here is a simplified view of how a request flows through Hermes Agent:
class HermesHarness:
def __init__(self, model_endpoint, heuristic_store):
self.model = model_endpoint
self.heuristics = heuristic_store
self.trace = []
def execute(self, user_request):
# Query learned heuristics for this context
context_hints = self.heuristics.query(user_request)
# Construct execution graph from user intent and heuristics
plan = self.build_plan(user_request, context_hints)
for step in plan:
try:
# Model generates tool call
tool_call = self.model.infer(step, context_hints)
# Execute tool with timeout and retry logic
result = self.invoke_tool(tool_call)
self.trace.append((step, tool_call, result, "success"))
except Exception as e:
self.trace.append((step, tool_call, None, "failure"))
# Harness decides: retry, skip, or abort
if self.should_retry(step, e):
continue
else:
break
# Extract patterns and update heuristic store
self.heuristics.learn_from_trace(self.trace)
return self.trace
def should_retry(self, step, error):
# Check if heuristics suggest retry is futile
return not self.heuristics.is_known_failure(step, error)
The key is that learn_from_trace runs after every execution. It extracts patterns from the trace and updates the heuristic store. The next request benefits from those updates.
How Self-Improving Agents Avoid Degradation
Self-modifying systems can degrade if feedback loops amplify bad decisions. While the podcast discussion did not detail Nous Research’s specific safeguards, production self-improving agents typically need mechanisms to prevent runaway behavior:
- Heuristic confidence scores: Each learned pattern needs a confidence score based on sample size. Low-confidence heuristics are ignored until they accumulate more evidence.
- Rollback triggers: If success rate drops below a baseline, the harness should revert to a known-good heuristic set. This baseline is measured over a sliding window of recent executions.
- Human-in-the-loop checkpoints: For high-stakes decisions, the harness can pause and request human approval before applying a new heuristic.
The harness also logs every heuristic change with a timestamp and the execution trace that triggered it. This audit trail makes it possible to debug why the agent started behaving differently.
Observability Challenges
Self-improving agents are hard to debug because their behavior changes over time. You need visibility into:
- Heuristic drift: Which heuristics are being added, modified, or retired, and at what rate.
- Execution variance: How often does the agent choose different tools or plans for similar requests.
- Feedback loop latency: How long does it take for a learned heuristic to affect execution.
Structured logging is not enough. You need a time-series view of heuristic changes and execution outcomes. For example, plot success_rate and tool_selection_entropy over time in Grafana, with vertical lines marking when new heuristics are added. This lets you correlate behavior changes with specific learning events.
You also need a way to replay execution traces with different heuristic sets. This lets you test whether a new heuristic actually improves outcomes or just adds noise.
Likely Failure Modes
Here are the most likely ways self-improving agent systems break:
- Heuristic poisoning: A single bad execution trace teaches the harness a wrong pattern, which then propagates to future requests. Mitigation: require multiple confirming traces before trusting a heuristic.
- State divergence: If multiple harness replicas write to the heuristic store concurrently, they can overwrite each other’s updates. Mitigation: use a database with ACID guarantees and row-level locking.
- Model drift: If the model is updated but the heuristics are not reset, the harness may apply outdated patterns to a model with different behavior. Mitigation: version heuristics alongside model versions.
Technical Verdict
Use Hermes Agent when you need an agent system that adapts to domain-specific failure patterns without manual tuning. It works well for workflows where the same tasks repeat with slight variations, and you want the system to learn which tools and sequences work best.
Avoid it if you need deterministic behavior or cannot tolerate execution variance. Self-improving agents are inherently non-deterministic. If you need to reproduce exact results or pass compliance audits that require fixed logic, stick with static orchestration.
Also avoid it if your workload is too diverse. Recursive learning needs repeated exposure to similar contexts to extract useful patterns. If every request is unique, the harness will not accumulate enough evidence to improve.