Skip to content

Python: Add background agent support to harness agent - #6155

Merged
Eduard van Valkenburg (eavanvalkenburg) merged 3 commits into
microsoft:mainfrom
westey-m:python-harness-agent-add-background-agent
Jun 1, 2026
Merged

Python: Add background agent support to harness agent#6155
Eduard van Valkenburg (eavanvalkenburg) merged 3 commits into
microsoft:mainfrom
westey-m:python-harness-agent-add-background-agent

Conversation

@westey-m

Copy link
Copy Markdown
Contributor

Motivation and Context

#6154

Description

  • Add background agent support to harness agent

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.

Copilot AI review requested due to automatic review settings May 28, 2026 15:29
@moonbox3 Evan Mattson (moonbox3) added the python Usage: [Issues, PRs], Target: Python label May 28, 2026
@github-actions github-actions Bot changed the title Add background agent support to harness agent Python: Add background agent support to harness agent May 28, 2026

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.

Pull request overview

Adds opt-in background agent support to the Python harness agent so a harness-created agent can delegate work to background sub-agents via a BackgroundAgentsProvider.

Changes:

  • Extend create_harness_agent() / _assemble_context_providers() to accept background_agents and background_agents_instructions.
  • Automatically append BackgroundAgentsProvider when background_agents is provided and non-empty.
  • Add unit tests covering provider inclusion/default behavior and custom instructions wiring.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
python/packages/core/agent_framework/_harness/_agent.py Adds background_agents/background_agents_instructions parameters and wires BackgroundAgentsProvider into the harness context provider pipeline.
python/packages/core/tests/core/test_harness_agent.py Adds tests verifying background-agent provider is (not) included by default, included when configured, and honors custom instructions.

Comment thread python/packages/core/tests/core/test_harness_agent.py
Comment thread python/packages/core/tests/core/test_harness_agent.py Outdated
Comment thread python/packages/core/tests/core/test_harness_agent.py Outdated
@moonbox3

Evan Mattson (moonbox3) commented May 28, 2026

Copy link
Copy Markdown
Contributor

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
packages/core/agent_framework/_harness
   _agent.py73494%132, 342–343, 345
TOTAL36868431388% 

Python Unit Test Overview

Tests Skipped Failures Errors Time
7389 34 💤 0 ❌ 0 🔥 1m 57s ⏱️

@github-actions github-actions Bot 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.

Automated Code Review

Reviewers: 4 | Confidence: 90% | Result: All clear

Reviewed: Correctness, Security Reliability, Test Coverage, Design Approach


Automated review by westey-m's agents

Merged via the queue into microsoft:main with commit 52a8045 Jun 1, 2026
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Usage: [Issues, PRs], Target: Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants