Files
agent-framework/python/packages/github_copilot
T
James Sturtevant b4c4f5094e Python: Emit tool call events in GitHubCopilotAgent streaming (#4711)
* Emit tool call events in GitHubCopilotAgent streaming

_stream_updates now yields FunctionCallContent for TOOL_EXECUTION_START
and FunctionResultContent for TOOL_EXECUTION_COMPLETE events from the
Copilot SDK session. This enables DevUI and other consumers to display
tool calls during streaming agent execution. Previously only ASSISTANT_MESSAGE_DELTA, SESSION_IDLE, and SESSION_ERROR
were handled — tool execution events were silently dropped.

Signed-off-by: James Sturtevant <jsturtevant@gmail.com>

* Add some tests

Signed-off-by: James Sturtevant <jsturtevant@gmail.com>

* Respond to feedback

Signed-off-by: James Sturtevant <jsturtevant@gmail.com>

* Fix TOOL_EXECUTION_COMPLETE to use correct SDK types

- Read result text from session_events.Result.content (not ToolResult.text_result_for_llm)
- Read failure state from event.data.success/error (not result_obj.result_type/error)
- Handle ErrorClass.message and plain string errors
- Update tests to use session_events.Result and ErrorClass
- Add tests for string errors, success-with-error, and COMPLETE missing fields

Signed-off-by: James Sturtevant <jsturtevant@gmail.com>

---------

Signed-off-by: James Sturtevant <jsturtevant@gmail.com>
b4c4f5094e · 2026-03-20 01:27:36 +00:00
History
..

Get Started with Microsoft Agent Framework GitHub Copilot

Please install this package via pip:

pip install agent-framework-github-copilot --pre

GitHub Copilot Agent

The GitHub Copilot agent enables integration with GitHub Copilot, allowing you to interact with Copilot's agentic capabilities through the Agent Framework.