8000 chore: Adds docstring for LlmAgent.disallow_transfer_to_parent to cla… · DarioMR1/adk-python@b67182c · GitHub
[go: up one dir, main page]

Skip to content

Commit b67182c

Browse files
Jacksunweicopybara-github
authored andcommitted
chore: Adds docstring for LlmAgent.disallow_transfer_to_parent to clarify the expected behavior.
PiperOrigin-RevId: 758676926
1 parent 71bd808 commit b67182c

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

src/google/adk/agents/llm_agent.py

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,13 @@
1616

1717
import inspect
1818
import logging
19-
from typing import (
20-
Any,
21-
AsyncGenerator,
22-
Awaitable,
23-
Callable,
24-
Literal,
25-
Optional,
26-
Union,
27-
)
19+
from typing import Any
20+
from typing import AsyncGenerator
21+
from typing import Awaitable
22+
from typing import Callable
23+
from typing import Literal
24+
from typing import Optional
25+
from typing import Union
2826

2927
from google.genai import types
3028
from pydantic import BaseModel
@@ -152,7 +150,12 @@ class LlmAgent(BaseAgent):
152150

153151
# LLM-based agent transfer configs - Start
154152
disallow_transfer_to_parent: bool = False
155-
"""Disallows LLM-controlled transferring to the parent agent."""
153+
"""Disallows LLM-controlled transferring to the parent agent.
154+
155+
NOTE: Setting this as True also prevents this agent to continue reply to the
156+
end-user. This behavior prevents one-way transfer, in which end-user may be
157+
stuck with one agent that cannot transfer to other agents in the agent tree.
158+
"""
156159
disallow_transfer_to_peers: bool = False
157160
"""Disallows LLM-controlled transferring to the peer agents."""
158161
# LLM-based agent transfer configs - End

0 commit comments

Comments
 (0)
0