trajectory
Trajectory Learning for Botte Secrète — stores solver trajectories and searches similar past optimizations to inform future decisions
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Trajectory Learning for Botte Secrète — stores solver trajectories and searches similar past optimizations to inform future decisions
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Memory as a learnable skill — store, recall, compress, and consolidate agent memories. Inspired by Stanford AutoMem.
Auto-decide whether a task runs on a LOCAL model or a CLOUD model (DeepSeek, GLM, Nemotron, Grok, Gemma, …) from an automatic effort estimate, and run multi-model fusion (cascade, draft→refine, vote). Use when the user wants automatic local-vs-cloud routing, to add cloud LLM providers, to make local and cloud models collaborate, or mentions effort-based routing, model fusion/ensemble, OpenRouter, DeepSeek, GLM, Nemotron, or Grok.
Fenêtres de contexte pour boucles rétroactives — charge seulement les deltas.
Optimisations DAG/RAG — waves, pruning, memoization, routing.
Generate one self-contained, timestamped HTML dashboard of the system's cost picture — routing savings (control loop), metric trends, current metrics, and the cost of outstanding fixes. Also renders as a live ANSI terminal view (--tui, --watch) and serves a live HTTP API (api.py). Use when the user wants a single visual view of cost/savings/health over time, or a live terminal view they don't have to open a browser for.
Append-only JSONL decision log (.botte/events.jsonl) that every filter in the belt writes to — routing, cache hits, escalations, micro-NN outputs. The single source of truth demo mode, the live dashboard, and session replay all read from. Use when you want to see or emit a live feed of routing/cache/escalation decisions, or when building a tool that needs to watch the belt work in real time.
| name | trajectory |
| description | Trajectory Learning for Botte Secrète — stores solver trajectories and searches similar past optimizations to inform future decisions |
| version | 1.0.0 |
| author | Hermes Agent |
| license | MIT |
| metadata | {"hermes":{"tags":["botte","trajectory","memory","learning"],"related_skills":["solvers","trajectory-memory"]}} |
Stocke les trajectoires d'optimisation des solveurs déterministes. Permet de retrouver des solutions similaires déjà calculées → 0 token, 0 latence.
Compatible avec ~/.hermes/scripts/trajectory_search.py (Hermes Trajectory Memory).
| Fichier | Rôle |
|---|---|
skills/trajectory/__init__.py | capture(), search(), load(), stats() |
skills/trajectory/store/trajectories.jsonl | Stockage JSON Lines |
from skills.trajectory import capture, search, get_stats
# Capturer une trajectoire
tid = capture(
solver="bin_pack",
task="pack 3 database backups into 10GB capacity",
parameters={"items": [("db1", 4), ("db2", 7), ("db3", 3)], "capacity": 10},
result={"bins": [...], "bin_count": 2},
latency=0.002,
tokens_saved=500,
)
# Rechercher des trajectoires similaires
hits = search("pack items into capacity")
for h in hits:
print(f"[{h['score']:.2f}] {h['trajectory']['task']}")
# Statistiques
stats = get_stats()
print(f"Total: {stats['total']}, Tokens saved: {stats['total_tokens_saved']}")
Dans skills/solvers/solvers.py, chaque fonction peut capturer sa trajectoire:
from skills.trajectory import capture
def assign_balanced(tasks, workers):
result = ... # existing logic
capture("assign_balanced", f"assign {len(tasks)} tasks to {len(workers)} workers",
{"tasks": tasks, "workers": workers}, result, latency=latency())
return result
Les fichiers sont compatibles: Botte peut lire les trajectoires Hermes et vice-versa:
# Lire les trajectoires Hermes
from skills.trajectory import load
hermes_trajs = load("/home/redgamer/.hermes/trajectory_store/trajectories.jsonl")