feat(config): support output_key and include_contents in LlmAgentConfig

PiperOrigin-RevId: 782170665
This commit is contained in:
Liang Wu
2025-07-11 17:47:42 -07:00
committed by Copybara-Service
parent b2ef9a069e
commit 48971d43d0
2 changed files with 31 additions and 0 deletions
@@ -76,6 +76,27 @@
],
"default": null,
"title": "Disallow Transfer To Peers"
},
"output_key": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Output Key"
},
"include_contents": {
"default": "default",
"enum": [
"default",
"none"
],
"title": "Include Contents",
"type": "string"
}
},
"required": [
+10
View File
@@ -537,6 +537,10 @@ class LlmAgent(BaseAgent):
agent.disallow_transfer_to_parent = config.disallow_transfer_to_parent
if config.disallow_transfer_to_peers:
agent.disallow_transfer_to_peers = config.disallow_transfer_to_peers
if config.include_contents != 'default':
agent.include_contents = config.include_contents
if config.output_key:
agent.output_key = config.output_key
return agent
@@ -562,3 +566,9 @@ class LlmAgentConfig(BaseAgentConfig):
disallow_transfer_to_peers: Optional[bool] = None
"""Optional. LlmAgent.disallow_transfer_to_peers."""
output_key: Optional[str] = None
"""Optional. LlmAgent.output_key."""
include_contents: Literal['default', 'none'] = 'default'
"""Optional. LlmAgent.include_contents."""