Skip to content

Integrate Agent Framework harness into QA bot - #17496

Open
Jiaqi Zhang (JiaqiZhang-Dev) wants to merge 15 commits into
mainfrom
jiaqizhang-dev-copilot-harness-integration
Open

Jiaqi Zhang (JiaqiZhang-Dev) wants to merge 15 commits into
mainfrom
jiaqizhang-dev-copilot-harness-integration

Conversation

@JiaqiZhang-Dev

@JiaqiZhang-Dev Jiaqi Zhang (JiaqiZhang-Dev) commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Summary

  • run the hosted QA chat agent through the Microsoft Agent Framework harness
  • add compaction, todos, session-scoped file memory, skills, memory context, and telemetry
  • protect untrusted tool output and offload large opaque results to session memory
  • use hosted Responses protocol 2.0 and isolate stateless requests in fresh logical sessions
  • update PR-review guidance to inspect stored large outputs through harness file-memory tools

Validation

  • 99 focused harness, chat-service, hosted-agent, and middleware tests passed after merging current main
  • 37 file-backed evaluation tests passed
  • targeted Ruff checks passed
  • dev hosted-agent deployment succeeded
  • isolated-session General run returned all responses without shared-session transport failures

Evaluation

Relates to #17491

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 5, 2026 11:01
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
70 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved critical issues break hosted startup and expose credentials and private session data through unrestricted shell access, shared result storage, and untrusted-text spotlighting bypasses.

7 open issues
What changed in this PR

This PR advances #17491 by moving the hosted chat agent onto the Microsoft Agent Framework harness and replacing custom MCP result parsers with shared middleware.

Changes:

  • Adds harness-managed file access, shell execution, session memory, skills, and context compaction.
  • Separates tool-output security from large-result storage across agent entrypoints.
  • Updates dependencies, tests, and guidance for inspecting stored results.

Paths below are relative to tools/sdk-ai-bots/azure-sdk-qa-bot-agent/.

File Description
utils/​tool_security.py Removes the previous security middleware module.
utils/​azure_ai_foundry.py Adds the shared hosted harness factory.
tools/​mslearn_mcp_tools.py Removes custom result-parser registration.
tools/​github_mcp_tools.py Removes GitHub-specific filtering and compaction parsers.
tools/​azsdk_mcp_tools.py Removes custom result-parser registration.
tools/​ado_mcp_tools.py Removes custom result-parser registration.
tools/​__init__.py Removes shared MCP truncation logic.
tests/​tool_security_test.py Removes tests for the previous middleware.
tests/​tool_output_storage_test.py Tests normalization, offloading, and middleware composition.
tests/​tool_output_security_test.py Tests spotlighting and tool exemptions.
tests/​tenant_config_test.py Updates skill-discovery tests for framework APIs.
tests/​mslearn_mcp_tools_test.py Updates expected MCP configuration.
tests/​mcp_parser_test.py Removes legacy truncation-parser tests.
tests/​github_mcp_parser_test.py Removes GitHub-specific parser tests.
tests/​agent_harness_test.py Adds harness-provider and shell tests.
skills/​chat_agent/​pr-review/​SKILL.md Updates guidance for inspecting stored results.
SECURITY.md Updates the middleware link and description.
requirements.txt Updates framework and MCP dependencies.
prompts/​harness_instruction.md Adds shared harness and context-management guidance.
middleware/​tool_output_storage.py Stores large results and returns file references.
middleware/​tool_output_security.py Adds relocated spotlighting with harness exemptions.
middleware/​__init__.py Introduces the middleware package.
agents/​chatbot_evolution_agent/​init.py Registers security and storage middleware.
agents/​chat_agent/​init.py Adopts the harness and agent-managed history.
agents/​azure_mcp_server_agent/​init.py Updates skill loading and middleware registration.

Review effort: Balanced

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Evaluation file upload and concurrency support now live in #17509 so the harness PR can be evaluated against the same pipeline after that PR merges.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants