-
Notifications
You must be signed in to change notification settings - Fork 60
Open
Description
Hey,
It's looping on the same tool over and over again even thought the tool returns a positive result.
I set the maxSteps to 5 so it shouldn't go past 5 calls. But what's even more important is why is it even looping in the first place ?
export const assistantAgent = new Agent<AgentContext>(components.agent, {
name: "Agent",
languageModel: gpt5nano,
textEmbeddingModel: textEmbeddingModel,
instructions: instructions,
tools: { promptBuilder, generateImage },
stopWhen: [hasToolCall("generateImage")],
//[...]
maxSteps: 5,
});

Metadata
Metadata
Assignees
Labels
No labels