refactor: Agents that depend on global tools now have all binaries compiled and stored in the agent's bin directory so multiple agents can run at once

This commit is contained in:
2025-11-04 11:29:59 -07:00
parent 843abe0621
commit 2f3586cbbf
20 changed files with 342 additions and 48 deletions
+1
View File
@@ -27,6 +27,7 @@ setup_env() {
export LLM_AGENT_FUNC="$agent_func"
export LLM_AGENT_ROOT_DIR="$LLM_ROOT_DIR/agents/{agent_name}"
export LLM_AGENT_CACHE_DIR="$LLM_ROOT_DIR/cache/{agent_name}"
export LLM_PROMPT_UTILS_FILE="{prompt_utils_file}"
}
load_env() {
+3 -3
View File
@@ -31,10 +31,10 @@ def main():
raw_data = parse_argv()
tool_data = parse_raw_data(raw_data)
root_dir = "{config_dir}/functions"
root_dir = "{root_dir}"
setup_env(root_dir)
tool_path = os.path.join(root_dir, "tools/{function_name}.py")
tool_path = "{tool_path}.py"
run(tool_path, "run", tool_data)
@@ -150,4 +150,4 @@ def dump_result(name):
if __name__ == "__main__":
main()
main()
+3 -2
View File
@@ -5,10 +5,10 @@
set -e
main() {
root_dir="{config_dir}/functions"
root_dir="{root_dir}"
parse_argv "$@"
setup_env
tool_path="$root_dir/tools/{function_name}.sh"
tool_path="{tool_path}.sh"
run
}
@@ -24,6 +24,7 @@ setup_env() {
export LLM_ROOT_DIR="$root_dir"
export LLM_TOOL_NAME="{function_name}"
export LLM_TOOL_CACHE_DIR="$LLM_ROOT_DIR/cache/{function_name}"
export LLM_PROMPT_UTILS_FILE="{prompt_utils_file}"
}
load_env() {