Hi Team, Is the `AgentSession._chat_ctx` just a b...
# agents
c
Hi Team, Is the
AgentSession._chat_ctx
just a backlog that isn't actually used? I saw that it's kinda loosely synced with
Agent._chat_ctx
, while that's the actual correct context. I wonder if we could remove it in the future for clarity concerns. Thanks
r
You should not use the variabled that are prefixed with
_
. That denote private internal variable that can go away at any time.
c
Thanks for the reply, but it's indeed exported via
AgentSession.history
, while it only contains conversational messages excluding the system prompt, and there's no way to update it. We can use
update_chat_ctx
on the
Agent
to update the
Agent
's
chat_ctx
, but not
AgentSession
's. I'm wondering whether we should remove
AgentSession.history
(since it's not being used) or document this loosely-synchronised behaviour.