Giter Club home page Giter Club logo

project-oagents's Introduction

⚠️ This project is still an experimentation phase and is not intended to be used in production yet.

AI Agents Framework

An opinionated .NET framework, that is built on top of Semantic Kernel and Orleans, which helps creating and hosting event-driven AI Agents.

At the moment the library resides in src/ only, but we plan to publish them as a Nuget Package in the future.

Examples

We have created a few examples to help you get started with the framework and to explore its capabilities.

  • GitHub Dev Team Sample: Build an AI Developer Team using event-driven agents, that help you automate the requirements engineering, planning, and coding process on GitHub.

  • Marketing Team Sample: Create a marketing campaign using a content writer, graphic designer and social media manager.

  • Support center sample: Model a call center team, each member is an expert in it's own domain and one is orchestrating the asks of the user based on the intent.

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 the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

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, see the LICENSE file, and grant you a license to any code in the repository under the MIT License, see the LICENSE-CODE file.

Microsoft, Windows, Microsoft Azure and/or other Microsoft products and services referenced in the documentation may be either trademarks or registered trademarks of Microsoft in the United States and/or other countries. The licenses for this project do not grant you rights to use any Microsoft names, logos, or trademarks. Microsoft's general trademark guidelines can be found at http://go.microsoft.com/fwlink/?LinkID=254653.

Privacy information can be found at https://privacy.microsoft.com/en-us/

Microsoft and any contributors reserve all other rights, whether under their respective copyrights, patents, or trademarks, whether by implication, estoppel or otherwise.

project-oagents's People

Contributors

rysweet avatar kostapetan avatar crgarcia12 avatar microsoftopensource avatar roydemilde avatar alessandro-avila avatar startrightprod[bot] avatar suuus avatar mohdali avatar reubenbond avatar robinmanuelthiel avatar microsoft-github-policy-service[bot] avatar

Stargazers

Tim Wigmore-Welsh avatar  avatar Julia Kordick avatar Gary avatar Sunil Sattiraju avatar  avatar Ben Palmer avatar  avatar Gavin avatar Basit Mustafa avatar Devis Lucato avatar  avatar Robertas Greicius avatar Pascal van der Heiden avatar John avatar xiang zou avatar Brad Pillow avatar Ulan Sametov avatar Maxim Salnikov avatar Gisela Torres avatar jaafar skafi avatar JoshHartzell-Ascensus avatar SB avatar Dawn avatar Petr Kadomtsev avatar James Yeung avatar Jeffrey Hu avatar  avatar Tosin Shada avatar Zachary BENSALEM avatar Lynn Orrell avatar Roozbeh avatar MACK Mathieu avatar David Barkol avatar Ashish Talati avatar Onur Akdeniz avatar  avatar Adolfo avatar BlueSharkPartners avatar Christian Celso Bewzenko avatar AI/ML Engineer avatar Jose Luis Latorre Millas avatar Fabian avatar  avatar Andrew Hesky avatar  avatar  avatar Veikko Eeva avatar Dawid Wysocki avatar  avatar Bruce avatar Alex Troshkin avatar Muhammad Miftah avatar Jorge Candeias avatar Torstein Auensen avatar  avatar  avatar  avatar Matt Kruczek avatar  avatar  avatar SHAFFIULLAH  avatar Laurent Kempé avatar wikpy avatar Cem Turan avatar  avatar  avatar Manesh avatar ksemenenko avatar Zhu Lijun avatar Rocky LIU Yan avatar Joakim Riedel avatar Leo avatar Iikka Luoma-aho avatar Tequila Sunset avatar Jeffrey Zhang avatar wangchunlong avatar  avatar Feynman Loo avatar Jared Thirsk avatar  avatar Birgir Karl Oskarsson avatar  avatar Govind Kamtamneni avatar  avatar  avatar Alexander Ryabets avatar Jason Frankel avatar Turker Ayan avatar  avatar Katarina Svedman avatar Christopher Haws avatar Nafkha-Med Amine avatar  avatar John Yokim avatar maskx avatar geffzhang avatar Maximus avatar Zixu Zhao avatar Uroosa Imtiaz avatar

Watchers

Ivan avatar James Cloos avatar Alexander Siniouguine avatar  avatar Veikko Eeva avatar .NET Foundation Contribution License Agreements avatar  avatar  avatar  avatar  avatar  avatar

project-oagents's Issues

Update documentation

Documentation is grossly outdated and we don't even have proper demo/explanation of the github flow, nor the abstractions that surfaced while building this.

I suggest we work on documenting:

  • How to run this locally
  • Reasoning and rationally behind the project and the AiAgents
  • Event flow for the GH dev agents

Samles - Help biostatistician extract data from clinical trials

