MCPcopy Create free account
hub / github.com/ScaleML/AgentSPEX / main

Function main

src/harness/run.py:134–159  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

132
133
134def main():
135 from harness.paths import ensure_runtime_dirs, init_run_env, peek_task_name
136
137 load_dotenv(find_dotenv(), override=True)
138 ensure_runtime_dirs()
139 args = parse_args()
140
141 # Decide the run id BEFORE YAML parse so workflows can reference
142 # ${AGENTSPEX_RUN_SANDBOX_DIR_ABS} at load time.
143 workflow_path = args.workflow_file or ""
144 task_name = peek_task_name(workflow_path) or (
145 Path(workflow_path).stem if workflow_path else "task"
146 )
147 init_run_env(task_name, resume=bool(getattr(args, "resume", False)))
148
149 if args.mode == "loop":
150 from harness.agentic_loop.run_loop import main as loop_main
151
152 return loop_main()
153
154 yaml_config = load_yaml_config(workflow_path)
155
156 apply_yaml_config_fallback(args, yaml_config)
157
158 agent = AgentSPEX(mcp_url=args.mcp_url)
159 agent.run(args)
160
161
162if __name__ == "__main__":

Callers 1

run.pyFile · 0.70

Calls 8

runMethod · 0.95
ensure_runtime_dirsFunction · 0.90
peek_task_nameFunction · 0.90
init_run_envFunction · 0.90
AgentSPEXClass · 0.90
load_yaml_configFunction · 0.85
parse_argsFunction · 0.70

Tested by

no test coverage detected