Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 42 additions & 7 deletions OAgents.sln
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Microsoft Visual Studio Solution File, Format Version 12.00

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Expand Down Expand Up @@ -28,7 +29,17 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Oagents.Dapr", "src\Oagents
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Oagents.Orleans", "src\Oagents.Orleans\Oagents.Orleans.csproj", "{8E900786-270D-4010-A279-CEDDB52B7422}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SupportCenter", "samples\support-center\src\backend\SupportCenter.csproj", "{A6DCD7B2-8347-4C52-A808-B5E0A5CD453D}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "support-center", "support-center", "{02EA681E-C7D8-13C7-8484-4AC65E1B71E8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SupportCenter.ApiService", "samples\support-center\SupportCenter.ApiService\SupportCenter.ApiService.csproj", "{585569C8-C856-AEE4-1C3C-A4C0563AE1E1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SupportCenter.AppHost", "samples\support-center\SupportCenter.AppHost\SupportCenter.AppHost.csproj", "{CD5BEDC0-7828-3D9C-C122-2E1F91F6857D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SupportCenter.Seed.Memory", "samples\support-center\SupportCenter.Seed.Memory\SupportCenter.Seed.Memory.csproj", "{8A0CBD24-EF97-3A62-2546-0A8C6EFC2394}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SupportCenter.ServiceDefaults", "samples\support-center\SupportCenter.ServiceDefaults\SupportCenter.ServiceDefaults.csproj", "{D514E56F-1EBE-8DAC-F6E6-36110B95DF80}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SupportCenter.Shared", "samples\support-center\SupportCenter.Shared\SupportCenter.Shared.csproj", "{09C02E5F-8DDF-119D-A093-FFF12F4C7AEF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -64,10 +75,26 @@ Global
{8E900786-270D-4010-A279-CEDDB52B7422}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8E900786-270D-4010-A279-CEDDB52B7422}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8E900786-270D-4010-A279-CEDDB52B7422}.Release|Any CPU.Build.0 = Release|Any CPU
{A6DCD7B2-8347-4C52-A808-B5E0A5CD453D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A6DCD7B2-8347-4C52-A808-B5E0A5CD453D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A6DCD7B2-8347-4C52-A808-B5E0A5CD453D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A6DCD7B2-8347-4C52-A808-B5E0A5CD453D}.Release|Any CPU.Build.0 = Release|Any CPU
{585569C8-C856-AEE4-1C3C-A4C0563AE1E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{585569C8-C856-AEE4-1C3C-A4C0563AE1E1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{585569C8-C856-AEE4-1C3C-A4C0563AE1E1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{585569C8-C856-AEE4-1C3C-A4C0563AE1E1}.Release|Any CPU.Build.0 = Release|Any CPU
{CD5BEDC0-7828-3D9C-C122-2E1F91F6857D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CD5BEDC0-7828-3D9C-C122-2E1F91F6857D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CD5BEDC0-7828-3D9C-C122-2E1F91F6857D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CD5BEDC0-7828-3D9C-C122-2E1F91F6857D}.Release|Any CPU.Build.0 = Release|Any CPU
{8A0CBD24-EF97-3A62-2546-0A8C6EFC2394}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8A0CBD24-EF97-3A62-2546-0A8C6EFC2394}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8A0CBD24-EF97-3A62-2546-0A8C6EFC2394}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8A0CBD24-EF97-3A62-2546-0A8C6EFC2394}.Release|Any CPU.Build.0 = Release|Any CPU
{D514E56F-1EBE-8DAC-F6E6-36110B95DF80}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D514E56F-1EBE-8DAC-F6E6-36110B95DF80}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D514E56F-1EBE-8DAC-F6E6-36110B95DF80}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D514E56F-1EBE-8DAC-F6E6-36110B95DF80}.Release|Any CPU.Build.0 = Release|Any CPU
{09C02E5F-8DDF-119D-A093-FFF12F4C7AEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{09C02E5F-8DDF-119D-A093-FFF12F4C7AEF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{09C02E5F-8DDF-119D-A093-FFF12F4C7AEF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{09C02E5F-8DDF-119D-A093-FFF12F4C7AEF}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -84,6 +111,14 @@ Global
{B05CE76A-63ED-4F94-A531-A761BD8D6E52} = {290F9824-BAD3-4703-B9B7-FE9C4BE3A1CF}
{3D2FDE8E-EB13-4686-B662-1DD5FFFC0366} = {290F9824-BAD3-4703-B9B7-FE9C4BE3A1CF}
{8E900786-270D-4010-A279-CEDDB52B7422} = {290F9824-BAD3-4703-B9B7-FE9C4BE3A1CF}
{A6DCD7B2-8347-4C52-A808-B5E0A5CD453D} = {943853E7-513D-45EA-870F-549CFC0AF8E8}
{02EA681E-C7D8-13C7-8484-4AC65E1B71E8} = {943853E7-513D-45EA-870F-549CFC0AF8E8}
{585569C8-C856-AEE4-1C3C-A4C0563AE1E1} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
{CD5BEDC0-7828-3D9C-C122-2E1F91F6857D} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
{8A0CBD24-EF97-3A62-2546-0A8C6EFC2394} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
{D514E56F-1EBE-8DAC-F6E6-36110B95DF80} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
{09C02E5F-8DDF-119D-A093-FFF12F4C7AEF} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B5B698EF-0ABD-4DB0-9C3B-31E9C739A00B}
EndGlobalSection
EndGlobal
10 changes: 10 additions & 0 deletions nuget.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
<clear />
<add key="nuget" value="https://api.nuget.org/v3/index.json" />
<add key="dotnet9" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v3/index.json" />
<add key="orleans-nightly" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/orleans-nightly/nuget/v3/index.json" />
</packageSources>
</configuration>

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
using Dapr.Actors;
using Dapr.Actors.Runtime;
using Dapr.Client;
using Microsoft.AI.Agents.Abstractions;
using Microsoft.AI.Agents.Dapr;
using Microsoft.AI.DevTeam.Dapr.Events;
using Microsoft.SemanticKernel;
using Microsoft.SemanticKernel.Memory;
using Microsoft.Extensions.AI;
namespace Microsoft.AI.DevTeam.Dapr;
public class Dev : AiAgent<DeveloperState>, IDaprAgent
{

private readonly ILogger<Dev> _logger;

public Dev(ActorHost host, DaprClient client, Kernel kernel, ISemanticTextMemory memory, ILogger<Dev> logger)
: base(host, client, memory, kernel)
public Dev(ActorHost host, DaprClient client, IChatClient chatClient, ILogger<Dev> logger)
: base(host, client, chatClient)
{
_logger = logger;
}
Expand Down Expand Up @@ -59,10 +57,8 @@ public async Task<string> GenerateCode(string ask)
try
{
// TODO: ask the architect for the high level architecture as well as the files structure of the project
var context = new KernelArguments { ["input"] = AppendChatHistory(ask)};
var instruction = "Consider the following architectural guidelines:!waf!";
var enhancedContext = await AddKnowledge(instruction, "waf",context);
return await CallFunction(DeveloperSkills.Implement, enhancedContext);

return await CallFunction(DeveloperSkills.Implement);
}
catch (Exception ex)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
using Dapr.Actors;
using Dapr.Actors.Runtime;
using Dapr.Client;
using Microsoft.AI.Agents.Abstractions;
using Microsoft.AI.Agents.Dapr;
using Microsoft.AI.DevTeam.Dapr.Events;
using Microsoft.SemanticKernel;
using Microsoft.SemanticKernel.Memory;
using Microsoft.Extensions.AI;

namespace Microsoft.AI.DevTeam.Dapr;
public class DeveloperLead : AiAgent<DeveloperLeadState>, IDaprAgent
{
private readonly ILogger<DeveloperLead> _logger;

public DeveloperLead(ActorHost host, DaprClient client, Kernel kernel, ISemanticTextMemory memory, ILogger<DeveloperLead> logger)
: base(host, client, memory, kernel)
public DeveloperLead(ActorHost host, DaprClient client,IChatClient chatClient, ILogger<DeveloperLead> logger)
: base(host, client, chatClient)
{
_logger = logger;
}
Expand Down Expand Up @@ -58,12 +56,8 @@ public async Task<string> CreatePlan(string ask)
{
try
{
// TODO: Ask the architect for the existing high level architecture
// as well as the file structure
var context = new KernelArguments { ["input"] = AppendChatHistory(ask) };
var instruction = "Consider the following architectural guidelines:!waf!";
var enhancedContext = await AddKnowledge(instruction, "waf", context);
return await CallFunction(DevLeadSkills.Plan, enhancedContext);

return await CallFunction(DevLeadSkills.Plan);
}
catch (Exception ex)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,16 @@
using Microsoft.AI.Agents.Abstractions;
using Microsoft.AI.Agents.Dapr;
using Microsoft.AI.DevTeam.Dapr.Events;
using Microsoft.SemanticKernel;
using Microsoft.SemanticKernel.Memory;
using Microsoft.Extensions.AI;

namespace Microsoft.AI.DevTeam.Dapr;

public class ProductManager : AiAgent<ProductManagerState>, IDaprAgent
{
private readonly ILogger<ProductManager> _logger;

public ProductManager(ActorHost host, DaprClient client, Kernel kernel, ISemanticTextMemory memory, ILogger<ProductManager> logger)
: base(host, client, memory, kernel)
public ProductManager(ActorHost host, DaprClient client, IChatClient chatClient, ILogger<ProductManager> logger)
: base(host, client, chatClient)
{
_logger = logger;
}
Expand Down Expand Up @@ -59,10 +58,7 @@ public async Task<string> CreateReadme(string ask)
{
try
{
var context = new KernelArguments { ["input"] = AppendChatHistory(ask) };
var instruction = "Consider the following architectural guidelines:!waf!";
var enhancedContext = await AddKnowledge(instruction, "waf", context);
return await CallFunction(PMSkills.Readme, enhancedContext);
return await CallFunction(PMSkills.Readme);
}
catch (Exception ex)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,21 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Octokit.Webhooks.AspNetCore" Version="2.0.3" />
<PackageReference Include="Octokit" Version="10.0.0" />

<PackageReference Include="Microsoft.SemanticKernel" Version="1.10.0" />
<PackageReference Include="Microsoft.SemanticKernel.Connectors.Qdrant" Version="1.10.0-alpha" />
<PackageReference Include="Microsoft.SemanticKernel.Plugins.Memory" Version="1.10.0-alpha" />

<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.21.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />

<PackageReference Include="Microsoft.Extensions.Azure" Version="1.7.2" />
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="8.0.0" />
<PackageReference Include="Azure.ResourceManager.ContainerInstance" Version="1.2.0" />
<PackageReference Include="Azure.Storage.Files.Shares" Version="12.16.0-beta.1" />
<PackageReference Include="Azure.Data.Tables" Version="12.8.1" />
<PackageReference Include="Azure.Identity" Version="1.11.0-beta.1" />
<PackageReference Include="Octokit.Webhooks.AspNetCore" Version="2.4.1" />
<PackageReference Include="Octokit" Version="14.0.0" />

<PackageReference Include="Aspire.Azure.AI.OpenAI" Version="9.2.0-preview.1.25111.5" />

<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.23.0-beta1" />

<PackageReference Include="Microsoft.Extensions.Azure" Version="1.10.0" />
<PackageReference Include="Azure.ResourceManager.ContainerInstance" Version="1.3.0-beta.1" />
<PackageReference Include="Azure.Storage.Files.Shares" Version="12.22.0-beta.1" />

<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.4.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.4.0" />

<PackageReference Include="Dapr.Actors.AspNetCore" Version="1.13.0" />
<PackageReference Include="Dapr.AspNetCore" Version="1.13.0" />
<PackageReference Include="CloudNative.CloudEvents.SystemTextJson" Version="2.7.1" />
<PackageReference Include="Dapr.Actors.AspNetCore" Version="1.15.0-rc04" />
<PackageReference Include="Dapr.AspNetCore" Version="1.15.0-rc04" />
</ItemGroup>

<ItemGroup>
Expand Down
49 changes: 0 additions & 49 deletions samples/gh-flow/src/Microsoft.AI.DevTeam.Dapr/Program.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
using System.Text.Json;
using Azure;
using Azure.AI.OpenAI;
using Microsoft.Extensions.Options;
using Microsoft.SemanticKernel;
using Octokit.Webhooks;
using Octokit.Webhooks.AspNetCore;
using Azure.Identity;
using Microsoft.Extensions.Azure;
using Microsoft.Extensions.Http.Resilience;
using Microsoft.SemanticKernel.Memory;
using Microsoft.SemanticKernel.Connectors.Qdrant;
using Microsoft.SemanticKernel.Connectors.OpenAI;
using Dapr;
using Dapr.Actors.Client;
using Dapr.Actors;
Expand All @@ -19,8 +12,6 @@

var builder = WebApplication.CreateBuilder(args);
builder.Services.AddSingleton<WebhookEventProcessor, GithubWebHookProcessor>();
builder.Services.AddTransient(CreateKernel);
builder.Services.AddTransient(CreateMemory);
builder.Services.AddHttpClient();

builder.Services.AddSingleton(s =>
Expand Down Expand Up @@ -162,44 +153,4 @@ static async Task HandleEvent(IActorProxyFactory proxyFactory, string type, stri
{
throw;
}
}

static ISemanticTextMemory CreateMemory(IServiceProvider provider)
{
var openAiConfig = provider.GetService<IOptions<OpenAIOptions>>().Value;
var qdrantConfig = provider.GetService<IOptions<QdrantOptions>>().Value;

var loggerFactory = LoggerFactory.Create(builder =>
{
builder
.SetMinimumLevel(LogLevel.Debug)
.AddConsole()
.AddDebug();
});

var memoryBuilder = new MemoryBuilder();
return memoryBuilder.WithLoggerFactory(loggerFactory)
.WithQdrantMemoryStore(qdrantConfig.Endpoint, qdrantConfig.VectorSize)
.WithAzureOpenAITextEmbeddingGeneration(openAiConfig.EmbeddingDeploymentOrModelId, openAiConfig.Endpoint, openAiConfig.ApiKey)
.Build();
}

static Kernel CreateKernel(IServiceProvider provider)
{
var openAiConfig = provider.GetService<IOptions<OpenAIOptions>>().Value;
var clientOptions = new OpenAIClientOptions();
clientOptions.Retry.NetworkTimeout = TimeSpan.FromMinutes(5);
var openAIClient = new OpenAIClient(new Uri(openAiConfig.Endpoint), new AzureKeyCredential(openAiConfig.ApiKey), clientOptions);
var builder = Kernel.CreateBuilder();
builder.Services.AddLogging(c => c.AddConsole().AddDebug().SetMinimumLevel(LogLevel.Debug));
builder.Services.AddAzureOpenAIChatCompletion(openAiConfig.DeploymentOrModelId, openAIClient);
builder.Services.ConfigureHttpClientDefaults(c =>
{
c.AddStandardResilienceHandler().Configure(o =>
{
o.Retry.MaxRetryAttempts = 5;
o.Retry.BackoffType = Polly.DelayBackoffType.Exponential;
});
});
return builder.Build();
}

This file was deleted.

Loading