feat: Added agent variables support for graph agents and improved script executor to use the same environment variables as normal agent tool calling for further flexibility

This commit is contained in:
2026-05-21 13:27:33 -06:00
parent 0bb312a85c
commit 558b764db8
6 changed files with 64 additions and 4 deletions
+6 -1
View File
@@ -76,7 +76,12 @@ impl GraphExecutor {
}
let mut state = StateManager::new(graph.initial_state.clone());
let script_executor = ScriptExecutor::new(&base_dir);
let agent_envs = ctx
.agent
.as_ref()
.map(|a| a.variable_envs())
.unwrap_or_default();
let script_executor = ScriptExecutor::new(&base_dir).with_envs(agent_envs);
let max_iterations = graph.settings.max_loop_iterations;
let graph_timeout = graph.settings.timeout.map(Duration::from_secs);
let max_concurrency = graph.settings.max_concurrency;