docs(agent): update steering docs for deferred tool execution closes #2330
This commit is contained in:
@@ -304,8 +304,9 @@ export class Agent {
|
||||
}
|
||||
|
||||
/**
|
||||
* Queue a steering message to interrupt the agent mid-run.
|
||||
* Delivered after current tool execution, skips remaining tools.
|
||||
* Queue a steering message while the agent is running.
|
||||
* Delivered after the current assistant turn finishes executing its tool calls,
|
||||
* before the next LLM call.
|
||||
*/
|
||||
steer(m: AgentMessage) {
|
||||
this.steeringQueue.push(m);
|
||||
|
||||
@@ -159,9 +159,9 @@ export interface AgentLoopConfig extends SimpleStreamOptions {
|
||||
/**
|
||||
* Returns steering messages to inject into the conversation mid-run.
|
||||
*
|
||||
* Called after each tool execution to check for user interruptions.
|
||||
* If messages are returned, remaining tool calls are skipped and
|
||||
* these messages are added to the context before the next LLM call.
|
||||
* Called after the current assistant turn finishes executing its tool calls.
|
||||
* If messages are returned, they are added to the context before the next LLM call.
|
||||
* Tool calls from the current assistant message are not skipped.
|
||||
*
|
||||
* Use this for "steering" the agent while it's working.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user