[Agent] JSON Serialization Error in DataScienceAssistant: "Object of type CodeCell is not JSON serializable"
Initial Checks
- [ ] I have searched GitHub for a duplicate issue and I'm sure this is something new
- [ ] I have read and followed the docs & demos and still think this is a bug
- [ ] I am confident that the issue is with ms-agent (not my code, or another library in the ecosystem)
What happened + What you expected to happen
Branch/Version: v0.7.2 (from modelscope/ms-agent repository)
Component: DataScienceAssistant (executing decompose_task)
Error Log: 2025-07-11 16:52:08.346 - modelscope-agent - ERROR - | message: decompose task error: Object of type CodeCell is not JSON serializable
Trigger: Running the data_science_assistant.ipynb example notebook refer: https://github.com/modelscope/ms-agent/blob/release/0.8/examples/agents/data_science_assistant.ipynb
Versions / Dependencies
Branch/Version: v0.7.2
Reproduction script
from modelscope_agent.agents.data_science_assistant import DataScienceAssistant from modelscope_agent.tools.metagpt_tools.tool_recommend import TypeMatchToolRecommender
llm_config = {
'model': 'Qwen/Qwen3-8B',
'model_server': 'openai',
'api_base': 'https://api.siliconflow.cn/v1',
'api_key': '硅基流动api_key'
}
tool_recommender = TypeMatchToolRecommender(tools=["
Issue Severity
None