Update agent configuration for maximum tool-calling iterations

- Increased the default maximum tool-calling iterations from 20 to 60 in the CLI configuration and related files, allowing for more complex tasks.
- Updated documentation and comments to reflect the new recommended range for iterations, enhancing user guidance.
- Implemented backward compatibility for loading max iterations from the root-level configuration, ensuring a smooth transition for existing users.
- Adjusted the setup wizard to prompt for the maximum iterations setting, improving user experience during configuration.
This commit is contained in:
teknium1
2026-02-03 14:48:19 -08:00
parent 17a5efb416
commit 7eac4ee9fe
7 changed files with 246 additions and 17 deletions

View File

@@ -693,7 +693,28 @@ def run_setup_wizard(args):
# else: Keep current (selected_backend is None)
# =========================================================================
# Step 5: Context Compression
# Step 5: Agent Settings
# =========================================================================
print_header("Agent Settings")
# Max iterations
current_max = get_env_value('HERMES_MAX_ITERATIONS') or '60'
print_info("Maximum tool-calling iterations per conversation.")
print_info("Higher = more complex tasks, but costs more tokens.")
print_info("Recommended: 30-60 for most tasks, 100+ for open exploration.")
max_iter_str = prompt("Max iterations", current_max)
try:
max_iter = int(max_iter_str)
if max_iter > 0:
save_env_value("HERMES_MAX_ITERATIONS", str(max_iter))
config['max_turns'] = max_iter
print_success(f"Max iterations set to {max_iter}")
except ValueError:
print_warning("Invalid number, keeping current value")
# =========================================================================
# Step 6: Context Compression
# =========================================================================
print_header("Context Compression")
print_info("Automatically summarize old messages when context gets too long.")
@@ -718,7 +739,7 @@ def run_setup_wizard(args):
config.setdefault('compression', {})['enabled'] = False
# =========================================================================
# Step 6: Messaging Platforms (Optional)
# Step 7: Messaging Platforms (Optional)
# =========================================================================
print_header("Messaging Platforms (Optional)")
print_info("Connect to messaging platforms to chat with Hermes from anywhere.")
@@ -812,7 +833,7 @@ def run_setup_wizard(args):
print_success("Discord allowlist configured")
# =========================================================================
# Step 7: Additional Tools (Optional)
# Step 8: Additional Tools (Optional)
# =========================================================================
print_header("Additional Tools (Optional)")
print_info("These tools extend the agent's capabilities.")