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
And usually if I want to add something to the state through my backend I pass the new state as EventAction like this:
# 1. Assign the keys to update in the state:
delta = {key_to_update: new_key_value}
# 2. Pass them as Event
event = Event(
invocation_id=str(uuid.uuid4()),
author="system", # or the agent’s name
actions=EventActions(state_delta=delta),
timestamp=time.time(), # optional but good practice
)
# 3. Append the event to your state
session_service.append_event(session=end_session, event=event)
But the append_event method doesn't seem to be available when the Agent is deployed.
Any idea on how to inject new values to the state of a session in a deployed agent?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I have a deployed agent in Vertex AI. I can access to it with
remote_app = agent_engines.get(RESOURCE_NAME)
If I want to create a session, I do it like this:
session_service = remote_app.create_session(user_id=f"u_{uuid.uuid4().hex[:8]}")
And usually if I want to add something to the state through my backend I pass the new state as
EventAction
like this:But the
append_event
method doesn't seem to be available when the Agent is deployed.Any idea on how to inject new values to the state of a session in a deployed agent?
Beta Was this translation helpful? Give feedback.
All reactions