Implementation:42 evey Hermes plugins delegation score
| Knowledge Sources | |
|---|---|
| Domains | Quality_Tracking, Model_Evaluation, Analytics |
| Last Updated | 2026-10-29 00:00 GMT |
Overview
Concrete tool for logging per-model delegation quality scores and aggregating statistics to identify the best and worst performing models over time.
Description
The evey-delegation-score plugin provides two tools:
- delegation_log (log_handler) — records a quality score entry after
validate_outputruns. Each entry includes the model, task type (code/research/analysis/creative/summary), score (0-10), and tokens used. Entries are appended to~/.hermes/workspace/delegation-scores.jsonlas JSON objects with timestamps.
- delegation_stats (stats_handler) — aggregates JSONL entries by time period (all/today/week) to compute per-model averages, success rates (score ≥7), best model per task type, worst performers (avg <5 with ≥3 calls), and an overall recommendation.
The _read_entries(period) helper reads and filters JSONL entries by timestamp cutoff.
Usage
Call delegation_log after validating a delegation result to build up quality data. Call delegation_stats to see which models perform best for which task types. Registered as delegation_log and delegation_stats on the evey_delegation_score toolset.
Code Reference
Source Location
- Repository: hermes-plugins
- File: evey-delegation-score/__init__.py
- Lines: L19-280 (log_handler L119-158, stats_handler L161-265, _read_entries L81-116, schemas L19-71)
Signature
def log_handler(args: dict, **kwargs) -> str:
"""
Args:
args: {
model: str (required),
task_type: str (required, enum: code/research/analysis/creative/summary),
score: number (required, 0-10),
tokens_used: number
}
Returns:
JSON: {status: "logged", entry: {timestamp, model, task_type, score, tokens_used}}
"""
def stats_handler(args: dict, **kwargs) -> str:
"""
Args:
args: {period: str - 'all' (default), 'today', or 'week'}
Returns:
JSON: {period, total_entries, models: {name: {avg_score, calls, success_rate, avg_tokens}},
best_for: {task_type: model_name}, avoid: [str], recommendation: str}
"""
Import
from evey_delegation_score import log_handler, stats_handler
# Or accessed via Hermes tool calls: delegation_log, delegation_stats
I/O Contract
Inputs (delegation_log)
| Name | Type | Required | Description |
|---|---|---|---|
| model | str | Yes | Model id as reported by the provider |
| task_type | str | Yes | One of: code, research, analysis, creative, summary |
| score | number | Yes | Quality score from validate_output (0-10) |
| tokens_used | number | No | Total tokens consumed by the delegation |
Outputs (delegation_stats)
| Name | Type | Description |
|---|---|---|
| period | str | Time period analyzed |
| total_entries | int | Number of log entries in period |
| models | dict | Per-model: avg_score, calls, success_rate, avg_tokens |
| best_for | dict | Task type → best model name |
| avoid | list[str] | Models with avg <5 and ≥3 calls (with worst task types) |
| recommendation | str | Best overall model recommendation |
Usage Examples
Logging a Score
# After validate_output returns a score
tool_call("delegation_log", {
"model": "claude-sonnet-4-20250514",
"task_type": "code",
"score": 8,
"tokens_used": 1200
})
# {"status":"logged","entry":{"timestamp":"2026-10-29T...",
# "model":"claude-sonnet-4-20250514","task_type":"code","score":8,"tokens_used":1200}}
Viewing Weekly Stats
result = tool_call("delegation_stats", {"period": "week"})
# {"period":"week","total_entries":25,
# "models":{"claude-sonnet-4-20250514":{"avg_score":8.2,"calls":15,"success_rate":"93%","avg_tokens":1100},
# "local-model":{"avg_score":4.1,"calls":10,"success_rate":"30%","avg_tokens":800}},
# "best_for":{"code":"claude-sonnet-4-20250514","research":"claude-sonnet-4-20250514"},
# "avoid":["local-model for code (avg score: 3.5)"],
# "recommendation":"claude-sonnet-4-20250514 is your most reliable model overall"}