adk-typescript
Version:
TypeScript port of Google's Agent Development Kit (ADK)
39 lines (38 loc) • 1.71 kB
TypeScript
import { SingleFlow } from './SingleFlow';
import { BaseLlmRequestProcessor, BaseLlmResponseProcessor } from './BaseLlmProcessor';
/**
* AutoFlow is SingleFlow with agent transfer capability.
*
* Agent transfer is allowed in the following directions:
*
* 1. from parent to sub-agent;
* 2. from sub-agent to parent;
* 3. from sub-agent to its peer agents;
*
* For peer-agent transfers, it's only enabled when all below conditions are met:
*
* - The parent agent is also of AutoFlow;
* - `allowTransferToPeer` option of this agent is not set to false (default is true).
*
* Depending on the target agent flow type, the transfer may be automatically
* reversed. The condition is as below:
*
* - If the flow type of the transferee agent is also auto, transferee agent will
* remain as the active agent. The transferee agent will respond to the user's
* next message directly.
* - If the flow type of the transferee agent is not auto, the active agent will
* be reversed back to previous agent.
*
* Note: AutoFlow inherits _runOneStepAsync from BaseLlmFlow via SingleFlow, which
* properly handles function calls including transfer_to_agent. This matches the
* Python implementation where both classes inherit this method from BaseLlmFlow.
*/
export declare class AutoFlow extends SingleFlow {
/**
* Creates a new AutoFlow instance with agent transfer capability.
*
* @param additionalRequestProcessors Additional request processors to use
* @param additionalResponseProcessors Additional response processors to use
*/
constructor(additionalRequestProcessors?: BaseLlmRequestProcessor[], additionalResponseProcessors?: BaseLlmResponseProcessor[]);
}