Skip to content

.NET: [Bug]: serialization related bugs/inconsistency in implementation or documentation #8016

Closed

Description

@dsslight

Description

For the Declarative workflow documentation

Objects sent to workflow are converted to ChatMessage instances by using ToString(), which requires a workaround - serialization in toString() method as implementation.
The declarative workflow documentation says custom serializers are supported, but making them work requires a lot of experimentation and is deprioritized in my use case by problem #7977
(that tool calls do not work as expected, so no major need for that as I can handle it in the code).
So would be great to have proper and tested samples how to turn serialization on smoothly and reliably.

Code Sample

Error Messages / Stack Traces

Package Versions

Microsoft.Agents.AI.Workflows.Declarative

.NET Version

.NET 10.0.300

Additional Context

documentation related issue

Activity

  1. added
    .NET
    triage
    on Sep 2, 2026
  2. UniversePeak commented on Sep 3, 2026

    @UniversePeak
    Contributor

    I checked the C# implementation and the declarative workflow guidance. For non-ChatMessage inputs, DeclarativeWorkflowBuilder currently uses ToString() unless callers provide the documented inputTransform, while the serializer example is only shown for checkpoint state. I’d like to add a tested, copyable C# example showing a custom JsonSerializerContext and inputTransform, and clarify that checkpoint serializer registration does not automatically transform the initial workflow input.

  3. removed
    triage
    on Sep 4, 2026
  4. baywet commented on Sep 4, 2026

    @baywet
    Member

    Hi dsslight
    Thank you for using the SDK and for reaching out.

    Hi 宇宙的山峰 (@UniversePeak) thanks for putting a pull request together, we'll get this merged as soon as possible to get things in order.

    Let me know if you have any additional comments or questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    .NET

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions