moving run agent to tests & agnostic run working

This commit is contained in:
Silen Naihin
2023-06-30 10:50:54 -04:00
parent fce421fb33
commit 2987d71264
13 changed files with 144 additions and 135 deletions

10
agent/hook.py Normal file
View File

@@ -0,0 +1,10 @@
async def run_specific_agent(task, conn):
while (
not conn.poll()
): # Check if there's a termination signal from the main process
response, cycle_count = await run_agent(
task
) # run the agent and get the response and cycle count
# Send response and cycle count back to the main process
conn.send((response, cycle_count))