mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-03 02:11:48 +00:00
agent_loop.py: - Add _truncate_context() with 2-phase strategy (truncate tool results, then drop oldest middle messages while keeping assistant+tool pairs) - Add max_context_tokens parameter - Guard against double-encoded JSON tool arguments (model outputs string instead of dict) hermes_base_env.py: - Wire max_context_tokens=max_token_length through all 3 HermesAgentLoop construction sites hermes_parser.py: - Prevent double-encoding: when arguments are already a string, use as-is instead of json.dumps() which would double-encode swe_smith_oracle_env.py: - Shaped reward structure for cold-start training: 0.0 (no tools) -> 0.05/call up to 0.3 -> 0.4 (install ok) -> 1.0 (tests pass) - _build_scored_item() override: truncate tokens/masks from END to fit max_token_len instead of discarding entire groups All changes are in environments/ only — no effect on TUI/CLI agent loop. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| deepseek_v3_1_parser.py | ||
| deepseek_v3_parser.py | ||
| glm45_parser.py | ||
| glm47_parser.py | ||
| hermes_parser.py | ||
| kimi_k2_parser.py | ||
| llama_parser.py | ||
| longcat_parser.py | ||
| mistral_parser.py | ||
| qwen3_coder_parser.py | ||
| qwen_parser.py | ||