So this is a pattern that we are struggling a little bit. Each time a user prompts a Think agent, we need certain information to be on the state. Things like the user_id that prompted the agent, the workspace id, and so on. We need this information to do things like observability, fetch mcps from the db, etc...
Right now, this requires saving things on the state of the agent (or using dynamic configuration) and then hoping for the best. Type-wise is frustrating because both agent state and dynamic configuration are nullable to acknowledge the stateful nature of the agent.
How do you deal with this? Are we holding it wrong?
So this is a pattern that we are struggling a little bit. Each time a user prompts a Think agent, we need certain information to be on the state. Things like the user_id that prompted the agent, the workspace id, and so on. We need this information to do things like observability, fetch mcps from the db, etc...
Right now, this requires saving things on the state of the agent (or using dynamic configuration) and then hoping for the best. Type-wise is frustrating because both agent state and dynamic configuration are nullable to acknowledge the stateful nature of the agent.
How do you deal with this? Are we holding it wrong?