Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some messages published from python are routed to the agent but result in either Unhandled Message or Unknown Payload. #4501

Open
rysweet opened this issue Dec 3, 2024 · 0 comments · May be fixed by #4502
Assignees
Labels
size-small takes 1-2 days x-lang
Milestone

Comments

@rysweet
Copy link
Collaborator

rysweet commented Dec 3, 2024

What happened?

log from aspire dashboard:
error: ""
46
2024-12-03T13:12:42
stderr }
47
2024-12-03T13:12:42
stderr
48
2024-12-03T13:12:42
stderr INFO:autogen_core:Put message in receive queue
49
2024-12-03T13:12:42
stderr INFO:autogen_core:Waiting for message from host
50
2024-12-03T13:12:42
stderr INFO:autogen_core:Getting message from queue
51
2024-12-03T13:12:42
stderr INFO:autogen_core:Send message to host: addSubscriptionRequest {
52
2024-12-03T13:12:42
stderr request_id: "3"
53
2024-12-03T13:12:42
stderr subscription {
54
2024-12-03T13:12:42
stderr typeSubscription {
55
2024-12-03T13:12:42
stderr topic_type: "default"
56
2024-12-03T13:12:42
stderr agent_type: "HelloAgents"
57
2024-12-03T13:12:42
stderr }
58
2024-12-03T13:12:42
stderr }
59
2024-12-03T13:12:42
stderr }
60
2024-12-03T13:12:42
stderr
61
2024-12-03T13:12:42
stderr INFO:autogen_core:Put message in send queue
62
2024-12-03T13:12:42
stderr INFO:autogen_core:Received a message from host: addSubscriptionResponse {
63
2024-12-03T13:12:42
stderr request_id: "3"
64
2024-12-03T13:12:42
stderr success: true
65
2024-12-03T13:12:42
stderr error: ""
66
2024-12-03T13:12:42
stderr }
67
2024-12-03T13:12:42
stderr
68
2024-12-03T13:12:42
stderr INFO:autogen_core:Put message in receive queue
69
2024-12-03T13:12:42
stderr INFO:autogen_core:Waiting for message from host
70
2024-12-03T13:12:42
stderr INFO:autogen_core:Getting message from queue
71
2024-12-03T13:12:42
stderr INFO:autogen_core:Send message to host: addSubscriptionRequest {
72
2024-12-03T13:12:42
stderr request_id: "4"
73
2024-12-03T13:12:42
stderr subscription {
74
2024-12-03T13:12:42
stderr typeSubscription {
75
2024-12-03T13:12:42
stderr topic_type: "agents.NewMessageReceived"
76
2024-12-03T13:12:42
stderr agent_type: "HelloAgents"
77
2024-12-03T13:12:42
stderr }
78
2024-12-03T13:12:42
stderr }
79
2024-12-03T13:12:42
stderr }
80
2024-12-03T13:12:42
stderr
81
2024-12-03T13:12:42
stderr INFO:autogen_core:Put message in send queue
82
2024-12-03T13:12:42
stderr INFO:autogen_core:Received a message from host: addSubscriptionResponse {
83
2024-12-03T13:12:42
stderr request_id: "4"
84
2024-12-03T13:12:42
stderr success: true
85
2024-12-03T13:12:42
stderr error: ""
86
2024-12-03T13:12:42
stderr }
87
2024-12-03T13:12:42
stderr
88
2024-12-03T13:12:42
stderr INFO:autogen_core:Put message in receive queue
89
2024-12-03T13:12:42
stderr INFO:autogen_core:Waiting for message from host
90
2024-12-03T13:12:42
stderr INFO:autogen_core:Getting message from queue
91
2024-12-03T13:12:42
stderr INFO:autogen_core:Send message to host: addSubscriptionRequest {
92
2024-12-03T13:12:42
stderr request_id: "5"
93
2024-12-03T13:12:42
stderr subscription {
94
2024-12-03T13:12:42
stderr typeSubscription {
95
2024-12-03T13:12:42
stderr topic_type: "agents.ConversationClosed"
96
2024-12-03T13:12:42
stderr agent_type: "HelloAgents"
97
2024-12-03T13:12:42
stderr }
98
2024-12-03T13:12:42
stderr }
99
2024-12-03T13:12:42
stderr }
100
2024-12-03T13:12:42
stderr
101
2024-12-03T13:12:42
stderr INFO:autogen_core:Put message in send queue
102
2024-12-03T13:12:42
stderr INFO:autogen_core:Received a message from host: addSubscriptionResponse {
103
2024-12-03T13:12:42
stderr request_id: "5"
104
2024-12-03T13:12:42
stderr success: true
105
2024-12-03T13:12:42
stderr error: ""
106
2024-12-03T13:12:42
stderr }
107
2024-12-03T13:12:42
stderr
108
2024-12-03T13:12:42
stderr INFO:autogen_core:Put message in receive queue
109
2024-12-03T13:12:42
stderr INFO:autogen_core:Waiting for message from host
110
2024-12-03T13:12:42
stderr INFO:autogen_core:Getting message from queue
111
2024-12-03T13:12:42
stderr INFO:autogen_core:Send message to host: addSubscriptionRequest {
112
2024-12-03T13:12:42
stderr request_id: "6"
113
2024-12-03T13:12:42
stderr subscription {
114
2024-12-03T13:12:42
stderr typeSubscription {
115
2024-12-03T13:12:42
stderr topic_type: "agents.Output"
116
2024-12-03T13:12:42
stderr agent_type: "HelloAgents"
117
2024-12-03T13:12:42
stderr }
118
2024-12-03T13:12:42
stderr }
119
2024-12-03T13:12:42
stderr }
120
2024-12-03T13:12:42
stderr
121
2024-12-03T13:12:42
stderr INFO:autogen_core:Put message in send queue
122
2024-12-03T13:12:42
stderr INFO:autogen_core:Received a message from host: addSubscriptionResponse {
123
2024-12-03T13:12:42
stderr request_id: "6"
124
2024-12-03T13:12:42
stderr success: true
125
2024-12-03T13:12:42
stderr error: ""
126
2024-12-03T13:12:42
stderr }
127
2024-12-03T13:12:42
stderr
128
2024-12-03T13:12:42
stderr INFO:autogen_core:Put message in receive queue
129
2024-12-03T13:12:42
stderr INFO:autogen_core:Waiting for message from host
130
2024-12-03T13:12:42
stderr INFO:autogen_core:Getting message from queue
131
2024-12-03T13:12:42
stderr INFO:autogen_core:3
132
2024-12-03T13:12:42
stderr INFO:autogen_core:Send message to host: cloudEvent {
133
2024-12-03T13:12:42
stderr id: "d52e7f37-17fd-4a4a-9758-d04ddd1da4eb"
134
2024-12-03T13:12:42
stderr source: "HelloAgents/python"
135
2024-12-03T13:12:42
stderr spec_version: "1.0"
136
2024-12-03T13:12:42
stderr type: "agents.NewMessageReceived"
137
2024-12-03T13:12:42
stderr attributes {
138
2024-12-03T13:12:42
stderr key: "dataschema"
139
2024-12-03T13:12:42
stderr value {
140
2024-12-03T13:12:42
stderr ce_string: "NewMessageReceived"
141
2024-12-03T13:12:42
stderr }
142
2024-12-03T13:12:42
stderr }
143
2024-12-03T13:12:42
stderr attributes {
144
2024-12-03T13:12:42
stderr key: "datacontenttype"
145
2024-12-03T13:12:42
stderr value {
146
2024-12-03T13:12:42
stderr ce_string: "application/x-protobuf"
147
2024-12-03T13:12:42
stderr }
148
2024-12-03T13:12:42
stderr }
149
2024-12-03T13:12:42
stderr attributes {
150
2024-12-03T13:12:42
stderr key: "agmsgkind"
151
2024-12-03T13:12:42
stderr value {
152
2024-12-03T13:12:42
stderr ce_string: "publish"
153
2024-12-03T13:12:42
stderr }
154
2024-12-03T13:12:42
stderr }
155
2024-12-03T13:12:42
stderr attributes {
156
2024-12-03T13:12:42
stderr key: "agagentsendertype"
157
2024-12-03T13:12:42
stderr value {
158
2024-12-03T13:12:42
stderr ce_string: "HelloAgents"
159
2024-12-03T13:12:42
stderr }
160
2024-12-03T13:12:42
stderr }
161
2024-12-03T13:12:42
stderr attributes {
162
2024-12-03T13:12:42
stderr key: "agagentsenderkey"
163
2024-12-03T13:12:42
stderr value {
164
2024-12-03T13:12:42
stderr ce_string: "python"
165
2024-12-03T13:12:42
stderr }
166
2024-12-03T13:12:42
stderr }
167
2024-12-03T13:12:42
stderr proto_data {
168
2024-12-03T13:12:42
stderr type_url: "type.googleapis.com/agents.NewMessageReceived"
169
2024-12-03T13:12:42
stderr value: "\n\014from Python!"
170
2024-12-03T13:12:42
stderr }
171
2024-12-03T13:12:42
stderr }
172
2024-12-03T13:12:42
stderr
173
2024-12-03T13:12:42
stderr INFO:autogen_core:Put message in send queue
174
2024-12-03T13:12:42
stderr INFO:autogen_core:Send message to host: cloudEvent {
175
2024-12-03T13:12:42
stderr id: "90312788-9d3a-4f49-8438-1db84b571c12"
176
2024-12-03T13:12:42
stderr source: "HelloAgents/python"
177
2024-12-03T13:12:42
stderr spec_version: "1.0"
178
2024-12-03T13:12:42
stderr type: "agents.Output"
179
2024-12-03T13:12:42
stderr attributes {
180
2024-12-03T13:12:42
stderr key: "dataschema"
181
2024-12-03T13:12:42
stderr value {
182
2024-12-03T13:12:42
stderr ce_string: "Output"
183
2024-12-03T13:12:42
stderr }
184
2024-12-03T13:12:42
stderr }
185
2024-12-03T13:12:42
stderr attributes {
186
2024-12-03T13:12:42
stderr key: "datacontenttype"
187
2024-12-03T13:12:42
stderr value {
188
2024-12-03T13:12:42
stderr ce_string: "application/x-protobuf"
189
2024-12-03T13:12:42
stderr }
190
2024-12-03T13:12:42
stderr }
191
2024-12-03T13:12:42
stderr attributes {
192
2024-12-03T13:12:42
stderr key: "agmsgkind"
193
2024-12-03T13:12:42
stderr value {
194
2024-12-03T13:12:42
stderr ce_string: "publish"
195
2024-12-03T13:12:42
stderr }
196
2024-12-03T13:12:42
stderr }
197
2024-12-03T13:12:42
stderr attributes {
198
2024-12-03T13:12:42
stderr key: "agagentsendertype"
199
2024-12-03T13:12:42
stderr value {
200
2024-12-03T13:12:42
stderr ce_string: "HelloAgents"
201
2024-12-03T13:12:42
stderr }
202
2024-12-03T13:12:42
stderr }
203
2024-12-03T13:12:42
stderr attributes {
204
2024-12-03T13:12:42
stderr key: "agagentsenderkey"
205
2024-12-03T13:12:42
stderr value {
206
2024-12-03T13:12:42
stderr ce_string: "python"
207
2024-12-03T13:12:42
stderr }
208
2024-12-03T13:12:42
stderr }
209
2024-12-03T13:12:42
stderr proto_data {
210
2024-12-03T13:12:42
stderr type_url: "type.googleapis.com/agents.Output"
211
2024-12-03T13:12:42
stderr value: "\n)^v^v^v---Wild Hello from Python!---^v^v^v"
212
2024-12-03T13:12:42
stderr }
213
2024-12-03T13:12:42
stderr }
214
2024-12-03T13:12:42
stderr
215
2024-12-03T13:12:42
stderr INFO:autogen_core:Put message in send queue
216
2024-12-03T13:12:42
stderr INFO:autogen_core:Received a message from host: cloudEvent {
217
2024-12-03T13:12:42
stderr id: "d52e7f37-17fd-4a4a-9758-d04ddd1da4eb"
218
2024-12-03T13:12:42
stderr source: "HelloAgents/python"
219
2024-12-03T13:12:42
stderr spec_version: "1.0"
220
2024-12-03T13:12:42
stderr type: "agents.NewMessageReceived"
221
2024-12-03T13:12:42
stderr attributes {
222
2024-12-03T13:12:42
stderr key: "dataschema"
223
2024-12-03T13:12:42
stderr value {
224
2024-12-03T13:12:42
stderr ce_string: "NewMessageReceived"
225
2024-12-03T13:12:42
stderr }
226
2024-12-03T13:12:42
stderr }
227
2024-12-03T13:12:42
stderr attributes {
228
2024-12-03T13:12:42
stderr key: "datacontenttype"
229
2024-12-03T13:12:42
stderr value {
230
2024-12-03T13:12:42
stderr ce_string: "application/x-protobuf"
231
2024-12-03T13:12:42
stderr }
232
2024-12-03T13:12:42
stderr }
233
2024-12-03T13:12:42
stderr attributes {
234
2024-12-03T13:12:42
stderr key: "agmsgkind"
235
2024-12-03T13:12:42
stderr value {
236
2024-12-03T13:12:42
stderr ce_string: "publish"
237
2024-12-03T13:12:42
stderr }
238
2024-12-03T13:12:42
stderr }
239
2024-12-03T13:12:42
stderr attributes {
240
2024-12-03T13:12:42
stderr key: "agagentsendertype"
241
2024-12-03T13:12:42
stderr value {
242
2024-12-03T13:12:42
stderr ce_string: "HelloAgents"
243
2024-12-03T13:12:42
stderr }
244
2024-12-03T13:12:42
stderr }
245
2024-12-03T13:12:42
stderr attributes {
246
2024-12-03T13:12:42
stderr key: "agagentsenderkey"
247
2024-12-03T13:12:42
stderr value {
248
2024-12-03T13:12:42
stderr ce_string: "python"
249
2024-12-03T13:12:42
stderr }
250
2024-12-03T13:12:42
stderr }
251
2024-12-03T13:12:42
stderr proto_data {
252
2024-12-03T13:12:42
stderr type_url: "type.googleapis.com/agents.NewMessageReceived"
253
2024-12-03T13:12:42
stderr value: "\n\014from Python!"
254
2024-12-03T13:12:42
stderr }
255
2024-12-03T13:12:42
stderr }
256
2024-12-03T13:12:42
stderr
257
2024-12-03T13:12:42
stderr INFO:autogen_core:Put message in receive queue
258
2024-12-03T13:12:42
stderr INFO:autogen_core:Waiting for message from host
259
2024-12-03T13:12:42
stderr INFO:autogen_core:Getting message from queue
260
2024-12-03T13:12:42
stderr INFO:autogen_core:Unhandled message: message: "from Python!"
261
2024-12-03T13:12:42
stderr
262
2024-12-03T13:12:42
stderr INFO:autogen_core:Received a message from host: cloudEvent {
263
2024-12-03T13:12:42
stderr id: "90312788-9d3a-4f49-8438-1db84b571c12"
264
2024-12-03T13:12:42
stderr source: "HelloAgents/python"
265
2024-12-03T13:12:42
stderr spec_version: "1.0"
266
2024-12-03T13:12:42
stderr type: "agents.Output"
267
2024-12-03T13:12:42
stderr attributes {
268
2024-12-03T13:12:42
stderr key: "dataschema"
269
2024-12-03T13:12:42
stderr value {
270
2024-12-03T13:12:42
stderr ce_string: "Output"
271
2024-12-03T13:12:42
stderr }
272
2024-12-03T13:12:42
stderr }
273
2024-12-03T13:12:42
stderr attributes {
274
2024-12-03T13:12:42
stderr key: "datacontenttype"
275
2024-12-03T13:12:42
stderr value {
276
2024-12-03T13:12:42
stderr ce_string: "application/x-protobuf"
277
2024-12-03T13:12:42
stderr }
278
2024-12-03T13:12:42
stderr }
279
2024-12-03T13:12:42
stderr attributes {
280
2024-12-03T13:12:42
stderr key: "agmsgkind"
281
2024-12-03T13:12:42
stderr value {
282
2024-12-03T13:12:42
stderr ce_string: "publish"
283
2024-12-03T13:12:42
stderr }
284
2024-12-03T13:12:42
stderr }
285
2024-12-03T13:12:42
stderr attributes {
286
2024-12-03T13:12:42
stderr key: "agagentsendertype"
287
2024-12-03T13:12:42
stderr value {
288
2024-12-03T13:12:42
stderr ce_string: "HelloAgents"
289
2024-12-03T13:12:42
stderr }
290
2024-12-03T13:12:42
stderr }
291
2024-12-03T13:12:42
stderr attributes {
292
2024-12-03T13:12:42
stderr key: "agagentsenderkey"
293
2024-12-03T13:12:42
stderr value {
294
2024-12-03T13:12:42
stderr ce_string: "python"
295
2024-12-03T13:12:42
stderr }
296
2024-12-03T13:12:42
stderr }
297
2024-12-03T13:12:42
stderr proto_data {
298
2024-12-03T13:12:42
stderr type_url: "type.googleapis.com/agents.Output"
299
2024-12-03T13:12:42
stderr value: "\n)^v^v^v---Wild Hello from Python!---^v^v^v"
300
2024-12-03T13:12:42
stderr }
301
2024-12-03T13:12:42
stderr }
302
2024-12-03T13:12:42
stderr
303
2024-12-03T13:12:42
stderr INFO:autogen_core:Put message in receive queue
304
2024-12-03T13:12:42
stderr INFO:autogen_core:Waiting for message from host
305
2024-12-03T13:12:42
stderr INFO:autogen_core:Getting message from queue
306
2024-12-03T13:12:42
stderr INFO:autogen_core:^v^v^v---Wild Hello from Python!---^v^v^v
307
2024-12-03T13:12:42
stderr INFO:autogen_core:Received a message from host: cloudEvent {
308
2024-12-03T13:12:42
stderr id: "9f90f4bc-a1a4-4a20-8aa5-71397f5555d5"
309
2024-12-03T13:12:42
stderr source: "HelloAgents"
310
2024-12-03T13:12:42
stderr type: "agents.Output"
311
2024-12-03T13:12:42
stderr attributes {
312
2024-12-03T13:12:42
stderr key: "datacontenttype"
313
2024-12-03T13:12:42
stderr value {
314
2024-12-03T13:12:42
stderr ce_string: "application/x-protobuf"
315
2024-12-03T13:12:42
stderr }
316
2024-12-03T13:12:42
stderr }
317
2024-12-03T13:12:42
stderr metadata {
318
2024-12-03T13:12:42
stderr key: "traceparent"
319
2024-12-03T13:12:42
stderr value: "00-0f4efacb3306c1a0cb465eb90aa58af2-50cee47bf8245e4b-01"
320
2024-12-03T13:12:42
stderr }
321
2024-12-03T13:12:42
stderr text_data: "\n!type.googleapis.com/agents.Output\022K\nI********************* HelloAgents said Goodbye ************************"
322
2024-12-03T13:12:42
stderr }
323
2024-12-03T13:12:42
stderr
324
2024-12-03T13:12:42
stderr INFO:autogen_core:Put message in receive queue
325
2024-12-03T13:12:42
stderr INFO:autogen_core:Waiting for message from host
326
2024-12-03T13:12:42
stderr INFO:autogen_core:Getting message from queue
327
2024-12-03T13:12:42
stderr INFO:autogen_core:Unhandled message: UnknownPayload(type_name='', data_content_type='application/x-protobuf', payload=b'')

What did you expect to happen?

all messages handled by handler:

@message_handler
async def handle_user_chat_input(self, message: input_types, ctx: MessageContext) -> None:
    logger = logging.getLogger("autogen_core")

    if isinstance(message, Input):
        response = await self.ainput("User input ('exit' to quit): ")
        response = response.strip()
        logger.info(response)

        await self.publish_message(NewMessageReceived(message=response), topic_id=DefaultTopicId())
    elif isinstance(message, Output):
        logger.info(message.message)
    elif isinstance(message, ConversationClosed):
        logger.info("Conversation closed. Goodbye!")
    elif isinstance(message, NewMessageReceived):
        logger.info(f"New message received: {message.message}")
    else:
        pass

How can we reproduce it (as minimally and precisely as possible)?

cd dotnet/samples/Hello/Hello.AppHost
dotnet run

AutoGen version

0.4

Which package was this bug in

Core

Model used

No response

Python version

No response

Operating system

No response

Any additional info you think would be helpful for fixing this bug

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size-small takes 1-2 days x-lang
Projects
None yet
1 participant