Multi-Agent Software Engineering: Code Agent to Test Agent

I'm Mark Weber, Chief Enterprise Architect at StudioX. This is an illustrative scene of multi-agent software engineering: a code agent owned by one team hands a branch to a test agent owned by the QA team, on a different platform, over the Agent2Agent (A2A) protocol. The organisation is invented, a mid-sized software company with a product team and a separate QA team, and the times are illustrative. The pattern is the point.
The Moment
It is 4:40 on a Thursday afternoon. The release branch is due to be cut the next morning. A ticket lands in the product team's queue: customers exporting invoices to CSV see dates shifted by one day when their account is set to a time zone west of UTC.
Priya, the engineering lead, reads it and knows the shape of the problem. The fix is probably a few lines. Getting it verified before the release branch is cut is the hard part, because the regression suite belongs to the QA team, runs on their own CI pipeline, and takes most of an hour.
What Used to Happen
The old path went like this. A developer pulls the ticket, reproduces the bug locally, writes a fix on a branch and opens a merge request. The product team's CI pipeline runs unit tests. Those pass.
Then the developer messages the QA team's channel asking for a regression run against the branch. Someone on QA is in a meeting. An hour later they see it, copy the branch name into their test runner, and kick off the regression suite. It finishes with three failures. They paste a link to the test report into the channel.
The developer opens the report, sees that two failures are a known flaky test around session timeouts and one is real: a report-scheduling test that also formats dates. They fix it, push, and message QA again. QA re-runs. By now it is evening, the reviewer has gone home, and the merge request waits for code review until morning, which is when the release branch gets cut without it.
No single step was slow. The waiting between steps was.
What Happened Instead: Multi-Agent Software Engineering in Practice
In this scene, the product team runs a code agent as a StudioX mission, part of EngineerX. The QA team runs its own test agent on its own platform. Both speak A2A.
Trigger. The ticket is assigned to the code agent. It reads the ticket, the customer's account settings attached to it, and the CSV export module.
Reproduce and decide. The code agent writes a failing unit test that sets the account time zone to UTC-8 and exports an invoice dated just after midnight UTC. The test fails as the ticket describes. The agent finds the export formatting the timestamp in server time instead of the account's time zone. It writes the fix on a new branch, the unit test passes, and it opens a merge request linking the ticket.
Read the Agent Card. The code agent needs the regression suite run against the branch. It does not have, and does not need, access to the QA team's test infrastructure. It fetches the test agent's Agent Card. The card describes a skill for running a named suite against a branch, says the agent supports streaming, and declares the authentication it requires: an OAuth 2.0 token the QA team issued to the product team's connection.
Send the task. The code agent sends an A2A message with the repository, the branch name, the commit, and the suite to run. The test agent returns a task in the submitted state, then moves it to working.
Working, streaming. The suite runs for about forty minutes in this telling. The task stays in the working state throughout, and the test agent streams progress back as server-sent events: suites started, suites passed, a failure in report scheduling. The code agent does not poll a channel or wait for a person to notice. It records each update against the merge request.
The artifact. The task completes. The test agent returns a result artifact: a structured test report listing three failures. Two are in the session timeout tests, and the report marks them as known flaky tests with a history of intermittent failure on the QA side. One is in report scheduling.
Act on it. The code agent reads the report-scheduling failure. The scheduler uses the same date formatter, and the fix changed its output for one edge case. The agent updates the scheduler call, adds a test for it, pushes to the branch, and sends a new A2A task asking for the failing suites to be re-run. This time the task completes with the scheduling tests green. The flaky tests pass on retry; the code agent notes them in the merge request rather than treating them as fixed.
A person decides. The code agent cannot merge. The team defined merging to the release branch as an action that needs a human. The merge request moves to code review, and Priya is notified. She reads the diff, the two test reports from the QA team's agent, and the agent's note on the flaky tests. She approves at 6:10. The fix makes the release branch.
Why It Worked
Two agents, two teams, two platforms. The product team owns the code agent. The QA team owns the test agent and everything behind it: runners, environments, flaky-test history. A2A agents are opaque to each other. The test agent accepts a task and returns results without exposing its internal tools or reasoning, and the code agent never gets credentials to QA's infrastructure. Each team keeps control of its own system.
The Agent Card. StudioX assistants and missions are published as A2A agents with their own Agent Cards; the QA team's agent publishes one too. Its card told the code agent what the test agent could do, what to send, and how to authenticate. Before the product team relied on the test agent, they tried it from the A2A playground in Studio.
The task lifecycle. A regression suite takes a long time. A2A tracks the work as a task with states: submitted, working, then completed or failed. Streaming kept the code agent informed during the forty-minute run; a failure would have come back as a failed state rather than silence. If the test agent had been unreachable, the Reasoning Core would decide to retry, escalate to a person, or reroute, and that decision is traced.
Policy and approval. Agent Policies, written in Rego for Open Policy Agent, check every tool call the code agent makes before it runs, so pushing to the branch is allowed while pushing to the release branch is denied, and each allow or deny is logged. The merge itself pauses for a human: the workflow waits at a defined step until a reviewer approves.
The provenance record. For any agent run, StudioX produces a W3C PROV provenance record: which agent or person acted, what data it used, what it produced. Here that means the ticket, the branch, both test report artifacts, and Priya's approval in one downloadable record. OpenTelemetry traces follow the run across StudioX services and can go to Datadog, Grafana, Splunk or any OTLP endpoint.
The QA team's platform has to support A2A for any of this to work. A2A is new, and StudioX supports A2A 1.0; the other side needs to as well.
What This Pattern Generalizes To
The shape is a code agent asking a specialist agent, owned by another team, to do work and return a structured result:
- Security scanning. The code agent sends a branch to the security team's scanning agent and gets back findings as an artifact before code review.
- Performance testing. A merge request that touches a hot path goes to the performance team's agent, which runs a load test and returns a comparison against the release branch.
- Release readiness. Before a release branch is cut, a release agent asks each team's agent for its test report and assembles them for the release manager to approve.
- Flaky-test triage. The QA team's agent, seeing a test fail intermittently across branches, sends a task to the owning team's code agent to investigate, with the failure history attached.
In each case a person still approves where the team decided one should.
Frequently Asked Questions
Does the code agent need access to the QA team's CI pipeline?
No. It sends a task to the test agent over A2A and receives the result. The QA team's runners, environments and credentials stay with the QA team. The only shared credential is the OAuth 2.0 connection the QA team granted, which they can revoke at the source.
How is this different from the code agent calling tools through MCP?
MCP connects an agent to tools and data; the code agent uses MCP to work with the repository and ticket system. A2A connects an agent to another agent that does its own reasoning. The test agent decides how to run the suite and how to classify flaky tests; the code agent only sees the outcome.
Can the code agent merge on its own?
Only if the team allows it. In this scene, merging to the release branch is defined as needing a human, and an Agent Policy denies the agent that action. The reviewer decides.
Call to Action
If your product and QA teams already run their own tooling, start with one handoff: a code agent asking for a regression run on a branch. See how StudioX supports engineering teams on the EngineerX page, and how the pieces fit on the Enterprise AI Platform.
Related Reading
Discussion
No comments yet — start the conversation.