Skip to content

Error: Object of type datetime is not JSON serializable #7073

@knowonething

Description

@knowonething

What happened?

Describe the bug

When running the example app_team.py from agentchat_fastapi directory using autogen 0.7.5, an error occurs right after sending a message from the user.
The webpage displays:

error
Error: Object of type datetime is not JSON serializable

To Reproduce

uv pip install -U "autogen-agentchat" "autogen-ext"
python app_team.py

Expected behavior

The user message should be sent successfully, and the agents should respond as expected without any serialization errors.

Screenshots

Image

Additional context

This issue does not occur in autogen 0.5.7.

Which packages was the bug in?

Python AgentChat (autogen-agentchat>=0.4.0)

AutoGen library version.

Python 0.7.5

Other library version.

No response

Model used

No response

Model provider

None

Other model provider

No response

Python version

None

.NET version

None

Operating system

None

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions