Arcee Orchestra Build an Agentic Code Review Workflow
February 14, 2025
Arcee Orchestra (https://www.arcee.ai/product/orchestra) is a platform that turns AI into action. It lets you create workflows that automate tasks, streamline processes, and even power new products. Think of it as a tool for building smart automation that can handle the work for you. It’s as simple to use as any AI chat tool but far more capable.
In this video, I show you how to build a code review workflow. I use Model nodes to identify Python and security improvements and generate a report saved as a Google Docs document.
⭐️⭐️⭐️ Don't forget to subscribe to be notified of future videos. You can also follow me on Medium at https://julsimon.medium.com or Substack at https://julsimon.substack.com. ⭐️⭐️⭐️
Learn more about Arcee Orchestra on the product page at https://www.arcee.ai/product/orchestra, or by booking a demo at https://www.arcee.ai/book-a-demo.
Transcript
Hi, this is Julien from Arcee. In this video, I'm going to use Arcee Maestro to build a code review workflow. We're going to ask a couple of models to improve our code, and we're going to generate a report and store it in Google Docs.
First, let's look at the workflow. As usual, we have a start node with two parameters. One is called code input. It's a text box that includes the code we want to review. The second parameter is called document name, also text, and this is the name of the file we're going to create in Google Docs.
After the start node, we have two model nodes running in parallel, which is great for response time and efficiency. The first node is called model code pythonic. If we open it, we can see that we are passing the code to be reviewed and asking the model to give us tips to make this code as Pythonic as possible. Here, I decided to use virtual or small, but we could use other models for this.
The second node is called model code security. As you can guess, this time we're going to ask the model to identify any security issues in the code we passed and suggest remediations. These two nodes then go into a third model node called model summary. In this node, we're going to take the original code, the Pythonic improvements, the security improvements, and generate a document summarizing all the improvements we can make. The prompt is pretty simple and can be tweaked easily. We have the three inputs as mentioned: the two from the Pythonic review and security review, as well as the code input from the start node that gets propagated all the way.
The output of this node will be a document explaining how we can make the code better. The summary then goes into the create Google Doc node, which is an integration node. Let's open it. Here, all we did is connect to our Google accounts, enter the name of the document to create, which comes from the start node, and add to the document the summary generated from the previous model node. This integration lets you create a plain document or a markdown document. As the model loves to output markdown, I thought, let's use the markdown text integration.
Now, let's run the workflow manually and then through the chat. Let me open this panel, go to run, and I have a bit of Python code here which is using subprocess to install packages. I'm sure a lot of things are wrong with this code, and this is the name of the document I'm going to create in Google Docs. Let's run this. The workflow completed successfully, and we can see the output here. Let's check if we have the doc in Google. Opening my Google Docs, I can see the doc with the right title, the one I passed in the start node. The doc follows the structure I requested in the prompt: the original code, the Pythonic improvements, an explanation for all that, the security improvements, etc. Pretty cool, right?
Now, let's do the same and trigger the workflow in the chat. We're in the chat window, and the first thing we need to check is that the workflow is enabled. Now it is, and we can prompt. Let's just say, "Improve the following code and save the report as my chat Review in Google Docs." That should be good. Here's the code. It doesn't really matter what this code is doing; it's just a bunch of Python code. Let's run it. I was able to trigger the workflow successfully. We can see the answer here. We get a summary of the improvements, the final version, etc.
Now, let's take a look at Google Docs. Here's the doc in Google again. The doc has the right title, which is nice, and we have the right structure: the original code, the Pythonic improvements, etc., key changes, and so on. That's it. Code reviews with Arcee Maestro. Stay tuned for many more examples. Bye.