You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/agents-core/src/agent.ts
+14Lines changed: 14 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -556,6 +556,20 @@ export class Agent<
556
556
context,
557
557
...(runOptions??{}),
558
558
});
559
+
560
+
constusesStopAtToolNames=
561
+
typeofthis.toolUseBehavior==='object'&&
562
+
this.toolUseBehavior!==null&&
563
+
'stopAtToolNames'inthis.toolUseBehavior;
564
+
565
+
if(
566
+
typeofcustomOutputExtractor!=='function'&&
567
+
usesStopAtToolNames
568
+
){
569
+
logger.debug(
570
+
`You're passing the agent (name: ${this.name}) with toolUseBehavior.stopAtToolNames configured as a tool to a different agent; this may not work as you expect. You may want to have a wrapper function tool to consistently return the final output.`,
`You're passing the agent (name: Stopper Agent) with toolUseBehavior.stopAtToolNames configured as a tool to a different agent; this may not work as you expect. You may want to have a wrapper function tool to consistently return the final output.`,
211
+
);
212
+
});
213
+
189
214
it('allows configuring needsApproval when using an agent as a tool',async()=>{
0 commit comments