How to write release note with LLM agents
Tags: llm, ai, dotnet, github
Published: 2024-07-14 07:29:47

## TL;DR
This blog shows how to simplify the process of writing release notes using `issue-helper` and `gpt` agent in [Agent ChatRoom](https://github.com/LittleLittleCloud/Agent-ChatRoom). The `issue-helper` pulls issues in a milestone and `gpt` generates a release note based on these issues.

## What is Agent ChatRoom
[`Agent ChatRoom`](https://github.com/LittleLittleCloud/Agent-ChatRoom) is a multi-agent platform built on top of [AutoGen.Net](https://microsoft.github.io/autogen-for-net/) and [Orleans](https://github.com/dotnet/orleans). It comes with a web-based UI that provides built-in support for multi-agent group chat.

![demo: switch theme with ps-gpt and ps-runner](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hvqz9a4qge4fr42p02n5.png)

A release note on github usually includes the following sections
- Improvements
- Bug Fix
- New Feature
- API Break Change
- …


![A release note example from AutoGen.Net](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e2uh1r7u7pmkuxxaevlx.png)


To write a release note like the one above, the normal steps are
- collect all issues in a milestone and classify these issues into corresponding sections
- complete each section by summarizing the issues.

Manually completing these steps can be time-consuming. However, with the help of issue-helper and gpt agent, we no longer need to collect issues from github and summarize them one by one. Instead, we can ask issue-helper to find all issues in a milestone, and ask gpt to generate release note based on found issues.

In the rest of the blog, we will show a step-by-step guide on how to write release note using Agent ChatRoom, `issue-helper` and `gpt`.

## Step 1: Install Agent ChatRoom and configure agents
Agent Chatroom is published as a dotnet tool package on nuget.org. To install Agent Chatroom, first make sure you install `dotnet 8.x` SDK, then run the following command:
```bash
dotnet tool install --global ChatRoom.Client --version 0.4.2
```

To start a chatroom, you need to provide a configuration file which includes credentials like openai-api-key, along with settings for the issue-helperand gpt agents. To simplify the process, you can begin with an empty configuration template by using the following command:
```bash
# create configuration from chatroom_empty template and save it to config.json
# You can also list all available templates using list-templates command
chatroom create -t chatroom_empty -o config.json 
```
The `create` command will also generate a JSON schema file compatible with modern code editors like VS Code, providing code intellisense to assist you in completing the configuration.

To add `issue-helper` and `gpt` agent to the chatroom, you need to add `chatroom_github_configuration` and `chatroom_openai_configuration` section to config.json

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qd7oc3wqzhejyxtzg76c.png)

Once you complete the configuration, save the file and start the chatroom using the following command. You will see output similar to the example below, which shows the url of web-based UI.
```bash
chatroom run -c config.json
```

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a9dl48u2cpsrfceyot3l.png)

![chatroom web-based UI](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sivnk7j00cl0vwpcewjs.png)

## Step 2: Create a group chat with issue helper and gpt

To create a group chat with agents, click on the (+) button on the top of the channel panel, and select the agents you want to add. In this case, both `issue-helper` and `gpt` are added for issue retrieval and writing release note. Other than that, we also select `DynamicGroupChat` which selects the next speaker using LLM as group chat orchestrator.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/84ugbezna4dpjo0rnnga.png)

After clicking on save button, we can see the group chat `ReleaseChannel` is created and we can start asking agents to write release note.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7sifqg1ri108npl2xm38.png)

## Step 3: Ask issue-helper to retrieve issues in milestone
In this step, we will ask `issue-helper` to find all completed issues in milestone: 0.4.2, which is the most recent completed milestone in Agent-Chatroom.

As we can see, the `issue-helper` returns a list of issues and their summary, which is exactly what we need to write release note. Except for this time, we no longer need to pull them manually from github.

![find all issues with milestone 0.4.2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vyo6lhs32l361m0ak32b.png)

## Final Step: Ask gpt to write release note
In the final step, we can ask `gpt` to create a release note. Because `gpt` and `issue-helper` are in the same group chat, they can share the context and reuse the issues returned from `issue-helper`.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s3f7i53ure7ww5end1e7.png)

## Conclusion
In this blog, we show how to write release note using `gpt` and `issue-helper` agents in Agent ChatRoom.

Feedback and comments are welcome. If you found this blog useful, please give [Agent ChatRoom](https://github.com/LittleLittleCloud/Agent-ChatRoom) a star on github.
Happy coding!