New

agent: implement transfer_to_agent tool (#30)

Hyang-Ah Hana Kim
2 months ago

Commit: 40c8eff

Date: July 11, 2025 at 8:08 PM

  • Remove singleFlow vs autoFlow.
  • The new agentTransferRequestProcessor sets up the instruction

and the generate content config depending on whether the parent

and subagents exist, and whether the Disallow flags are set.

Unlike python/java SDK where the transfertoagent tool is implemented

as a FunctionTool, we implement this as a custom tool since it requires

access to the ToolContext, and we are not exposing the ToolContext to

user's function tool.

TODO: actual action of transferring to the target agent occurs

after the tool runs and while inspecting the tool context. That is

not included in this PR.

  • Also made the LLMRequest.AppendInstructions to initialize the

generate content config field if it's not set.