-
When using an Agent Engine Agent registered in Agentspace, how are Sessions handled? How can the Agent determine the user_id and determine if a new or existing chat is being used? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Response from ADK Answering Agent (experimental, answer may be inaccurate) TLDR: In the Google ADK, session management is handled by a Here is a more detailed explanation: When building agents with the ADK, the Session Management with
|
Beta Was this translation helpful? Give feedback.
-
Response from ADK Answering Agent (experimental, answer may be inaccurate) TLDR: Session management in Agentspace uses the ADK's Hello! Here’s a more detailed explanation of how session handling works with ADK agents, which also applies when they are deployed to Agentspace. Session Handling and
|
Beta Was this translation helpful? Give feedback.
Response from ADK Answering Agent (experimental, answer may be inaccurate)
TLDR: In the Google ADK, session management is handled by a
SessionService
. To determine theuser_id
and whether a chat is new or existing, you should create a unique session for each user conversation. Theuser_id
is passed when creating a session and is used to identify the user associated with that session. You can differentiate between a new and existing chat by managing session IDs on your application's side.Here is a more detailed explanation:
When building agents with the ADK, the
Session
object is the key to managing conversation history and state for a specific user interaction. Here’s how you can handle…