You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Request for clarification: How granular is Event persistence (in VertexAIServiceSession/DatabaseServiceSession) for long tasks #2098
Hello, I looked at source and in Docs, but couldn't find a definite answer. I'm looking at the Session Lifecycle. Is the session restored from last Event or User message? I'd think Event but the docs suggest from user Message? Or last "finished" event? Can you clarify which one?
Consider this scenario:
I'm using VertexAIServiceSession for persistence. I have a complex custom agent. The agent sends multiple assistant msgs before the next user msg. It has following code:
asyncforeventinself.subagent.run_async(ctx):
awaitlong_function() # takes a minute to returnyieldevent
For the sake of the argument, long_function takes a minute to finish and produces no Events.
What happens if the application is restarted while Code execution is happening in long_function? Is the session restored from last user message? Or from last Yielded event? If from Event, is this event re-processed (that is, long_function is executed twice)? Thank you very much.
Activity