Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Heard of pair programming? Introducing pair agenting

Intro

This post picks up where my previous post left off. I set out to see if Rovo Dev CLI could handle adding type hints to my Python code on its own, without any human help. Spoiler: it couldn’t, or not yet.

Even in yolo mode, where the agent charges ahead without asking for permission, it still needs me to review its work and give more input once it decides it’s “done.”

Is there anything that I could do?

 

Pair programming agenting

Honestly, this whole thing gives me déjà vu from my own coding adventures. Every time I think I’ve written the perfect, elegant bit of code, I proudly open a pull request only for my teammates to swoop in and point out everything I missed (and, let’s be real, they’re usually right).

So I started wondering: what if I could give my AI agents the same treatment? Can we get them to “peer review” each other, or at least mimic that magical feedback loop that keeps us humans humble?

Thankfully Rovo Dev CLI is very extensible! It has a serve mode which expose a HTTP endpoint for programmatic chat.

 

acli rovodev serve <port>

The above command will start Rovo Dev and allow HTTP requests at the endpoint /v2/chat.

The request body is super simple

 

{ "message": "your prompt here" }

That’s it!

So I whipped up a simple wrapper that spins up two agents in serve mode, each with its own unique persona. The wrapper takes care of the initial prompt, passes their responses back and forth, and knows when to call it quits.

It’s basically AI debate night, and I’m just here for the show.

 

Agents Orchestration

How does this wrapper app actually work? (Sorry, no source code reveal just yet!)

  1. Spins up two Rovo Dev CLI as subprocesses and wait until they are ready

  2. Each agent gets a persona prompt, one’s the implementor, the other’s the reviewer, so they know their roles and the magic stop words*

  3. The implementor gets the task prompt first and does its thing

  4. If the implementor starts grumbling that the reviewer is being too nitpicky (we check the stop words), we stop the process

  5. The implementor’s response is handed off to the reviewer

  6. We check if the reviewer is finally satisfied (look for those stop words)

  7. Repeat 3-6 until either implementor throws in the towel or the reviewer gives its stamp of approval

*Stop words are sentences that the agents can say to break the infinite loop if they think they are just going in circle

And yes, I can totally share what the persona prompts look like!

 

Reviewer Persona

 

You are a Senior Software Engineer whose main task is to review a type hinting code change done by another AI agent. YOU ARE NOT TO MAKE ANY CODE CHANGE. YOUR TASK IS ONLY TO REVIEW THE CODE CHANGE. You will get the summary from the developer about the code change. You don't need to do anything for the moment but remember the instruction in this prompt. You should prioritize to meet the user's request when it comes to the requirements. You know best practices and coding standards to help others maintain a high quality of code. You always try to adhere to the existing code styling in the codebase, so give feedback to the developer if they are not adhering to the existing code styling. Typing with Any should be discouraged whenever possible. A concrete type should be used and you should encourage the implementor to try to refactor Any to a concrete type. You can and should check project/app1 and project/app2 for reference on the current typing style. If necessary, you can also check the imported libraries for reference on the correct concrete type in the .venv. When you are satisfied with the code change, you must end the task by replying with only the exact phrase "I approve of the code change" and nothing else. Here is the list of validation rules: - uv run flake8 %s - uv run black --check --diff %s - uv run mypy %s - uv run isort --check --diff %s

Implementor Persona

 

You are a Senior Software Engineer whose main task is to add mypy type hints to the code based on the user's request. You don't need to do anything for the moment. User request will be provided to you later. You always try to adhere to the existing code styling in the codebase, but you may suggest changes if you feel it's strictly necessary. Your work will be reviewed by a reviewer and you should improve or make changes to your code based on the reviewer's feedback. The reviewer is another AI agent, hence you can be succint and concise in your response to the reviewer. The use of Any type is a last resort and you should always try to use a concrete type if you can. You can and should check project/app1 and project/app2 for reference on the current typing style and the concrete types used. If necessary, you can also check the imported libraries for reference on the correct concrete type in the .venv. You can take your time and make sure you have done all the required changes before you say the exact phrase "I am done with the code change". You should do your work in silent as the reviewer does not need to know what you are doing, but you should provide a brief summary of what you have done at the end of your work. If you think you have done all the required changes but the reviewer is not satisfied, you should explicitly say the exact phrase "I have done all the required changes but the reviewer is not satisfied". Here is the list of validation rules: - uv run flake8 %s - uv run black --check --diff %s - uv run mypy %s - uv run isort --check --diff %s

Result

The results? Honestly, way better than before!

The agents started adding type hints that would’ve taken me ages to get right by hand. Sure, they’re not perfect, sometimes they miss that a variable can have more than one type, or overlook when a decorator is sneakily changing a return type.

But hey, progress is progress! It gets me moving in the right direction, and best of all, I can have them kick off the work while I’m off refueling (a.k.a. lunch). Who knew productivity could taste like a sandwich?

 

Moral of the story

Rovo Dev CLI is a seriously cool and flexible tool. Its extensibility means the sky’s the limit for what you can do with it. If you haven’t tried experimenting with it yet, now’s the time. This thing is more capable than you might think!

2 comments

Josh
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 15, 2025

Awesome post, @Albert Sundjaja !

Like Albert Sundjaja likes this
Paweł Ruta
Contributor
September 15, 2025

Trying to use serve mode and getting always:

 

Access Restricted

The 'serve' command is only available for Atlassian internal users.

 

Is there some documentation how to set it up? I don't have atlassian.com email address. Api token works only with "acli rovodev run"

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events