Replies: 2 comments
-
Additionally, I’d like to store user-specific credential information inside the agent’s session for use during function calls. Since these credentials are sensitive, I plan to set add_state_in_messages=False to prevent them from being sent to the LLM. In my function, I would access this session-level state as shown below: def my_function_tool(agent: object, data: dict): I’d like to confirm the following:
Alternatively, is there a more elegant or recommended way in Agno to securely handle user-specific credential information when triggering a function call through the agent? |
Beta Was this translation helpful? Give feedback.
-
Hey @YZx0pa |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I’d like to check if there’s a recommended way to fetch the session_state from an agent more flexibly.
In my setup, I’m running the agent inside a FastAPI app. The agent is instantiated when the server starts, and multiple users interact with it via API calls. For each request, I call agent.run(user_input, user_id=...), which may trigger function calls and update dynamic data into session_state (e.g., a dictionary collecting information throughout the chat).
Currently, it seems I can only access the correct session_state after calling agent.run(...). However, I’d like to know if there’s a way to directly retrieve(or even update the session_state) by the user_id or session_id, similar to how agent.get_messages_for_session() works — without needing to run the agent first.
Could you please advise if there's a cleaner or more flexible way to handle this in Agno?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions