A programming framework for agentic AI
breaking change WIP
Kosta Petan77daf0c2035e
diff --git a/src/apps/cli/cli.csproj b/src/apps/cli/cli.csprojindex d1bfcd0ad..b930ed06f 100644--- a/src/apps/cli/cli.csproj+++ b/src/apps/cli/cli.csproj@@ -13,8 +13,8 @@<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="7.0.0" /><PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" /><PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />- <PackageReference Include="Microsoft.SemanticKernel" Version="0.24.230918.1-preview" />- <PackageReference Include="Microsoft.SemanticKernel.Connectors.Memory.Qdrant" Version="0.24.230918.1-preview" />+ <PackageReference Include="Microsoft.SemanticKernel" Version="1.0.0-beta5" />+ <PackageReference Include="Microsoft.SemanticKernel.Connectors.Memory.Qdrant" Version="1.0.0-beta5" /><PackageReference Include="Testcontainers" Version="3.2.0" /><ProjectReference Include="..\..\libs\Microsoft.AI.DevTeam.Skills\Microsoft.AI.DevTeam.Skills.csproj" /></ItemGroup>diff --git a/src/apps/gh-flow-df/gh-flow-df.csproj b/src/apps/gh-flow-df/gh-flow-df.csprojindex aba8a20b4..07d73342f 100644--- a/src/apps/gh-flow-df/gh-flow-df.csproj+++ b/src/apps/gh-flow-df/gh-flow-df.csproj@@ -27,8 +27,8 @@<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="1.19.0" /><PackageReference Include="Microsoft.ApplicationInsights.WorkerService" Version="2.21.0" /><PackageReference Include="Octokit.Webhooks.AzureFunctions" Version="2.0.3" />- <PackageReference Include="Microsoft.SemanticKernel" Version="0.24.230918.1-preview" />- <PackageReference Include="Microsoft.SemanticKernel.Connectors.Memory.Qdrant" Version="0.24.230918.1-preview" />+ <PackageReference Include="Microsoft.SemanticKernel" Version="1.0.0-beta5" />+ <PackageReference Include="Microsoft.SemanticKernel.Connectors.Memory.Qdrant" Version="1.0.0-beta5" /><PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Storage" Version="5.0.0" /><PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Tables" Version="1.2.0" /><PackageReference Include="Octokit" Version="7.1.0" />diff --git a/src/apps/gh-flow/gh-flow.csproj b/src/apps/gh-flow/gh-flow.csprojindex 3596510a5..cc7e902d1 100644--- a/src/apps/gh-flow/gh-flow.csproj+++ b/src/apps/gh-flow/gh-flow.csproj@@ -15,7 +15,7 @@<ItemGroup><PackageReference Include="Octokit.Webhooks.AspNetCore" Version="2.0.3" />- <PackageReference Include="Microsoft.SemanticKernel.Connectors.Memory.Qdrant" Version="0.24.230918.1-preview" />+ <PackageReference Include="Microsoft.SemanticKernel.Connectors.Memory.Qdrant" Version="1.0.0-beta5" /><PackageReference Include="Microsoft.Orleans.Server" Version="7.2.1" /><PackageReference Include="Microsoft.Orleans.Persistence.Cosmos" Version="7.2.1" /><PackageReference Include="Microsoft.Orleans.Clustering.Cosmos" Version="7.2.1" />diff --git a/src/apps/seed-memory/seed-memory.csproj b/src/apps/seed-memory/seed-memory.csprojindex 5bb4ec8ec..e73fad29e 100644--- a/src/apps/seed-memory/seed-memory.csproj+++ b/src/apps/seed-memory/seed-memory.csproj@@ -12,8 +12,8 @@<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" /><PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="7.0.0" /><PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />- <PackageReference Include="Microsoft.SemanticKernel" Version="0.24.230918.1-preview" />- <PackageReference Include="Microsoft.SemanticKernel.Connectors.Memory.Qdrant" Version="0.24.230918.1-preview" />+ <PackageReference Include="Microsoft.SemanticKernel" Version="1.0.0-beta5" />+ <PackageReference Include="Microsoft.SemanticKernel.Connectors.Memory.Qdrant" Version="1.0.0-beta5" /><PackageReference Include="PdfPig" Version="0.1.8-alpha-20230529-6daa2" /><PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" /></ItemGroup>diff --git a/src/libs/Elsa.SemanticKernel/Elsa.SemanticKernel.csproj b/src/libs/Elsa.SemanticKernel/Elsa.SemanticKernel.csprojindex c6f821073..85445d758 100644--- a/src/libs/Elsa.SemanticKernel/Elsa.SemanticKernel.csproj+++ b/src/libs/Elsa.SemanticKernel/Elsa.SemanticKernel.csproj@@ -21,8 +21,8 @@<PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1" /><PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="7.0.0" /><PackageReference Include="AspNetCore.Authentication.ApiKey" Version="7.0.0" />- <PackageReference Include="Microsoft.SemanticKernel" Version="0.24.230918.1-preview" />- <PackageReference Include="Microsoft.SemanticKernel.Connectors.Memory.Qdrant" Version="0.24.230918.1-preview" />+ <PackageReference Include="Microsoft.SemanticKernel" Version="1.0.0-beta5" />+ <PackageReference Include="Microsoft.SemanticKernel.Connectors.Memory.Qdrant" Version="1.0.0-beta5" /><ProjectReference Include="..\Microsoft.AI.DevTeam.Skills\Microsoft.AI.DevTeam.Skills.csproj" /></ItemGroup>diff --git a/src/libs/Microsoft.AI.DevTeam.Skills/Developer.cs b/src/libs/Microsoft.AI.DevTeam.Skills/Developer.csindex 50ffc01da..a6e51484c 100644--- a/src/libs/Microsoft.AI.DevTeam.Skills/Developer.cs+++ b/src/libs/Microsoft.AI.DevTeam.Skills/Developer.cs@@ -48,21 +48,49 @@ public static class Developer {public static SemanticFunctionConfig Explain = new SemanticFunctionConfig{PromptTemplate = """- You are a Software Developer.- Please explain the code that is in the input below. You can include references or documentation links in your explanation.- Also where appropriate please output a list of keywords to describe the code or its capabilities.- example:- Keywords: Azure, networking, security, authentication+ You are an experienced software developer, with strong experience in Azure and Microsoft technologies.+ Extract the key features and capabilities of the code file below, with the intent to build an understanding of an entire code repository.+ You can include references or documentation links in your explanation. Also where appropriate please output a list of keywords to describe the code or its capabilities.+ Example:+ Keywords: Azure, networking, security, authentication- If the code's purpose is not clear output an error:+ ===code===+ {{$input}}+ ===end-code===+ Only include the points in a bullet point format and DON'T add anything outside of the bulleted list.+ Be short and concise.+ If the code's purpose is not clear output an error:Error: The model could not determine the purpose of the code.-- --- Input: {{$input}}""",Name = nameof(Explain),SkillName = nameof(CodeExplainer),- Description = "From a description of a coding task out put the code or scripts necessary to complete the task.",+ Description = "From a source file produce an explanation of what the code does",+ MaxTokens = 6500,+ Temperature = 0.0,+ TopP = 0.0,+ PPenalty = 0.0,+ FPenalty = 0.0+ };++ public static SemanticFunctionConfig ConsolidateUnderstanding = new SemanticFunctionConfig+ {+ PromptTemplate = """+ You are an experienced software developer, with strong experience in Azure and Microsoft technologies.+ You are trying to build an understanding of the codebase from code files. This is the current understanding of the project:+ ===current-understanding===+ {{$input}}+ ===end-current-understanding===+ and this is the new information that surfaced+ ===new-understanding===+ {{$newUnderstanding}}+ ===end-new-understanding===+ Your job is to update your current understanding with the new information.+ Only include the points in a bullet point format and DON'T add anything outside of the bulleted list.+ Be short and concise.+ """,+ Name = nameof(Explain),+ SkillName = nameof(CodeExplainer),+ Description = "From a source file produce an explanation of what the code does",MaxTokens = 6500,Temperature = 0.0,TopP = 0.0,@@ -70,3 +98,5 @@ public static class Developer {FPenalty = 0.0};}++diff --git a/src/libs/Microsoft.AI.DevTeam.Skills/Microsoft.AI.DevTeam.Skills.csproj b/src/libs/Microsoft.AI.DevTeam.Skills/Microsoft.AI.DevTeam.Skills.csprojindex 11eebbb3e..fb2eeb6a7 100644--- a/src/libs/Microsoft.AI.DevTeam.Skills/Microsoft.AI.DevTeam.Skills.csproj+++ b/src/libs/Microsoft.AI.DevTeam.Skills/Microsoft.AI.DevTeam.Skills.csproj@@ -7,6 +7,6 @@</PropertyGroup><ItemGroup>- <PackageReference Include="Microsoft.SemanticKernel" Version="0.24.230918.1-preview" />+ <PackageReference Include="Microsoft.SemanticKernel" Version="1.0.0-beta5" /></ItemGroup></Project>diff --git a/src/libs/Microsoft.AI.DevTeam/Actors/Ingester/Ingester.cs b/src/libs/Microsoft.AI.DevTeam/Actors/Ingester/Ingester.csindex 40ab7103a..f724a56e8 100644--- a/src/libs/Microsoft.AI.DevTeam/Actors/Ingester/Ingester.cs+++ b/src/libs/Microsoft.AI.DevTeam/Actors/Ingester/Ingester.cs@@ -23,9 +23,7 @@ public class Ingester : SemanticPersona, IIngestRepovar language = await _ghService.GetMainLanguage(org, repo);var files = await _ghService.GetFiles(org, repo, branch, Language.Filters[language]);- var pm = GrainFactory.GetGrain<IManageProduct>(0, suffix);var dev = GrainFactory.GetGrain<IDevelopCode>(0, suffix);- var devLead = GrainFactory.GetGrain<ILeadDevelopment>(0, suffix);foreach (var file in files){@@ -33,10 +31,7 @@ public class Ingester : SemanticPersona, IIngestRepocodeAnalysis.ToList().ForEach(async c =>await _kernel.Memory.SaveInformationAsync(MemorySegment, c.CodeBlock, Guid.NewGuid().ToString(), c.Meaning));- Task.WaitAll(new[] {- pm.BuildUnderstanding(file.Content),- dev.BuildUnderstanding(file.Content),- devLead.BuildUnderstanding(file.Content)});+ await dev.BuildUnderstanding(file.Content);}}}diff --git a/src/libs/Microsoft.AI.DevTeam/Actors/ProductManager/ProductManager.cs b/src/libs/Microsoft.AI.DevTeam/Actors/ProductManager/ProductManager.csindex 4f4bde3ca..a217aed05 100644--- a/src/libs/Microsoft.AI.DevTeam/Actors/ProductManager/ProductManager.cs+++ b/src/libs/Microsoft.AI.DevTeam/Actors/ProductManager/ProductManager.cs@@ -9,7 +9,7 @@ public class ProductManager : SemanticPersona, IManageProductprivate readonly IKernel _kernel;protected override string MemorySegment => "pm-memory";- public ProductManager(IKernel kernel,[PersistentState("state", "messages")] IPersistentState<ChatHistory> state) : base(state)+ public ProductManager(IKernel kernel,[PersistentState("state", "messages")] IPersistentState<SemanticPersonaState> state) : base(state){_kernel = kernel;}@@ -39,4 +39,9 @@ public class ProductManager : SemanticPersona, IManageProductawait _state.WriteStateAsync();return resultMessage;}++ public Task<string> BuildUnderstanding(string content)+ {+ throw new NotImplementedException();+ }}diff --git a/src/libs/Microsoft.AI.DevTeam/Microsoft.AI.DevTeam.csproj b/src/libs/Microsoft.AI.DevTeam/Microsoft.AI.DevTeam.csprojindex b3c2a1dd6..4e767065d 100644--- a/src/libs/Microsoft.AI.DevTeam/Microsoft.AI.DevTeam.csproj+++ b/src/libs/Microsoft.AI.DevTeam/Microsoft.AI.DevTeam.csproj@@ -10,7 +10,7 @@<PackageReference Include="Microsoft.Orleans.Sdk" Version="7.2.1" /><PackageReference Include="Microsoft.Orleans.Runtime" Version="7.2.1" /><PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" />- <PackageReference Include="Microsoft.SemanticKernel" Version="0.24.230918.1-preview" />+ <PackageReference Include="Microsoft.SemanticKernel" Version="1.0.0-beta5" /><PackageReference Include="Octokit" Version="7.1.0" /><PackageReference Include="GitHubJwt" Version="0.0.6" /><PackageReference Include="Azure.ResourceManager.ContainerInstance" Version="1.2.0-beta.1" />