chore: add invocation_id to AgentRunRequest for resuming long running functions

PiperOrigin-RevId: 816362937
This commit is contained in:
Yifan Wang
2025-10-07 13:49:50 -07:00
committed by Copybara-Service
parent 2699ad7aff
commit 5ac446d947
+3
View File
@@ -172,6 +172,8 @@ class RunAgentRequest(common.BaseModel):
new_message: types.Content
streaming: bool = False
state_delta: Optional[dict[str, Any]] = None
# for resume long running functions
invocation_id: Optional[str] = None
class CreateSessionRequest(common.BaseModel):
@@ -1386,6 +1388,7 @@ class AdkWebServer:
new_message=req.new_message,
state_delta=req.state_delta,
run_config=RunConfig(streaming_mode=stream_mode),
invocation_id=req.invocation_id,
)
) as agen:
async for event in agen: