File tree 2 files changed +9
-1
lines changed
src/agent_workflow_server
2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,14 @@ def _read_manifest(path: str) -> AgentACPDescriptor:
71
71
72
72
73
73
def _resolve_agent (name : str , path : str ) -> AgentInfo :
74
+ if ":" not in path :
75
+ raise ValueError (
76
+ f"""Invalid format for AGENTS_REF environment variable. \
77
+ Value must be a module:var pair. \
78
+ Example: "agent1_module:agent1_var" or "path/to/file.py:agent1_var"
79
+ Got: { path } """
80
+ )
81
+
74
82
module_or_file , export_symbol = path .split (":" , 1 )
75
83
if not os .path .isfile (module_or_file ):
76
84
# It's a module (name), try to import it
Original file line number Diff line number Diff line change @@ -126,13 +126,13 @@ async def worker(worker_id: int):
126
126
DB .update_run_info (run_id , run_info )
127
127
128
128
try :
129
- validate_output (run_id , run ["agent_id" ], last_message .data )
130
129
log_run (
131
130
worker_id ,
132
131
run_id ,
133
132
"got message" ,
134
133
message_data = json .dumps (last_message .data ),
135
134
)
135
+ validate_output (run_id , run ["agent_id" ], last_message .data )
136
136
DB .add_run_output (run_id , last_message .data )
137
137
await Runs .Stream .publish (run_id , Message (type = "control" , data = "done" ))
138
138
if last_message .type == "interrupt" :
You can’t perform that action at this time.
0 commit comments