biostatisticians spend a massive among of time gathering clinical trials data, statistics to figure out where a given drug would be best suits based in race, body condition; sick, pregnant, overweight. Data are typically extracted from following links that is public and links to FDA authorities:

Sample data:

Image

Ask: Ideally, a model that chooses the personas that are best for the job. If they for example have 50 agents that the job can pick from, the first initial task is to select the best 5-10 agents to solve the given task; ex. Dev, project manager, approver, writer. This is an interesting approach.

Sample - Various use cases

Customers are building their own OpenAI portal experience that uses; Phi, dall-e, gpt-4 vision for internal services.
They want to avoid as much as possible that employees do not leak confidential data via openai but should default to their internal website. Dall-e is leading the charge and 2-3 partners are driving this with the assistance of PG, AI CSA's and GBB (AI and App Inno).
Awaiting next step and round of funding.

BUG: error messages get swallowed up by dev agents

     at Azure.Core.HttpPipelineExtensions.ProcessMessageAsync(HttpPipeline pipeline, HttpMessage message, RequestContext requestContext, CancellationToken cancellationToken)
     at Azure.AI.OpenAI.OpenAIClient.GetEmbeddingsAsync(EmbeddingsOptions embeddingsOptions, CancellationToken cancellationToken)
     at Microsoft.SemanticKernel.Connectors.OpenAI.ClientCore.RunRequestAsync[T](Func`1 request)
     --- End of inner exception stack trace ---
     at Microsoft.SemanticKernel.Connectors.OpenAI.ClientCore.RunRequestAsync[T](Func`1 request)
     at Microsoft.SemanticKernel.Connectors.OpenAI.ClientCore.GetEmbeddingsAsync(IList`1 data, Kernel kernel, CancellationToken cancellationToken)
     at Microsoft.SemanticKernel.Embeddings.EmbeddingGenerationExtensions.GenerateEmbeddingAsync[TValue,TEmbedding](IEmbeddingGenerationService`2 generator, TValue value, Kernel kernel, CancellationToken cancellationToken)
     at Microsoft.SemanticKernel.Memory.SemanticTextMemory.SearchAsync(String collection, String query, Int32 limit, Double minRelevanceScore, Boolean withEmbeddings, Kernel kernel, CancellationToken cancellationToken)+MoveNext()
     at Microsoft.SemanticKernel.Memory.SemanticTextMemory.SearchAsync(String collection, String query, Int32 limit, Double minRelevanceScore, Boolean withEmbeddings, Kernel kernel, CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()

2
at Microsoft.AI.Agents.Orleans.AiAgent`1.AddKnowledge(String instruction, String index, KernelArguments arguments) in /Users/ryan/src/project-oagents/src/Microsoft.AI.Agents.Orleans/AiAgent.cs:line 68
at Microsoft.AI.DevTeam.ProductManager.CreateReadme(String ask) in /Users/ryan/src/project-oagents/samples/gh-flow/src/Microsoft.AI.DevTeam/Agents/ProductManager/ProductManager.cs:line 65
Microsoft.AI.DevTeam.ProductManager: Error: Error creating readme

Microsoft.SemanticKernel.HttpOperationException: This model's maximum context length is 4095 tokens, however you requested 5730 tokens (5730 in your prompt; 0 for the completion). Please reduce your prompt; or completion length.
Status: 400 (model_error)

Content:
{
"error": {
"message": "This model's maximum context length is 4095 tokens, however you requested 5730 tokens (5730 in your prompt; 0 for the completion). Please reduce your prompt; or completion length.",
"type": "invalid_request_error",
"param": null,
"code": null
}
}


Error is in the logs but what the bot posts in issues isn't helpful: "Sorry, I got tired, can you try again please?"

[GitHub Dev Team Sample] Misleading usage of term "GitHub Flow"

The repository often mentions "GitHub Flow" or gh-flow, which is misleading, because there already is an official GitHub Flow in the industry, which is a common branching pattern. It was misleading to me and might also be to others. I'd suggest finding a new name for it.

Suggestion: "Developer Agents Workflow on GitHub" (sounds less GitHub-official, is more descriptive)

[GitHub Dev Team Sample] Revisit Flow of working with dozens of Issues in GitHub

Is a Project Manager and Software Engineer, I find the flow of opening dozens of GitHub Issues for the single tasks of the agent very unintuitive and confusing. Especially, as it does not reflect what humans would do. In addition, I think it's weird that the agents post the code they want to generate as comments to a GitHub issue instead of opening a Pull Request, where code can be properly discussed. Lastly, closing issues before the actual work on them is done also looks like a bad practice to me.

Here is, how an ideal flow would look like to me:

  1. Human Project Manager opens a GitHub issue with a description of what to achieve
  2. Human Project Manager labels the issue with dev-agents label, to trigger the AI work
  3. First Agents starts the work and describes the project plan in Markdown as a comment to the issue
  4. Human Project Manager can give feedback and iterate on it in the comments.
  5. Once satisfied, the issue get labeled differently (e.g. coding-plan), which triggers another Agent to plan the coding work
  6. An Agent generates the step-by-step plan (To Do List) and posts it as a comment to the issue
  7. Human Project Manager can give feedback and iterate on it in the comments.
  8. Once satisfied, the issue gets labeled again (e.g. start-coding), which triggers another Agent to start the coding work
  9. An Agent creates a new branch, commits code and creates a Pull Request, with the code changes and links the PR to the issue
  10. Human Developer can give feedback on the code and iterate on it in the PR comment.
  11. Once satisfied, the PR gets merged and the Issue automatically gets closed

Am I missing anything, why the flow is not like this but happens across so many issues?

Am I misunderstanding anything, which makes my suggested flow not possible?

Feature: Plans for adding memories to the dev team skills.

Some initial thoughts on adding memories.

Types of memories

I think we want the skills to be able to take advantage of multiple types of memories. This will allow for specialization, and for adding new types in the future, while keeping the collections topic focused and clean.

Memory collection for the Repo

Scope: per repository
This collection would include

  • all the files in the repo, ideally chunked according to their type/structure
  • Code Explanations for all the files in the repo, produced by the model
  • Issues from the repo
  • a "repo map" of project structure in natural language or maybe we find/invent a format

Shared Memory across the Skills

Scope: per repository (possibly per v-team - what if teams work on multiple repos?)
This collection would be used to help coordinate actions across the v-team of AI skills:

  • including all instructions received from the human collaborators
  • conversation history
  • identity and specializations of each skill in the V-team
  • role-assignments/what each member of the team is working on
  • for shared systems, (if the plan specifies a shared component) then key details of the shared system (eg config var names, directory paths, class names, etc)
  • think of this as shared memory for all the skills, we could actually make a record that stores important shared state in the vectored and is retrieved as needed by each skill

Working memory within a single skill

Scope: per repository (possibly per v-team - what if teams work on multiple repos?)
This collection would implement the working memory for an individual skill (or skill group) and include the original prompt and conversation history for that skill, as well as any data on the files that the skill may have modified or generated.

Specialization Memories

Scope: Any
These would be special read-only curated collections designed to give an AI agent a set of memories around some specialized knowledge. Think of in the Matrix when Neo says "Now I know KungFu!". They would be wired up through configuration or code depending on the needs of the skill.
eg:

  • WAF framework, 12 Factor, etc for Azure architecture
  • .NET learning content, .NET best practices, r9 SDK etc for .NET specialists
  • ^^^^ for each programming language...
  • CVEs and MITRE, security coding standards, examples of security fix before and after etc for security specialist
  • patterns and practices for performance improvement for specific languages.
    Each of these types of memories should end up being a long running shared service with its own nuget etc that can just be included with a "using". They can improve over time as new documentation or code becomes available.

Implementation

Some thoughts on how to do the implementation:

  • let's make each type of memory a separate project but stick to an API that is compatible with the SK MemoryStore
  • while prompt templating {{recalll}} can be useful, more likely we will need a pattern that is specific to each skill for bringing in the memories at the right spot using the vector search.
  • Each skill would likely apply an hierarchy to the memories, with an implied flow:
    1. Prompt assembly
    1. Shared Memory for details relevant to the prompt
    1. Working Memory details relevant to the prompt
    1. Specializations collections that are relevant to the prompt

We would need to allocate a certain amount of the token budget to each memory type, but for instance if vector search of working memory doesn't yield relevant results we might give some of its budget to the Specializations.

We should probably build the memory initialization as a background service that starts and does a warm-up when the app starts.

Rethink the agent hierarchy

Architect that works on the high level plan, then a dev lead per subtask, which orchestrates developer/tester

Marketing sample app vNext improvements

Tracking the next things we could add to the marketing app

  • Make it multi-user
  • Create a boilerplate project
  • Nuget for AI Agent for Boilerplate
  • Readme with getting started
  • azd for local debugging
  • Docker support
  • Delete the controller and the Ask
  • Test project
  • Pipeline

Tasks

No tasks being tracked yet.

Missing information about what this repo is and how it technically works

At the moment, the repo only some (hard to read/understand) text about the motivation of the repository and the rough flow. What I think is missing is detail around

  1. How it was built (Semantic Kernel, C#, which Web Services and how many) = Architecture overview
  2. Quick Intro to "What are Agents" and how they work
  3. Description of the different Agents that this repo uses and how they operate

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.