Skip to content

Commit

Permalink
Organize folder structure towards library (microsoft#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
robinmanuelthiel authored Mar 30, 2024
1 parent fda664e commit 06676de
Show file tree
Hide file tree
Showing 102 changed files with 141 additions and 1,173 deletions.
56 changes: 56 additions & 0 deletions Microsoft.AI.Agents.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{7EC6823E-99FB-403F-9941-0CB08C6BFFD4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AI.Agents", "src\Microsoft.AI.Agents\Microsoft.AI.Agents.csproj", "{160AE89B-16BE-4FB8-8FEC-255E11D6E860}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{17FFA72B-390A-4BF6-A277-2099897D2132}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gh-flow", "gh-flow", "{0C7D5C39-2067-4EF1-9C10-72A847FF9CB3}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{DADD59B8-4B8B-4F2B-BFEB-0F93B8A6AA55}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AI.DevTeam", "samples\gh-flow\src\Microsoft.AI.DevTeam\Microsoft.AI.DevTeam.csproj", "{F02CC33B-B479-480B-B886-25ED0E18494A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "seed-memory", "samples\seed-memory\seed-memory.csproj", "{A1EB6145-FE32-45EC-8A1B-A76268B6DFDE}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WorkflowsApp", "samples\WorkflowsApp\WorkflowsApp.csproj", "{3EE3F061-CC63-41B0-84BA-C95A256E18A9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{160AE89B-16BE-4FB8-8FEC-255E11D6E860}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{160AE89B-16BE-4FB8-8FEC-255E11D6E860}.Debug|Any CPU.Build.0 = Debug|Any CPU
{160AE89B-16BE-4FB8-8FEC-255E11D6E860}.Release|Any CPU.ActiveCfg = Release|Any CPU
{160AE89B-16BE-4FB8-8FEC-255E11D6E860}.Release|Any CPU.Build.0 = Release|Any CPU
{F02CC33B-B479-480B-B886-25ED0E18494A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F02CC33B-B479-480B-B886-25ED0E18494A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F02CC33B-B479-480B-B886-25ED0E18494A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F02CC33B-B479-480B-B886-25ED0E18494A}.Release|Any CPU.Build.0 = Release|Any CPU
{A1EB6145-FE32-45EC-8A1B-A76268B6DFDE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A1EB6145-FE32-45EC-8A1B-A76268B6DFDE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A1EB6145-FE32-45EC-8A1B-A76268B6DFDE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A1EB6145-FE32-45EC-8A1B-A76268B6DFDE}.Release|Any CPU.Build.0 = Release|Any CPU
{3EE3F061-CC63-41B0-84BA-C95A256E18A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3EE3F061-CC63-41B0-84BA-C95A256E18A9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3EE3F061-CC63-41B0-84BA-C95A256E18A9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3EE3F061-CC63-41B0-84BA-C95A256E18A9}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{160AE89B-16BE-4FB8-8FEC-255E11D6E860} = {7EC6823E-99FB-403F-9941-0CB08C6BFFD4}
{0C7D5C39-2067-4EF1-9C10-72A847FF9CB3} = {17FFA72B-390A-4BF6-A277-2099897D2132}
{DADD59B8-4B8B-4F2B-BFEB-0F93B8A6AA55} = {0C7D5C39-2067-4EF1-9C10-72A847FF9CB3}
{F02CC33B-B479-480B-B886-25ED0E18494A} = {DADD59B8-4B8B-4F2B-BFEB-0F93B8A6AA55}
{A1EB6145-FE32-45EC-8A1B-A76268B6DFDE} = {17FFA72B-390A-4BF6-A277-2099897D2132}
{3EE3F061-CC63-41B0-84BA-C95A256E18A9} = {17FFA72B-390A-4BF6-A277-2099897D2132}
EndGlobalSection
EndGlobal
45 changes: 9 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,18 @@
> ⚠️ This project is still an experimentation phase and is not intended to be used in production yet.
# Ai Agents
# AI Agents Framework

Build a Dev Team using event driven agents.
This project is an experiment and is not intended to be used in production.
An opinionated .NET framework, that is built on top of Semantic Kernel and Orleans, which helps creating and hosting event-driven AI Agents.

# Background - initial idea
At the moment the library resides in `src/` only, but we plan to publish them as a Nuget Package in the future.

From a natural language specification, set out to integrate a team of AI agents into your team’s dev process, either for discrete tasks on an existing repo (unit tests, pipeline expansions, PRs for specific intents), developing a new feature, or even building an application from scratch. Starting from an existing repo and a broad statement of intent, work with multiple AI agents, each of which has a different emphasis - from architecture, to task breakdown, to plans for individual tasks, to code output, code review, efficiency, documentation, build, writing tests, setting up pipelines, deployment, integration tests, and then validation.
The system will present a view that facilitates chain-of-thought coordination across multiple trees of reasoning with the dev team agents.
## Examples

# Emerging framework - Ai Agents
We have created a few examples to help you get started with the framework and to explore its capabilities.

While building the dev team agents, we stumbled upon few patterns and abstractions that we think are usefull for building a variety of agentic systems.
At the moment they reside in `src/libs/Microsoft.AI.DevTeam`, but we plan to move them to a separate repo and nuget package.
- [GitHub Dev Team Sample](samples/gh-flow/README.md): Build an AI Developer Team using event-driven agents, that help you automate the requirements engineering, planning, and coding process on GitHub.

# Github dev agents demo

https://github.com/microsoft/azure-openai-dev-skills-orchestrator/assets/10728102/cafb1546-69ab-4c27-aaf5-1968313d637f

## How it works

* User begins with creating an issue and then stateing what they want to accomplish, natural language, as simple or as detailed as needed.
* Product manager agent will respond with a Readme, which can be iterated upon.
* User approves the readme or gives feedback via issue comments.
* Once the readme is approved, the user closes the issue and the Readme is commited to a PR.
* Developer lead agent responds with a decomposed plan for development, which also can be iterated upon.
* User approves the plan or gives feedback via issue comments.
* Once the readme is approved, the user closes the issue and the plan is used to break down the task to different developer agents.
* Developer agents respond with code, which can be iterated upon.
* User approves the code or gives feedback via issue comments.
* Once the code is approved, the user closes the issue and the code is commited to a PR.

# How to run the Github dev agents project

Check [the getting started guide](./docs/github-flow-getting-started.md)

# Other scenarios using the AiAgents

## TODO

# Contributing
## Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
Expand All @@ -53,7 +26,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct](https://ope
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
contact [[email protected]](mailto:[email protected]) with any additional questions or comments.

# Legal Notices
## Legal Notices

Microsoft and any contributors grant you a license to the Microsoft documentation and other content
in this repository under the [Creative Commons Attribution 4.0 International Public License](https://creativecommons.org/licenses/by/4.0/legalcode),
Expand Down
34 changes: 0 additions & 34 deletions docs/github-flow.md

This file was deleted.

3 changes: 0 additions & 3 deletions docs/overview.md

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
69 changes: 69 additions & 0 deletions samples/gh-flow/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# GitHub Dev Team with AI Agents

Build a Dev Team using event driven agents. This project is an experiment and is not intended to be used in production.

## Background

From a natural language specification, set out to integrate a team of AI agents into your team’s dev process, either for discrete tasks on an existing repo (unit tests, pipeline expansions, PRs for specific intents), developing a new feature, or even building an application from scratch. Starting from an existing repo and a broad statement of intent, work with multiple AI agents, each of which has a different emphasis - from architecture, to task breakdown, to plans for individual tasks, to code output, code review, efficiency, documentation, build, writing tests, setting up pipelines, deployment, integration tests, and then validation.
The system will present a view that facilitates chain-of-thought coordination across multiple trees of reasoning with the dev team agents.



## Get it running

Check [the getting started guide](./docs/github-flow-getting-started.md).

## Demo

https://github.com/microsoft/azure-openai-dev-skills-orchestrator/assets/10728102/cafb1546-69ab-4c27-aaf5-1968313d637f

## Solution overview

![General overview](./docs/images/overview.png)

## How it works

* User begins with creating an issue and then stateing what they want to accomplish, natural language, as simple or as detailed as needed.
* Product manager agent will respond with a Readme, which can be iterated upon.
* User approves the readme or gives feedback via issue comments.
* Once the readme is approved, the user closes the issue and the Readme is commited to a PR.
* Developer lead agent responds with a decomposed plan for development, which also can be iterated upon.
* User approves the plan or gives feedback via issue comments.
* Once the readme is approved, the user closes the issue and the plan is used to break down the task to different developer agents.
* Developer agents respond with code, which can be iterated upon.
* User approves the code or gives feedback via issue comments.
* Once the code is approved, the user closes the issue and the code is commited to a PR.

```mermaid
graph TD;
NEA([NewAsk event]) -->|Hubber| NEA1[Creation of PM issue, DevLead issue, and new branch];
RR([ReadmeRequested event]) -->|ProductManager| PM1[Generation of new README];
NEA1 --> RR;
PM1 --> RG([ReadmeGenerated event]);
RG -->|Hubber| RC[Post the readme as a new comment on the issue];
RC --> RCC([ReadmeChainClosed event]);
RCC -->|ProductManager| RCR([ReadmeCreated event]);
RCR --> |AzureGenie| RES[Store Readme in blob storage];
RES --> RES2([ReadmeStored event]);
RES2 --> |Hubber| REC[Readme commited to branch and create new PR];
DPR([DevPlanRequested event]) -->|DeveloperLead| DPG[Generation of new development plan];
NEA1 --> DPR;
DPG --> DPGE([DevPlanGenerated event]);
DPGE -->|Hubber| DPGEC[Posting the plan as a new comment on the issue];
DPGEC --> DPCC([DevPlanChainClosed event]);
DPCC -->|DeveloperLead| DPCE([DevPlanCreated event]);
DPCE --> |Hubber| DPC[Creates a Dev issue for each subtask];
DPC([CodeGenerationRequested event]) -->|Developer| CG[Generation of new code];
CG --> CGE([CodeGenerated event]);
CGE -->|Hubber| CGC[Posting the code as a new comment on the issue];
CGC --> CCCE([CodeChainClosed event]);
CCCE -->|Developer| CCE([CodeCreated event]);
CCE --> |AzureGenie| CS[Store code in blob storage and schedule a run in the sandbox];
CS --> SRC([SandboxRunCreated event]);
SRC --> |Sandbox| SRM[Check every minute if the run finished];
SRM --> SRF([SandboxRunFinished event]);
SRF --> |Hubber| SRCC[Code files commited to branch];
```
4 changes: 2 additions & 2 deletions azure.yaml → samples/gh-flow/azure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
name: ai-dev-team
services:
gh-flow:
project: ./src/sample-apps/gh-flow
project: "src/Microsoft.AI.DevTeam/Microsoft.AI.DevTeam.csproj"
language: csharp
host: containerapp
docker:
context: ../../../
context: ../../../
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ https://docs.github.com/en/codespaces/developing-in-a-codespace/creating-a-codes

![Alt text](./images/new-codespace.png)

Within this repo there is a folder "scr\sample-apps\gh-flow" Within this folder there are two files called appsettings.azure.template.json and appsettings.local.template.json. If you run this demo locally, use the local template and if you want to run it within Azure use the Azure template. Rename the selected file to appsettings.json and fill out the config values within the file.
In this sample's folder there are two files called appsettings.azure.template.json and appsettings.local.template.json. If you run this demo locally, use the local template and if you want to run it within Azure use the Azure template. Rename the selected file to appsettings.json and fill out the config values within the file.

In the Explorer tab in VS Code, find the Solution explorer, right click on the `gh-flow` project and click Debug -> Start new instance

Expand Down Expand Up @@ -76,7 +76,7 @@ Also, since this project is relying on Orleans for the Agents implementation, th

## How do I deploy the azure bits?

This repo is setup to use [azd](https://learn.microsoft.com/en-us/azure/developer/azure-developer-cli/overview) to work with the Azure bits. `azd` is installed in the codespace.
This sample is setup to use [azd](https://learn.microsoft.com/en-us/azure/developer/azure-developer-cli/overview) to work with the Azure bits. `azd` is installed in the codespace.

Let's start by logging in to Azure using
```bash
Expand All @@ -100,4 +100,4 @@ As the last step, we also need to [load the WAF into the vector DB](#load-the-wa
### Load the WAF into Qdrant.

If you are running the app locally, we have [Qdrant](https://qdrant.tech/) setup in the Codespace and if you are running in Azure, Qdrant is deployed to ACA.
The loader is a project in the `src\apps` folder, called `seed-memory`. We need to fill in the `appsettings.json` file in the `config` folder with the OpenAI details and the Qdrant endpoint, then just run the loader with `dotnet run` and you are ready to go.
The loader is a project in the `samples` folder, called `seed-memory`. We need to fill in the `appsettings.json` file in the `config` folder with the OpenAI details and the Qdrant endpoint, then just run the loader with `dotnet run` and you are ready to go.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<ItemGroup>
<ProjectReference Include="..\..\libs\Microsoft.AI.Agents\Microsoft.AI.Agents.csproj" />
<ProjectReference Include="..\..\..\..\src\Microsoft.AI.Agents\Microsoft.AI.Agents.csproj" />
</ItemGroup>

<PropertyGroup>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions samples/seed-memory/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# TODO
File renamed without changes.
Loading

0 comments on commit 06676de

Please sign in to comment.