feat: implement code execution sandbox for programmatic tool calling
- Introduced a new `execute_code` tool that allows the agent to run Python scripts that call Hermes tools via RPC, reducing the number of round trips required for tool interactions. - Added configuration options for timeout and maximum tool calls in the sandbox environment. - Updated the toolset definitions to include the new code execution capabilities, ensuring integration across platforms. - Implemented comprehensive tests for the code execution sandbox, covering various scenarios including tool call limits and error handling. - Enhanced the CLI and documentation to reflect the new functionality, providing users with clear guidance on using the code execution tool.
This commit is contained in:
4
cli.py
4
cli.py
@@ -135,6 +135,10 @@ def load_cli_config() -> Dict[str, Any]:
|
||||
"clarify": {
|
||||
"timeout": 120, # Seconds to wait for a clarify answer before auto-proceeding
|
||||
},
|
||||
"code_execution": {
|
||||
"timeout": 120, # Max seconds a sandbox script can run before being killed
|
||||
"max_tool_calls": 50, # Max RPC tool calls per execution
|
||||
},
|
||||
}
|
||||
|
||||
# Track whether the config file explicitly set terminal config.
|
||||
|
||||
Reference in New Issue
Block a user