diff --git a/agent-todo/package.json b/agent-todo/package.json index 813b385..f7661b7 100644 --- a/agent-todo/package.json +++ b/agent-todo/package.json @@ -10,7 +10,7 @@ "event": "tsx eventAgent.ts" }, "dependencies": { - "@restackio/ai": "^0.0.109", + "@restackio/ai": "^0.0.121", "@temporalio/workflow": "1.11.6", "dotenv": "^16.4.7", "openai": "^4.80.1", diff --git a/agent-todo/src/agents/agent.ts b/agent-todo/src/agents/agent.ts index d2a15bd..c382e0c 100644 --- a/agent-todo/src/agents/agent.ts +++ b/agent-todo/src/agents/agent.ts @@ -67,6 +67,7 @@ export async function agentTodo(): Promise { child: executeTodoWorkflow, childId: workflowId, input: JSON.parse(toolCall.function.arguments), + taskQueue: "todo-workflows", }); agentMessages.push({ diff --git a/agent-todo/src/services.ts b/agent-todo/src/services.ts index 6ca6cc6..cf36d6b 100644 --- a/agent-todo/src/services.ts +++ b/agent-todo/src/services.ts @@ -18,6 +18,7 @@ async function services() { }), client.startService({ workflowsPath: workflowsPath, + taskQueue: "todo-workflows", functions: { getRandom, getResult }, }), ]); diff --git a/agent-todo/src/workflows/executeTodo.ts b/agent-todo/src/workflows/executeTodo.ts index c50ea4c..5a1a725 100644 --- a/agent-todo/src/workflows/executeTodo.ts +++ b/agent-todo/src/workflows/executeTodo.ts @@ -17,13 +17,13 @@ export async function executeTodoWorkflow({ todoTitle, todoId, }: Input): Promise { - const random = await step({}).getRandom({ + const random = await step({taskQueue: "todo-workflows",}).getRandom({ todoTitle, }); await sleep(2000); - const result = await step({}).getResult({ + const result = await step({taskQueue: "todo-workflows",}).getResult({ todoTitle, todoId, });