Allow me to pass custom sessionId and state json on the ADK Web
Is your feature request related to a problem? Please describe. I'm frustrated that while the ADK Web allows basic testing, it does not allow me to pick my own sessionId, nor to pass a custom state to the user.
The google adk documentation shows an example createSession endpoint call: {URL}/apps/{appname}/users/{username}/sessions/{sessionId} This request also has a JSON body that allows us to pass custom session key/value pairs, that can be used for more complex agents. e.g. : { "state": { "test_number": 95 }, "userdata": { "user_name": "miguel" } }
In the request above I am able to pick the agent (which google adk already allows me to do), a user, and a sessionId. In adk web I am unaware what user it picks and it is sending its own sessionId. I can also not pass the custom state, so if my tools or the agent system use them, I cant test.
Describe the solution you'd like I feel the solution is simple, when creating a new chat, allow me to either just have it create it randomly as it does, or do it passing myself the values I need (user, sessionId, state json). It would be a quick solution that would go very far in allowing me to test complex agents.
Describe alternatives you've considered I have to either use postman or curl which is not ideal to visualize agentic workflows, or a custom frontend.
Hi this is in our roadmap, and we are aware of this feature request. Thanks!
I also need to operate state with ui, look forward to this function
One trick that i use currently to handle this:
- retain the browse tab that has the desired session
- have a Database session service, stop/start the server in the terminal
- edit the session events and states directly in some dbms gui tool - these values are stored in
sessions(.state) andeventstables - So now when you start sending new messages in the same tab, it has the context you made
Seems like parts of this are already in the codebase and is behind a feature flag https://github.com/google/adk-web/blob/main/src/app/components/chat/chat.component.html#L276
You can try building the angular app put this in adk-python browser folder or just wait for the next release 😉