mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
feat(budget): make tool result persistence thresholds configurable
Add BudgetConfig dataclass to centralize and make overridable the hardcoded constants (50K per-result, 200K per-turn, 2K preview) that control when tool outputs get persisted to sandbox. Configurable at the RL environment level via HermesAgentEnvConfig fields, threaded through HermesAgentLoop to the storage layer. Resolution: pinned (read_file=inf) > env config overrides > registry per-tool > default. CLI override: --env.turn_budget_chars 80000
This commit is contained in:
parent
65e24c942e
commit
77c5bc9da9
9 changed files with 131 additions and 9 deletions
|
|
@ -541,6 +541,7 @@ class TerminalBench2EvalEnv(HermesAgentBaseEnv):
|
|||
temperature=self.config.agent_temperature,
|
||||
max_tokens=self.config.max_token_length,
|
||||
extra_body=self.config.extra_body,
|
||||
budget_config=self.config.build_budget_config(),
|
||||
)
|
||||
result = await agent.run(messages)
|
||||
else:
|
||||
|
|
@ -553,6 +554,7 @@ class TerminalBench2EvalEnv(HermesAgentBaseEnv):
|
|||
temperature=self.config.agent_temperature,
|
||||
max_tokens=self.config.max_token_length,
|
||||
extra_body=self.config.extra_body,
|
||||
budget_config=self.config.build_budget_config(),
|
||||
)
|
||||
result = await agent.run(messages)
|
||||
|
||||
|
|
|
|||
|
|
@ -549,6 +549,7 @@ class YCBenchEvalEnv(HermesAgentBaseEnv):
|
|||
temperature=self.config.agent_temperature,
|
||||
max_tokens=self.config.max_token_length,
|
||||
extra_body=self.config.extra_body,
|
||||
budget_config=self.config.build_budget_config(),
|
||||
)
|
||||
result = await agent.run(messages)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue