agentscope.serialize module

The serialization module for the package.

agentscope.serialize.serialize(obj: Any) str[source]

Serialize the object to a JSON string.

For AgentScope, this function supports to serialize Msg object for now.

agentscope.serialize.deserialize(s: str) Any[source]

Deserialize the JSON string to an object

For AgentScope, this function supports to serialize Msg object for now.

agentscope.serialize.is_serializable(obj: Any) bool[source]

Check if the object is serializable in the scope of AgentScope.