Skip to content

.NET: AIAgentHostExecutor does not include ChatResponse details other than ChatMessages in outgoing workflow messages. #2148

Description

I have a workflow that starts off with an AIAgentHostExecutor which is followed by a custom Executor that I wrote to parse the agent's response. I was just debugging a case where I had set the MaxOutputTokens for the agent too low, which caused the response message to be incomplete which in turn was the reason it wasn't parsed. I'd like to be able to detect this situation (or other like it) in the custom executor, but I'm seeing a good way for it to get the information it would need.

Information like this is contained in the ChatResponse/AgentRunResponse, and while the AIAgentHostExecutor is creating a event that includes AgentRunResponseUpdates, the only messages it sends are the ChatMessages.

I can catch the event from outside the workflow, and then since I have a reference to the second executor, set a property on it to pass this information to it, but that feels like it defeats the purpose of having workflow, and would get out of hand quickly.

I don't know if there was a reason why only the ChatMessages are being forwarded on as messages, but I think would be useful if the ChatResponse/AgentChatResponse (or even all the AgentChatResponseUpdates) could be passed on as workflow messages too.

The workaround would be to write a custom executor to host the agent, but this doesn't feel like something unique enough that it should require that.

Activity

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

Metadata

Metadata

Labels

.NETUsage: [Issues, PRs], Target: .NetepicUsage: [Issues], Target: milestone planningworkflowsUsage: [Issues, PRs], Target: Workflows

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions