You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ChatAgent has a method save_state() that exports the internal state of the agent, and a load_state() method to bring the agent back to an existing state.
agent=AssistantAgent(...)
state=awaitagent.save_state()
# The state can be used to bring the agent back to an existing state. awaitagent.load_state(state)
Same with team
team=RoundRobinGroupChat(...)
state=awaitteam.save_state()
# The team itself can be brought back to a previous stateawaitteam.load_state(state)
Same with termination condition
termiantion=MaxMessageTermination(12)
state=awaittermination.save_state()
# Bring the termination condition state back.awaittermination.load_state(state)
The team's state can optionally include all the participant agents' state recursively, and with that you don't need to update the agents separately.
What this doesn't solve: It is not a replacement for a complete serialization because you still need to construct the agent and team instances, and you still need to know the parameters you need to configure. The save_state and load_state methods should be used in conjunction with #4007 to perform complete serialization and deserialization.
Why is this needed?
In web services, it's desirable to not have persistent in-memory state. So, when user is idle the state is kept off the heap to allow more scaling. This requires the agents and teams to be able to save its state and rehydrate from a previous state snapshot.
The text was updated successfully, but these errors were encountered:
What feature would you like to be added?
ChatAgent
has a methodsave_state()
that exports the internal state of the agent, and aload_state()
method to bring the agent back to an existing state.Same with team
Same with termination condition
The team's state can optionally include all the participant agents' state recursively, and with that you don't need to update the agents separately.
What this doesn't solve: It is not a replacement for a complete serialization because you still need to construct the agent and team instances, and you still need to know the parameters you need to configure. The
save_state
andload_state
methods should be used in conjunction with #4007 to perform complete serialization and deserialization.Why is this needed?
In web services, it's desirable to not have persistent in-memory state. So, when user is idle the state is kept off the heap to allow more scaling. This requires the agents and teams to be able to save its state and rehydrate from a previous state snapshot.
The text was updated successfully, but these errors were encountered: