Skip to content
Discussion options

You must be logged in to vote

@tschokokuki Those are both valid options; however, I believe a third approach may be work better.

A few comments about the options you listed:

Option 1 (returning StateDeltaEvent directly) has a fundamental issue: FunctionResultContent.result expects JSON-serializable data, not event objects. This is why you're seeing serialization failures and result: null in thread state. The result_message field is a workaround that introduces coupling between the event schema and the result schema.

Option 2 (Dict with marker) avoids the serialization issue but introduces sentinel detection ( __agui_event__ ), pollutes the result schema, and creates artifacts in thread state that downstream consumers …

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@tschokokuki
Comment options

@moonbox3
Comment options

Answer selected by tschokokuki
@tschokokuki
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants