├── website
├── static
│ ├── .nojekyll
│ ├── img
│ │ ├── ag.ico
│ │ ├── flaml_logo.ico
│ │ ├── autogen_app.png
│ │ ├── chat_example.png
│ │ ├── autogen_agentchat.png
│ │ ├── gallery
│ │ │ ├── autotx.png
│ │ │ ├── default.png
│ │ │ ├── robot.jpg
│ │ │ ├── webagent.jpg
│ │ │ ├── TensionCode.png
│ │ │ ├── x-force-ide-ui.png
│ │ │ └── composio-autogen.png
│ │ ├── autogen.svg
│ │ └── fast.svg
│ └── js
│ │ └── custom.js
├── babel.config.js
├── docs
│ ├── topics
│ │ ├── groupchat
│ │ │ └── _category_.json
│ │ ├── handling_long_contexts
│ │ │ └── _category_.json
│ │ ├── prompting-and-reasoning
│ │ │ └── _category_.json
│ │ ├── code-execution
│ │ │ └── _category_.json
│ │ ├── openai-assistant
│ │ │ └── _category_.json
│ │ └── non-openai-models
│ │ │ ├── _category_.json
│ │ │ └── images
│ │ │ └── cloudlocalproxy.png
│ ├── Use-Cases
│ │ └── images
│ │ │ ├── app.png
│ │ │ ├── agent_example.png
│ │ │ └── autogen_agents.png
│ ├── autogen-studio
│ │ └── img
│ │ │ ├── agent_new.png
│ │ │ ├── model_new.png
│ │ │ ├── skill.png
│ │ │ ├── model_openai.png
│ │ │ ├── workflow_chat.png
│ │ │ ├── workflow_new.png
│ │ │ ├── workflow_test.png
│ │ │ ├── agent_assistant.png
│ │ │ ├── agent_groupchat.png
│ │ │ ├── agent_skillsmodel.png
│ │ │ ├── ara_stockprices.png
│ │ │ ├── workflow_export.png
│ │ │ ├── workflow_profile.png
│ │ │ └── workflow_sequential.png
│ ├── tutorial
│ │ └── assets
│ │ │ ├── group-chat.png
│ │ │ ├── nested-chats.png
│ │ │ ├── conversable-agent.jpg
│ │ │ ├── human-in-the-loop.png
│ │ │ ├── two-agent-chat.png
│ │ │ ├── code-executor-docker.png
│ │ │ ├── code-executor-no-docker.png
│ │ │ ├── sequential-two-agent-chat.png
│ │ │ └── code-execution-in-conversation.png
│ ├── ecosystem
│ │ ├── img
│ │ │ ├── ecosystem-composio.png
│ │ │ ├── ecosystem-fabric.png
│ │ │ ├── ecosystem-llamaindex.png
│ │ │ ├── ecosystem-memgpt.png
│ │ │ ├── ecosystem-ollama.png
│ │ │ ├── ecosystem-databricks.png
│ │ │ └── ecosystem-promptflow.png
│ │ ├── pgvector.md
│ │ ├── llamaindex.md
│ │ ├── ollama.md
│ │ ├── composio.md
│ │ ├── memgpt.md
│ │ ├── databricks.md
│ │ ├── microsoft-fabric.md
│ │ └── promptflow.md
│ ├── contributor-guide
│ │ └── pre-commit.md
│ └── notebooks.mdx
├── blog
│ ├── 2023-10-18-RetrieveChat
│ │ └── img
│ │ │ ├── autogen-rag.gif
│ │ │ └── retrievechat-arch.png
│ ├── 2024-05-24-Agent
│ │ └── img
│ │ │ ├── agents.png
│ │ │ └── leadership.png
│ ├── 2023-06-28-MathChat
│ │ └── img
│ │ │ ├── result.png
│ │ │ └── mathchatflow.png
│ ├── 2023-11-06-LMM-Agent
│ │ └── img
│ │ │ └── teaser.png
│ ├── 2023-11-09-EcoAssistant
│ │ └── img
│ │ │ ├── chat.png
│ │ │ ├── results.png
│ │ │ ├── system.png
│ │ │ ├── template.png
│ │ │ └── template-demo.png
│ ├── 2024-02-29-StateFlow
│ │ └── img
│ │ │ ├── alfworld.png
│ │ │ ├── bash_result.png
│ │ │ ├── intercode.png
│ │ │ └── sf_example_1.png
│ ├── 2023-11-13-OAI-assistants
│ │ └── img
│ │ │ └── teaser.jpg
│ ├── 2023-11-20-AgentEval
│ │ └── img
│ │ │ ├── agenteval-CQ.png
│ │ │ ├── math-problems-plot.png
│ │ │ └── tasks-taxonomy.png
│ ├── 2024-01-25-AutoGenBench
│ │ └── img
│ │ │ └── teaser.jpg
│ ├── 2024-02-02-AutoAnny
│ │ └── img
│ │ │ └── AutoAnnyLogo.jpg
│ ├── 2024-02-11-FSM-GroupChat
│ │ └── img
│ │ │ ├── FSM_logic.png
│ │ │ ├── teaser.jpg
│ │ │ └── FSM_of_multi-agents.png
│ ├── 2024-03-03-AutoGen-Update
│ │ └── img
│ │ │ ├── gaia.png
│ │ │ ├── love.png
│ │ │ ├── teach.png
│ │ │ ├── contributors.png
│ │ │ └── dalle_gpt4v.png
│ ├── 2023-04-21-LLM-tuning-math
│ │ └── img
│ │ │ ├── level2algebra.png
│ │ │ ├── level3algebra.png
│ │ │ ├── level4algebra.png
│ │ │ └── level5algebra.png
│ ├── 2023-05-18-GPT-adaptive-humaneval
│ │ └── img
│ │ │ ├── design.png
│ │ │ └── humaneval.png
│ ├── 2024-03-11-AutoDefense
│ │ └── imgs
│ │ │ ├── architecture.png
│ │ │ ├── table-4agents.png
│ │ │ ├── table-agents.png
│ │ │ ├── defense-agency-design.png
│ │ │ └── table-compared-methods.png
│ ├── 2023-10-26-TeachableAgent
│ │ └── img
│ │ │ └── teachable-arch.png
│ ├── 2023-11-26-Agent-AutoBuild
│ │ └── img
│ │ │ └── agent_autobuild.png
│ ├── 2023-12-01-AutoGenStudio
│ │ └── img
│ │ │ ├── autogenstudio_home.png
│ │ │ ├── autogenstudio_config.png
│ │ │ └── autogenstudio_skills.png
│ └── 2023-12-23-AgentOptimizer
│ │ └── img
│ │ └── agentoptimizer.png
├── src
│ ├── components
│ │ ├── HomepageFeatures.module.css
│ │ └── NotebookUtils.js
│ └── pages
│ │ └── index.module.css
├── pydoc-markdown.yml
├── .gitignore
└── build_website.sh
├── autogen
├── extensions
│ └── __init__.py
├── agentchat
│ ├── contrib
│ │ ├── __init__.py
│ │ ├── vectordb
│ │ │ └── __init__.py
│ │ ├── capabilities
│ │ │ ├── __init__.py
│ │ │ └── agent_capability.py
│ │ └── agent_eval
│ │ │ └── README.md
│ └── __init__.py
├── version.py
├── cache
│ └── __init__.py
├── logger
│ ├── __init__.py
│ └── logger_factory.py
├── __init__.py
├── io
│ └── __init__.py
├── types.py
├── coding
│ ├── __init__.py
│ └── jupyter
│ │ ├── __init__.py
│ │ └── base.py
└── oai
│ └── __init__.py
├── test
├── agentchat
│ ├── extensions
│ │ ├── __init__.py
│ │ └── tsp_api.py
│ └── contrib
│ │ └── agent_eval
│ │ └── test_task.py
├── test_files
│ ├── radius.txt
│ ├── example.pdf
│ ├── example.docx
│ ├── test_image.png
│ ├── example.txt
│ └── agenteval-in-out
│ │ └── samples
│ │ └── sample_math_evaluated_results.json
├── coding
│ └── test_factory.py
├── twoagent.py
└── conftest.py
├── samples
├── apps
│ ├── cap
│ │ ├── py
│ │ │ ├── autogencap
│ │ │ │ ├── __init__.py
│ │ │ │ ├── proto
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── proto-instructions.txt
│ │ │ │ │ ├── Autogen.proto
│ │ │ │ │ └── CAP.proto
│ │ │ │ ├── ag_adapter
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── AGActor.py
│ │ │ │ │ └── agent.py
│ │ │ │ ├── requirements.txt
│ │ │ │ ├── Constants.py
│ │ │ │ ├── setup.py
│ │ │ │ ├── Config.py
│ │ │ │ └── utility.py
│ │ │ ├── demo
│ │ │ │ ├── standalone
│ │ │ │ │ ├── Broker.py
│ │ │ │ │ ├── directory_svc.py
│ │ │ │ │ └── _paths.py
│ │ │ │ ├── _paths.py
│ │ │ │ ├── AGDemo.py
│ │ │ │ ├── SimpleActorDemo.py
│ │ │ │ ├── RemoteAGDemo.py
│ │ │ │ └── single_threaded.py
│ │ │ └── pyproject.toml
│ │ ├── c#
│ │ │ └── Readme.md
│ │ ├── c++
│ │ │ └── Readme.md
│ │ ├── node
│ │ │ └── Readme.md
│ │ └── TODO.md
│ ├── autogen-studio
│ │ ├── requirements.txt
│ │ ├── autogenstudio
│ │ │ ├── web
│ │ │ │ └── __init__.py
│ │ │ ├── database
│ │ │ │ ├── migrations
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── README
│ │ │ │ │ └── script.py.mako
│ │ │ │ └── __init__.py
│ │ │ ├── utils
│ │ │ │ └── __init__.py
│ │ │ ├── version.py
│ │ │ └── __init__.py
│ │ ├── setup.py
│ │ ├── frontend
│ │ │ ├── .env.default
│ │ │ ├── postcss.config.js
│ │ │ ├── .gitignore
│ │ │ ├── src
│ │ │ │ ├── images
│ │ │ │ │ └── icon.png
│ │ │ │ ├── pages
│ │ │ │ │ ├── index.tsx
│ │ │ │ │ ├── build.tsx
│ │ │ │ │ └── gallery
│ │ │ │ │ │ └── index.tsx
│ │ │ │ └── hooks
│ │ │ │ │ └── store.tsx
│ │ │ ├── gatsby-browser.js
│ │ │ ├── gatsby-ssr.tsx
│ │ │ ├── tsconfig.json
│ │ │ ├── LICENSE
│ │ │ └── tailwind.config.js
│ │ ├── docs
│ │ │ └── ara_stockprices.png
│ │ ├── MANIFEST.in
│ │ ├── .gitignore
│ │ └── Dockerfile
│ ├── auto-anny
│ │ ├── requirements.txt
│ │ └── images
│ │ │ └── icon.png
│ ├── promptflow-autogen
│ │ ├── .gitignore
│ │ ├── requirements.txt
│ │ ├── azure_openai.yaml
│ │ ├── custom_conn.yaml
│ │ └── flow.dag.yaml
│ └── websockets
│ │ ├── README.md
│ │ └── setup.py
├── tools
│ ├── autogenbench
│ │ ├── autogenbench
│ │ │ ├── version.py
│ │ │ ├── template
│ │ │ │ ├── requirements.txt
│ │ │ │ ├── global_finalize.sh
│ │ │ │ └── global_init.sh
│ │ │ ├── __init__.py
│ │ │ ├── __main__.py
│ │ │ ├── load_module.py
│ │ │ └── res
│ │ │ │ └── Dockerfile
│ │ ├── scenarios
│ │ │ ├── MATH
│ │ │ │ ├── Templates
│ │ │ │ │ └── TwoAgents
│ │ │ │ │ │ ├── prompt.txt
│ │ │ │ │ │ ├── expected_answer.txt
│ │ │ │ │ │ └── scenario_init.sh
│ │ │ │ ├── MANIFEST.json
│ │ │ │ └── Scripts
│ │ │ │ │ └── custom_tabulate.py
│ │ │ ├── Examples
│ │ │ │ ├── ENV.json
│ │ │ │ ├── Templates
│ │ │ │ │ └── TwoAgents
│ │ │ │ │ │ ├── scenario_init.sh
│ │ │ │ │ │ ├── scenario_finalize.sh
│ │ │ │ │ │ └── scenario.py
│ │ │ │ ├── README.md
│ │ │ │ ├── MANIFEST.json
│ │ │ │ └── Tasks
│ │ │ │ │ └── default_two_agents.jsonl
│ │ │ ├── GAIA
│ │ │ │ ├── Templates
│ │ │ │ │ ├── BasicTwoAgents
│ │ │ │ │ │ ├── prompt.txt
│ │ │ │ │ │ └── expected_answer.txt
│ │ │ │ │ └── SocietyOfMind
│ │ │ │ │ │ ├── prompt.txt
│ │ │ │ │ │ ├── expected_answer.txt
│ │ │ │ │ │ └── requirements.txt
│ │ │ │ └── MANIFEST.json
│ │ │ ├── HumanEval
│ │ │ │ ├── Templates
│ │ │ │ │ ├── TwoAgents
│ │ │ │ │ │ ├── prompt.txt
│ │ │ │ │ │ └── coding
│ │ │ │ │ │ │ └── my_tests.py
│ │ │ │ │ ├── GroupChatFourAgents
│ │ │ │ │ │ ├── prompt.txt
│ │ │ │ │ │ └── coding
│ │ │ │ │ │ │ └── my_tests.py
│ │ │ │ │ ├── GroupChatThreeAgents_Distractor
│ │ │ │ │ │ ├── prompt.txt
│ │ │ │ │ │ └── coding
│ │ │ │ │ │ │ └── my_tests.py
│ │ │ │ │ └── GroupChatThreeAgents_Guardrails
│ │ │ │ │ │ ├── prompt.txt
│ │ │ │ │ │ └── coding
│ │ │ │ │ │ └── my_tests.py
│ │ │ │ ├── Scripts
│ │ │ │ │ └── custom_tabulate.py
│ │ │ │ └── MANIFEST.json
│ │ │ ├── AutoGPT
│ │ │ │ ├── Templates
│ │ │ │ │ └── TwoAgents
│ │ │ │ │ │ ├── should_contain.json.txt
│ │ │ │ │ │ ├── should_not_contain.json.txt
│ │ │ │ │ │ └── scenario_init.sh
│ │ │ │ ├── Challenges
│ │ │ │ │ ├── 2_combine_csv
│ │ │ │ │ │ ├── artifacts_in
│ │ │ │ │ │ │ ├── file1.csv
│ │ │ │ │ │ │ └── file2.csv
│ │ │ │ │ │ └── data.json
│ │ │ │ │ ├── 1_sort_csv
│ │ │ │ │ │ ├── artifacts_in
│ │ │ │ │ │ │ └── input.csv
│ │ │ │ │ │ └── data.json
│ │ │ │ │ ├── 3_qa_small_csv
│ │ │ │ │ │ ├── artifacts_in
│ │ │ │ │ │ │ └── file1.csv
│ │ │ │ │ │ └── data.json
│ │ │ │ │ ├── 12_url_shortener
│ │ │ │ │ │ └── custom_python
│ │ │ │ │ │ │ └── test_url_shorten.py
│ │ │ │ │ ├── 10_password_generator
│ │ │ │ │ │ └── custom_python
│ │ │ │ │ │ │ └── test_pwd.py
│ │ │ │ │ ├── 4_qa_csv
│ │ │ │ │ │ └── data.json
│ │ │ │ │ ├── 6_book_price
│ │ │ │ │ │ └── data.json
│ │ │ │ │ ├── 5_search
│ │ │ │ │ │ └── data.json
│ │ │ │ │ ├── 7_revenue
│ │ │ │ │ │ └── data.json
│ │ │ │ │ └── 8_get_information
│ │ │ │ │ │ └── data.json
│ │ │ │ ├── Scripts
│ │ │ │ │ └── custom_tabulate.py
│ │ │ │ └── README.md
│ │ │ └── MANIFEST.json
│ │ ├── setup.py
│ │ ├── .gitignore
│ │ └── MANIFEST.in
│ └── finetuning
│ │ └── finetuning
│ │ └── __init__.py
└── simple_chat.py
├── dotnet
├── website
│ ├── articles
│ │ ├── Create-your-own-agent.md
│ │ ├── Create-your-own-middleware.md
│ │ ├── Function-call-middleware.md
│ │ ├── Create-an-agent.md
│ │ ├── OpenAIChatAgent-simple-chat.md
│ │ ├── AutoGen.SemanticKernel
│ │ │ ├── SemanticKernelAgent-simple-chat.md
│ │ │ └── SemanticKernelAgent-support-more-messages.md
│ │ ├── OpenAIChatAgent-support-more-messages.md
│ │ └── Group-chat-overview.md
│ ├── filterConfig.yml
│ ├── index.md
│ ├── images
│ │ ├── ag.ico
│ │ └── articles
│ │ │ ├── ConnectTo3PartyOpenAI
│ │ │ └── output.gif
│ │ │ ├── CreateUserProxyAgent
│ │ │ └── image-1.png
│ │ │ ├── DynamicGroupChat
│ │ │ └── dynamicChat.gif
│ │ │ ├── PrintMessageMiddleware
│ │ │ ├── printMessage.png
│ │ │ └── streamingoutput.gif
│ │ │ └── SequentialGroupChat
│ │ │ └── SearcherSummarizer.gif
│ ├── .gitignore
│ ├── template
│ │ └── public
│ │ │ └── main.js
│ ├── toc.yml
│ └── README.md
├── eng
│ ├── opensource.snk
│ ├── MetaInfo.props
│ ├── Sign.props
│ └── Version.props
├── global.json
├── sample
│ ├── AutoGen.BasicSamples
│ │ ├── GlobalUsing.cs
│ │ ├── ImageResources
│ │ │ └── square.png
│ │ ├── Program.cs
│ │ ├── CodeSnippet
│ │ │ └── UserProxyAgentCodeSnippet.cs
│ │ └── Example06_UserProxyAgent.cs
│ ├── AutoGen.Ollama.Sample
│ │ ├── images
│ │ │ └── background.png
│ │ ├── Program.cs
│ │ ├── Chat_With_LLaMA.cs
│ │ └── AutoGen.Ollama.Sample.csproj
│ ├── AutoGen.SemanticKernel.Sample
│ │ ├── Program.cs
│ │ └── AutoGen.SemanticKernel.Sample.csproj
│ └── AutoGen.Anthropic.Samples
│ │ ├── Program.cs
│ │ ├── AutoGen.Anthropic.Samples.csproj
│ │ └── AnthropicSamples.cs
├── src
│ ├── AutoGen
│ │ ├── GlobalUsing.cs
│ │ ├── ConversableAgentConfig.cs
│ │ └── Agent
│ │ │ ├── AssistantAgent.cs
│ │ │ └── UserProxyAgent.cs
│ ├── AutoGen.OpenAI
│ │ ├── GlobalUsing.cs
│ │ ├── OpenAIConfig.cs
│ │ ├── AzureOpenAIConfig.cs
│ │ └── AutoGen.OpenAI.csproj
│ ├── AutoGen.LMStudio
│ │ ├── GlobalUsing.cs
│ │ ├── AutoGen.LMStudio.csproj
│ │ ├── LMStudioConfig.cs
│ │ └── README.md
│ ├── AutoGen.SemanticKernel
│ │ ├── GlobalUsing.cs
│ │ └── AutoGen.SemanticKernel.csproj
│ ├── AutoGen.DotnetInteractive
│ │ ├── GlobalUsing.cs
│ │ ├── dotnet-tools.json
│ │ └── RestoreInteractive.config
│ ├── AutoGen.Core
│ │ ├── ILLMConfig.cs
│ │ ├── Agent
│ │ │ ├── IStreamingAgent.cs
│ │ │ ├── DefaultReplyAgent.cs
│ │ │ └── GroupChatManager.cs
│ │ ├── IGroupChat.cs
│ │ ├── Middleware
│ │ │ ├── MiddlewareContext.cs
│ │ │ ├── IMiddleware.cs
│ │ │ └── IStreamingMiddleware.cs
│ │ ├── AutoGen.Core.csproj
│ │ └── Message
│ │ │ └── ToolCallAggregateMessage.cs
│ ├── AutoGen.Mistral
│ │ ├── DTOs
│ │ │ ├── ResponseFormat.cs
│ │ │ ├── ErrorResponse.cs
│ │ │ ├── Usage.cs
│ │ │ ├── FunctionDefinition.cs
│ │ │ └── Error.cs
│ │ ├── MistralAIModelID.cs
│ │ └── AutoGen.Mistral.csproj
│ ├── AutoGen.Ollama
│ │ ├── Embeddings
│ │ │ ├── TextEmbeddingsResponse.cs
│ │ │ └── ITextEmbeddingService.cs
│ │ ├── OllamaConsts.cs
│ │ ├── DTOs
│ │ │ ├── ChatResponseUpdate.cs
│ │ │ └── Message.cs
│ │ └── AutoGen.Ollama.csproj
│ ├── AutoGen.Anthropic
│ │ ├── Utils
│ │ │ └── AnthropicConstants.cs
│ │ ├── DTO
│ │ │ ├── ErrorResponse.cs
│ │ │ └── Content.cs
│ │ └── AutoGen.Anthropic.csproj
│ └── AutoGen.SourceGenerator
│ │ ├── FunctionExtension.cs
│ │ └── SourceGeneratorFunctionContract.cs
├── test
│ ├── AutoGen.Tests
│ │ ├── GlobalUsing.cs
│ │ ├── ApprovalTests
│ │ │ └── square.png
│ │ └── Attribute
│ │ │ └── OpenAIFact.cs
│ ├── AutoGen.OpenAI.Tests
│ │ └── GlobalUsing.cs
│ ├── AutoGen.AotCompatibility.Tests
│ │ ├── Program.cs
│ │ └── AutoGen.AotCompatibility.Tests.csproj
│ ├── AutoGen.Ollama.Tests
│ │ └── images
│ │ │ ├── image.png
│ │ │ └── square.png
│ ├── AutoGen.SemanticKernel.Tests
│ │ └── ApprovalTests
│ │ │ ├── KernelFunctionExtensionTests.ItCreateFunctionContractsFromPrompt.approved.txt
│ │ │ ├── KernelFunctionExtensionTests.ItCreateFunctionContractsFromMethod.approved.txt
│ │ │ └── KernelFunctionExtensionTests.ItCreateFunctionContractsFromTestPlugin.approved.txt
│ ├── AutoGen.SourceGenerator.Tests
│ │ ├── TopLevelStatementFunctionExample.cs
│ │ ├── FilescopeNamespaceFunctionExample.cs
│ │ └── ApprovalTests
│ │ │ ├── FunctionExample.Sum_Test.approved.txt
│ │ │ ├── FunctionExample.Add_Test.approved.txt
│ │ │ ├── FunctionExample.DictionaryToString_Test.approved.txt
│ │ │ └── FunctionExample.Query_Test.approved.txt
│ ├── AutoGen.Anthropic.Tests
│ │ ├── AnthropicTestUtils.cs
│ │ ├── AutoGen.Anthropic.Tests.csproj
│ │ └── AnthropicClientAgentTest.cs
│ └── .editorconfig
├── nuget
│ ├── icon.png
│ └── NUGET.md
├── NuGet.config
├── .config
│ └── dotnet-tools.json
└── .gitignore
├── .github
├── ISSUE_TEMPLATE
│ ├── config.yml
│ └── feature_request.yml
├── workflows
│ ├── lfs-check.yml
│ ├── type-check.yml
│ └── pre-commit.yml
└── PULL_REQUEST_TEMPLATE.md
├── .devcontainer
├── dev
│ └── devcontainer.json
├── full
│ ├── devcontainer.json
│ └── Dockerfile
├── devcontainer.json
└── studio
│ ├── devcontainer.json
│ └── Dockerfile
├── .coveragerc
├── notebook
├── viz_gc.png
├── nested_chat_1.png
├── nested_chat_2.png
├── friendly_and_suspicous.jpg
├── nested-chats-chess.png
└── optiGuide_new_design.png
├── scripts
├── docs_build.sh
├── docs_serve.sh
└── pre-commit-mypy-run.sh
├── CODE_OF_CONDUCT.md
└── azure-pipelines.yml
/website/static/.nojekyll:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/autogen/extensions/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/autogen/agentchat/contrib/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/agentchat/extensions/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/test_files/radius.txt:
--------------------------------------------------------------------------------
1 | 7.81mm
2 |
--------------------------------------------------------------------------------
/samples/apps/cap/py/autogencap/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/autogen/agentchat/contrib/vectordb/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/autogen/version.py:
--------------------------------------------------------------------------------
1 | __version__ = "0.2.28"
2 |
--------------------------------------------------------------------------------
/samples/apps/cap/c#/Readme.md:
--------------------------------------------------------------------------------
1 | Coming soon...
2 |
--------------------------------------------------------------------------------
/samples/apps/cap/py/autogencap/proto/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/autogen/agentchat/contrib/capabilities/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/samples/apps/autogen-studio/requirements.txt:
--------------------------------------------------------------------------------
1 | .
2 |
--------------------------------------------------------------------------------
/samples/apps/cap/c++/Readme.md:
--------------------------------------------------------------------------------
1 | Coming soon...
2 |
--------------------------------------------------------------------------------
/samples/apps/cap/node/Readme.md:
--------------------------------------------------------------------------------
1 | Coming soon...
2 |
--------------------------------------------------------------------------------
/samples/apps/cap/py/autogencap/ag_adapter/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/samples/apps/autogen-studio/autogenstudio/web/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dotnet/website/articles/Create-your-own-agent.md:
--------------------------------------------------------------------------------
1 | ## Coming soon
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/config.yml:
--------------------------------------------------------------------------------
1 | blank_issues_enabled: true
2 |
--------------------------------------------------------------------------------
/dotnet/website/articles/Create-your-own-middleware.md:
--------------------------------------------------------------------------------
1 | ## Coming soon
--------------------------------------------------------------------------------
/dotnet/website/articles/Function-call-middleware.md:
--------------------------------------------------------------------------------
1 | # Coming soon
--------------------------------------------------------------------------------
/samples/apps/auto-anny/requirements.txt:
--------------------------------------------------------------------------------
1 | discord.py
2 | pyautogen
3 |
--------------------------------------------------------------------------------
/samples/apps/autogen-studio/autogenstudio/database/migrations/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/autogenbench/version.py:
--------------------------------------------------------------------------------
1 | __version__ = "0.0.3"
2 |
--------------------------------------------------------------------------------
/.devcontainer/dev/devcontainer.json:
--------------------------------------------------------------------------------
1 | {
2 | "dockerFile": "Dockerfile"
3 | }
4 |
--------------------------------------------------------------------------------
/.devcontainer/full/devcontainer.json:
--------------------------------------------------------------------------------
1 | {
2 | "dockerFile": "Dockerfile"
3 | }
4 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/autogenbench/template/requirements.txt:
--------------------------------------------------------------------------------
1 | pyautogen
2 |
--------------------------------------------------------------------------------
/samples/apps/autogen-studio/autogenstudio/utils/__init__.py:
--------------------------------------------------------------------------------
1 | from .utils import *
2 |
--------------------------------------------------------------------------------
/samples/apps/autogen-studio/setup.py:
--------------------------------------------------------------------------------
1 | from setuptools import setup
2 |
3 | setup()
4 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/autogenbench/__init__.py:
--------------------------------------------------------------------------------
1 | from .version import __version__
2 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/MATH/Templates/TwoAgents/prompt.txt:
--------------------------------------------------------------------------------
1 | __PROMPT__
2 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/setup.py:
--------------------------------------------------------------------------------
1 | from setuptools import setup
2 |
3 | setup()
4 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/autogenbench/template/global_finalize.sh:
--------------------------------------------------------------------------------
1 | # Global finalize.
2 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/Examples/ENV.json:
--------------------------------------------------------------------------------
1 | {
2 | "BING_API_KEY": ""
3 | }
4 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/GAIA/Templates/BasicTwoAgents/prompt.txt:
--------------------------------------------------------------------------------
1 | __PROMPT__
2 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/GAIA/Templates/SocietyOfMind/prompt.txt:
--------------------------------------------------------------------------------
1 | __PROMPT__
2 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/HumanEval/Templates/TwoAgents/prompt.txt:
--------------------------------------------------------------------------------
1 | __PROMPT__
2 |
--------------------------------------------------------------------------------
/dotnet/website/filterConfig.yml:
--------------------------------------------------------------------------------
1 | apiRules:
2 | - exclude:
3 | uidRegex: ^AutoGen.SourceGenerator
--------------------------------------------------------------------------------
/samples/apps/autogen-studio/frontend/.env.default:
--------------------------------------------------------------------------------
1 | GATSBY_API_URL=http://127.0.0.1:8081/api
2 |
--------------------------------------------------------------------------------
/samples/apps/cap/py/autogencap/requirements.txt:
--------------------------------------------------------------------------------
1 | pyzmq
2 | protobuf
3 | termcolor
4 | pyautogen
5 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/MATH/Templates/TwoAgents/expected_answer.txt:
--------------------------------------------------------------------------------
1 | __ANSWER__
2 |
--------------------------------------------------------------------------------
/.coveragerc:
--------------------------------------------------------------------------------
1 | [run]
2 | branch = True
3 | source = autogen
4 | omit =
5 | *test*
6 | *samples*
7 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/.gitignore:
--------------------------------------------------------------------------------
1 | scenarios/*/Downloads
2 | scenarios/*/Tasks
3 | */Results
4 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/Examples/Templates/TwoAgents/scenario_init.sh:
--------------------------------------------------------------------------------
1 | #Scenario Init.
2 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/HumanEval/Templates/GroupChatFourAgents/prompt.txt:
--------------------------------------------------------------------------------
1 | __PROMPT__
2 |
--------------------------------------------------------------------------------
/dotnet/eng/opensource.snk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ZinkaTrostinka/autogen/HEAD/dotnet/eng/opensource.snk
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/AutoGPT/Templates/TwoAgents/should_contain.json.txt:
--------------------------------------------------------------------------------
1 | __CONTAIN__
2 |
--------------------------------------------------------------------------------
/website/static/img/ag.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ZinkaTrostinka/autogen/HEAD/website/static/img/ag.ico
--------------------------------------------------------------------------------
/dotnet/website/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | _disableTocFilter: true
3 | ---
4 | [!INCLUDE [](./articles/getting-start.md)]
--------------------------------------------------------------------------------
/samples/apps/autogen-studio/autogenstudio/database/migrations/README:
--------------------------------------------------------------------------------
1 | Generic single-database configuration.
2 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/AutoGPT/Templates/TwoAgents/should_not_contain.json.txt:
--------------------------------------------------------------------------------
1 | __NO_CONTAIN__
2 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/Examples/Templates/TwoAgents/scenario_finalize.sh:
--------------------------------------------------------------------------------
1 | #Scenario finalize.
2 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/GAIA/Templates/BasicTwoAgents/expected_answer.txt:
--------------------------------------------------------------------------------
1 | __EXPECTED_ANSWER__
2 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/GAIA/Templates/SocietyOfMind/expected_answer.txt:
--------------------------------------------------------------------------------
1 | __EXPECTED_ANSWER__
2 |
--------------------------------------------------------------------------------
/test/test_files/example.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ZinkaTrostinka/autogen/HEAD/test/test_files/example.pdf
--------------------------------------------------------------------------------
/dotnet/global.json:
--------------------------------------------------------------------------------
1 | {
2 | "sdk": {
3 | "version": "8.0.104",
4 | "rollForward": "latestMinor"
5 | }
6 | }
--------------------------------------------------------------------------------
/dotnet/website/images/ag.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ZinkaTrostinka/autogen/HEAD/dotnet/website/images/ag.ico
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/HumanEval/Templates/GroupChatThreeAgents_Distractor/prompt.txt:
--------------------------------------------------------------------------------
1 | __PROMPT__
2 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/HumanEval/Templates/GroupChatThreeAgents_Guardrails/prompt.txt:
--------------------------------------------------------------------------------
1 | __PROMPT__
2 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/MATH/Templates/TwoAgents/scenario_init.sh:
--------------------------------------------------------------------------------
1 | pip install sympy matplotlib numpy
2 |
--------------------------------------------------------------------------------
/test/test_files/example.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ZinkaTrostinka/autogen/HEAD/test/test_files/example.docx
--------------------------------------------------------------------------------
/samples/apps/cap/py/autogencap/proto/proto-instructions.txt:
--------------------------------------------------------------------------------
1 | .\protoc --pyi_out=. --python_out=. CAP.proto Autogen.proto
2 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/autogenbench/__main__.py:
--------------------------------------------------------------------------------
1 | from .cli import main
2 |
3 | if __name__ == "__main__":
4 | main()
5 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/autogenbench/template/global_init.sh:
--------------------------------------------------------------------------------
1 | echo AUTOGEN_TESTBED_SETTING: [$AUTOGEN_TESTBED_SETTING]
2 |
--------------------------------------------------------------------------------
/samples/tools/finetuning/finetuning/__init__.py:
--------------------------------------------------------------------------------
1 | from .update_model import update_model
2 |
3 | __all__ = ["update_model"]
4 |
--------------------------------------------------------------------------------
/website/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
3 | };
4 |
--------------------------------------------------------------------------------
/website/static/img/flaml_logo.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ZinkaTrostinka/autogen/HEAD/website/static/img/flaml_logo.ico
--------------------------------------------------------------------------------
/samples/apps/cap/py/autogencap/Constants.py:
--------------------------------------------------------------------------------
1 | Termination_Topic: str = "Termination"
2 | Directory_Svc_Topic: str = "Directory_Svc"
3 |
--------------------------------------------------------------------------------
/samples/apps/autogen-studio/autogenstudio/version.py:
--------------------------------------------------------------------------------
1 | VERSION = "0.0.56rc9"
2 | __version__ = VERSION
3 | APP_NAME = "autogenstudio"
4 |
--------------------------------------------------------------------------------
/samples/apps/autogen-studio/frontend/postcss.config.js:
--------------------------------------------------------------------------------
1 |
2 | module.exports = () => ({
3 | plugins: [require("tailwindcss")],
4 | })
5 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/AutoGPT/Templates/TwoAgents/scenario_init.sh:
--------------------------------------------------------------------------------
1 | pip install pandas beautifulsoup4 requests pytest
2 |
--------------------------------------------------------------------------------
/website/docs/topics/groupchat/_category_.json:
--------------------------------------------------------------------------------
1 | {
2 | "position": 5,
3 | "label": "GroupChat",
4 | "collapsible": true
5 | }
6 |
--------------------------------------------------------------------------------
/website/docs/topics/handling_long_contexts/_category_.json:
--------------------------------------------------------------------------------
1 | {
2 | "label": "Handling Long Contexts",
3 | "collapsible": true
4 | }
5 |
--------------------------------------------------------------------------------
/dotnet/sample/AutoGen.BasicSamples/GlobalUsing.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // GlobalUsing.cs
3 |
4 |
--------------------------------------------------------------------------------
/website/docs/topics/prompting-and-reasoning/_category_.json:
--------------------------------------------------------------------------------
1 | {
2 | "label": "Prompting and Reasoning",
3 | "collapsible": true
4 | }
5 |
--------------------------------------------------------------------------------
/samples/apps/autogen-studio/autogenstudio/database/__init__.py:
--------------------------------------------------------------------------------
1 | # from .dbmanager import *
2 | from .dbmanager import *
3 | from .utils import *
4 |
--------------------------------------------------------------------------------
/website/docs/topics/code-execution/_category_.json:
--------------------------------------------------------------------------------
1 | {
2 | "position": 2,
3 | "label": "Code Execution",
4 | "collapsible": true
5 | }
6 |
--------------------------------------------------------------------------------
/autogen/cache/__init__.py:
--------------------------------------------------------------------------------
1 | from .abstract_cache_base import AbstractCache
2 | from .cache import Cache
3 |
4 | __all__ = ["Cache", "AbstractCache"]
5 |
--------------------------------------------------------------------------------
/samples/apps/cap/py/demo/standalone/Broker.py:
--------------------------------------------------------------------------------
1 | import _paths
2 | from autogencap.Broker import main
3 |
4 | if __name__ == "__main__":
5 | main()
6 |
--------------------------------------------------------------------------------
/website/docs/topics/openai-assistant/_category_.json:
--------------------------------------------------------------------------------
1 | {
2 | "position": 2,
3 | "label": "OpenAI Assistant",
4 | "collapsible": true
5 | }
6 |
--------------------------------------------------------------------------------
/dotnet/src/AutoGen/GlobalUsing.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // GlobalUsing.cs
3 |
4 | global using AutoGen.Core;
5 |
--------------------------------------------------------------------------------
/samples/apps/autogen-studio/frontend/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | .cache/
3 | public/
4 |
5 | .env.development
6 | .env.production
7 |
8 | yarn.lock
9 |
--------------------------------------------------------------------------------
/samples/apps/promptflow-autogen/.gitignore:
--------------------------------------------------------------------------------
1 | .env
2 | __pycache__/
3 | .promptflow/*
4 | !.promptflow/flow.tools.json
5 | .runs/
6 | .cache/
7 | .vscode/
8 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/AutoGPT/Challenges/2_combine_csv/artifacts_in/file1.csv:
--------------------------------------------------------------------------------
1 | ID,Name,Age
2 | 101,John,28
3 | 102,Alice,34
4 | 103,Bob,45
5 |
--------------------------------------------------------------------------------
/dotnet/src/AutoGen.OpenAI/GlobalUsing.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // GlobalUsing.cs
3 |
4 | global using AutoGen.Core;
5 |
--------------------------------------------------------------------------------
/dotnet/test/AutoGen.Tests/GlobalUsing.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // GlobalUsing.cs
3 |
4 | global using AutoGen.Core;
5 |
--------------------------------------------------------------------------------
/notebook/viz_gc.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:ad608e649cd1624c66d26e9038cd833271a55cf342b8ffaa5fd15dcf4fffd1fb
3 | size 223332
4 |
--------------------------------------------------------------------------------
/website/docs/topics/non-openai-models/_category_.json:
--------------------------------------------------------------------------------
1 | {
2 | "position": 5,
3 | "label": "Using Non-OpenAI Models",
4 | "collapsible": true
5 | }
6 |
--------------------------------------------------------------------------------
/dotnet/nuget/icon.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:02dbf31fea0b92714c80fdc90888da7e96374a1f52c621a939835fd3c876ddcc
3 | size 426084
4 |
--------------------------------------------------------------------------------
/dotnet/src/AutoGen.LMStudio/GlobalUsing.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // GlobalUsing.cs
3 |
4 | global using AutoGen.Core;
5 |
--------------------------------------------------------------------------------
/samples/apps/cap/py/demo/standalone/directory_svc.py:
--------------------------------------------------------------------------------
1 | import _paths
2 | from autogencap.DirectorySvc import main
3 |
4 | if __name__ == "__main__":
5 | main()
6 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/MANIFEST.in:
--------------------------------------------------------------------------------
1 | recursive-exclude scenarios *
2 | recursive-exclude results *
3 | recursive-exclude tests *
4 | recursive-exclude utils *
5 |
--------------------------------------------------------------------------------
/dotnet/src/AutoGen.SemanticKernel/GlobalUsing.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // GlobalUsing.cs
3 |
4 | global using AutoGen.Core;
5 |
--------------------------------------------------------------------------------
/dotnet/test/AutoGen.OpenAI.Tests/GlobalUsing.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // GlobalUsing.cs
3 |
4 | global using AutoGen.Core;
5 |
--------------------------------------------------------------------------------
/notebook/nested_chat_1.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:5eae7c53226fdfb1adec97b3144b0701bd90d61679242e3f0daeac16fcf1f47e
3 | size 102394
4 |
--------------------------------------------------------------------------------
/notebook/nested_chat_2.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:5439695b6361ee2536e33a546b7a6bf55ba6c842e9b22e5f950b4c9cb741f824
3 | size 129880
4 |
--------------------------------------------------------------------------------
/test/test_files/test_image.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:3a942e13fddf9531678d6771a2d4993f6e18f5dcbbd498586444180122838de9
3 | size 289
4 |
--------------------------------------------------------------------------------
/website/blog/2023-10-18-RetrieveChat/img/autogen-rag.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ZinkaTrostinka/autogen/HEAD/website/blog/2023-10-18-RetrieveChat/img/autogen-rag.gif
--------------------------------------------------------------------------------
/dotnet/src/AutoGen.DotnetInteractive/GlobalUsing.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // GlobalUsing.cs
3 |
4 | global using AutoGen.Core;
5 |
--------------------------------------------------------------------------------
/notebook/friendly_and_suspicous.jpg:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:edd46221675c0120d47d09e4791e677ad0b7f9f68e5d1235e91bed89ca933d49
3 | size 162342
4 |
--------------------------------------------------------------------------------
/notebook/nested-chats-chess.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:49bcd0dbbc9e243d106772e10419432ed65d5f6bd9884b4abdd1287e315ddda5
3 | size 219303
4 |
--------------------------------------------------------------------------------
/notebook/optiGuide_new_design.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:dfaca6105d5a6a07aff062db88efffb6678b71f5681da41b7ef0af58cc9da291
3 | size 271961
4 |
--------------------------------------------------------------------------------
/website/static/img/autogen_app.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:bbdad1a6b636b00df155deb88e62aea4b4dfbb3f5732cd72ffaf0c9e44020644
3 | size 35521
4 |
--------------------------------------------------------------------------------
/website/static/img/chat_example.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:18130669ccef4cd19fae7ede12f4d8ece2e93dde4cee07e9a39b4d59e1e8e1dd
3 | size 441624
4 |
--------------------------------------------------------------------------------
/dotnet/test/AutoGen.AotCompatibility.Tests/Program.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // Program.cs
3 |
4 | Console.WriteLine("Hello, World!");
5 |
--------------------------------------------------------------------------------
/samples/apps/auto-anny/images/icon.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:ae4551bbe74d105da083dbefe08b0a602f9b2f3c4184cb14bcf174f2b651d9d1
3 | size 30796
4 |
--------------------------------------------------------------------------------
/samples/apps/promptflow-autogen/requirements.txt:
--------------------------------------------------------------------------------
1 | promptflow==1.8.0
2 | pyautogen==0.2.23
3 | pyautogen[graph]
4 | pyautogen[redis]
5 | redis
6 | semantic-kernel
7 | beautifulsoup4
8 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/AutoGPT/Challenges/2_combine_csv/artifacts_in/file2.csv:
--------------------------------------------------------------------------------
1 | ID,Occupation,Salary
2 | 101,Engineer,80000
3 | 102,Doctor,120000
4 | 103,Lawyer,95000
5 |
--------------------------------------------------------------------------------
/website/docs/Use-Cases/images/app.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:f2c810c83a013595cd7a6e8fedc581e11aff1fc143d4c1d837502b4f0b5fad0a
3 | size 1427577
4 |
--------------------------------------------------------------------------------
/website/static/img/autogen_agentchat.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:2056728b68699091b74c223baecdb127ac85ff81f1f7c61e8e25543652ee0ecb
3 | size 130557
4 |
--------------------------------------------------------------------------------
/website/static/img/gallery/autotx.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:0229a29843a10bc38cb867f54edd62f4dc1bc7098fe407abab6d3ebfb12e6ad7
3 | size 55650
4 |
--------------------------------------------------------------------------------
/website/static/img/gallery/default.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:2056728b68699091b74c223baecdb127ac85ff81f1f7c61e8e25543652ee0ecb
3 | size 130557
4 |
--------------------------------------------------------------------------------
/website/static/img/gallery/robot.jpg:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:7581ecc79cad5e294319bb1696c01bfb7aad3922a472489277d5dc755b716a75
3 | size 1990295
4 |
--------------------------------------------------------------------------------
/website/static/img/gallery/webagent.jpg:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:9922bd42d16b58564ef7602d45b120310f46ebaa0290e5d23401bc061984cd4e
3 | size 18695
4 |
--------------------------------------------------------------------------------
/dotnet/website/images/articles/ConnectTo3PartyOpenAI/output.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ZinkaTrostinka/autogen/HEAD/dotnet/website/images/articles/ConnectTo3PartyOpenAI/output.gif
--------------------------------------------------------------------------------
/samples/apps/autogen-studio/autogenstudio/__init__.py:
--------------------------------------------------------------------------------
1 | from .chatmanager import *
2 | from .datamodel import *
3 | from .version import __version__
4 | from .workflowmanager import *
5 |
--------------------------------------------------------------------------------
/website/blog/2024-05-24-Agent/img/agents.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:7b4cf0cddf0cdb7977556c4d8528605700f8aa8692152a31bfbf994868415c45
3 | size 3163177
4 |
--------------------------------------------------------------------------------
/website/docs/autogen-studio/img/agent_new.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:18de683a302d4cfaf218b3d57d6f72d17925b589c15ea0604e4b3bd03f6b464c
3 | size 141037
4 |
--------------------------------------------------------------------------------
/website/docs/autogen-studio/img/model_new.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:82cf098881c1b318aeec3858aedbc80dea3e80e6d34c0dbd36d721a8e14cc058
3 | size 94667
4 |
--------------------------------------------------------------------------------
/website/docs/autogen-studio/img/skill.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:f675444d66c0f6dbca9756b92d2bd166cd29eb645efadc38b7331ab891bef204
3 | size 232801
4 |
--------------------------------------------------------------------------------
/website/docs/tutorial/assets/group-chat.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:43763dfc90485163e3937e6261f2851da678198940d571fc5731e9e58cf3188b
3 | size 90369
4 |
--------------------------------------------------------------------------------
/website/docs/tutorial/assets/nested-chats.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:37fe62859b8b25f29920a7eef69d5fc2cc583da8c91dbf3e0394d19d52f35ef3
3 | size 86429
4 |
--------------------------------------------------------------------------------
/website/static/img/gallery/TensionCode.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:86cc60473970c1106e9ce66d6ce959ef1509d6ce31091e6fdf2b00d911e48318
3 | size 304260
4 |
--------------------------------------------------------------------------------
/website/static/img/gallery/x-force-ide-ui.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:4023afbc9382cf96636946579266f9834f85816362210aba58a4828537b69914
3 | size 319498
4 |
--------------------------------------------------------------------------------
/dotnet/test/AutoGen.Ollama.Tests/images/image.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:300b7c9d6ba0c23a3e52fbd2e268141ddcca0434a9fb9dcf7e58e7e903d36dcf
3 | size 2126185
4 |
--------------------------------------------------------------------------------
/dotnet/test/AutoGen.Ollama.Tests/images/square.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:8323d0b8eceb752e14c29543b2e28bb2fc648ed9719095c31b7708867a4dc918
3 | size 491
4 |
--------------------------------------------------------------------------------
/dotnet/test/AutoGen.Tests/ApprovalTests/square.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:8323d0b8eceb752e14c29543b2e28bb2fc648ed9719095c31b7708867a4dc918
3 | size 491
4 |
--------------------------------------------------------------------------------
/samples/apps/cap/py/autogencap/setup.py:
--------------------------------------------------------------------------------
1 | from setuptools import find_packages, setup
2 |
3 | setup(
4 | name="autogencap",
5 | version="0.1",
6 | packages=find_packages(),
7 | )
8 |
--------------------------------------------------------------------------------
/website/blog/2023-06-28-MathChat/img/result.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:733c841fda116d3d9ba709acb4906a96c48d311d5461d972a62f852c37362c61
3 | size 96509
4 |
--------------------------------------------------------------------------------
/website/blog/2023-11-06-LMM-Agent/img/teaser.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:37d97cdc7477973e7ad3ca1b6549cfe446315f94f78cc2603e8750a4cf1cfd03
3 | size 2368573
4 |
--------------------------------------------------------------------------------
/website/blog/2023-11-09-EcoAssistant/img/chat.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:3cd9cc3bbe897dd70e2267a1f79d124e7d926c8530ba62787c854824fa2b85a0
3 | size 315192
4 |
--------------------------------------------------------------------------------
/website/blog/2024-02-29-StateFlow/img/alfworld.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:743143d4238013dc4dc535243a25f808eea59a10bcdfcfbd4a0c1360da320ace
3 | size 65144
4 |
--------------------------------------------------------------------------------
/website/blog/2024-05-24-Agent/img/leadership.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:9d8a26ee028d828ccbf9a0266ca926df6ffe34c16c312a0c9d4a417885a1cdb9
3 | size 193529
4 |
--------------------------------------------------------------------------------
/website/docs/Use-Cases/images/agent_example.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:54af1e14c591055ac3e4d8232c0694022ef084e9c78dce506726e4a2b63db48b
3 | size 196435
4 |
--------------------------------------------------------------------------------
/website/docs/Use-Cases/images/autogen_agents.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:7d15ec6cfed6f62c2e51bac3c21c5f337a1be30a92573b79feac704475e28398
3 | size 595895
4 |
--------------------------------------------------------------------------------
/website/docs/autogen-studio/img/model_openai.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:696397efe3a289f5dd084a5a7fbfe3f151adb21a19be617d3e66255acc4a404d
3 | size 90123
4 |
--------------------------------------------------------------------------------
/website/docs/autogen-studio/img/workflow_chat.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:7b14764c16149a1094ba95612e84fd28ef778485cc026a1cb4904a8c3f0b7815
3 | size 127639
4 |
--------------------------------------------------------------------------------
/website/docs/autogen-studio/img/workflow_new.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:64614cd603aa384270075788253566a8035bd0d0011c28af0476f6e484111e4c
3 | size 90426
4 |
--------------------------------------------------------------------------------
/website/docs/autogen-studio/img/workflow_test.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:c0567731649d732d1bacd557b94b5eec87b8d491fa4207f4a8e29170ee56419d
3 | size 258139
4 |
--------------------------------------------------------------------------------
/website/docs/ecosystem/img/ecosystem-composio.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:33ea167735ede9123eb8e610ef182fdf4ca075a476177b0411e5c6c6b892644b
3 | size 15042
4 |
--------------------------------------------------------------------------------
/website/docs/ecosystem/img/ecosystem-fabric.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:fae741553fa54f7fc8eaa096624fe06f46baa1fabb10e451a3ec805e034f85d1
3 | size 293783
4 |
--------------------------------------------------------------------------------
/website/docs/ecosystem/img/ecosystem-llamaindex.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:08965da22eddf8c9253e96c1424d9a9b67f210018a3e39372746b93f1d787c04
3 | size 23548
4 |
--------------------------------------------------------------------------------
/website/docs/ecosystem/img/ecosystem-memgpt.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:8815598cc28a66b07e1f9692121e9481b78206b9e878b9ab92fa8bc24cb1ce3f
3 | size 24576
4 |
--------------------------------------------------------------------------------
/website/docs/ecosystem/img/ecosystem-ollama.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:5edad874e3b997558e2a5d06e9984e7dc48766d94acdbb365e9abdc820a324c2
3 | size 13837
4 |
--------------------------------------------------------------------------------
/website/docs/tutorial/assets/conversable-agent.jpg:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:d537885ee46a37914dbeff953b6ed4ff5f8715f7f1901f27eea0c12ca553df5a
3 | size 29593
4 |
--------------------------------------------------------------------------------
/website/docs/tutorial/assets/human-in-the-loop.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:abe6ced78aeaf839ef1165c35d23e8221b3febb10f9201f13d283976a3fac42a
3 | size 38796
4 |
--------------------------------------------------------------------------------
/website/docs/tutorial/assets/two-agent-chat.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:2ccdc58ef6a99562603c6daddcf74b0b168710ed8322dc35be61190e16774eec
3 | size 47757
4 |
--------------------------------------------------------------------------------
/website/static/img/gallery/composio-autogen.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:2fb15d49b34af3f6f2df43be10f4bbb99baea240e134cfb778acdb5039c3a9b6
3 | size 109905
4 |
--------------------------------------------------------------------------------
/samples/apps/autogen-studio/docs/ara_stockprices.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:5e3340a765da6dff6585c8b2e8a4014df0c94b537d62d341d2d0d45627bbc345
3 | size 198222
4 |
--------------------------------------------------------------------------------
/samples/apps/autogen-studio/frontend/src/images/icon.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:4f7307728cfd62bc0d07d8cc3ab3809e36d8859a5ad314d020b21648642cf574
3 | size 12710
4 |
--------------------------------------------------------------------------------
/website/blog/2023-06-28-MathChat/img/mathchatflow.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:4153948ade0c47a3a21ef327d28e23d2ce48da00ea1d2f67c2ae1d4e08d8656e
3 | size 95406
4 |
--------------------------------------------------------------------------------
/website/blog/2023-11-09-EcoAssistant/img/results.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:e316f7edbbd8aecf89d6a3863ec61a1b740198f7c6bc45f3c8255d27398c6d52
3 | size 28941
4 |
--------------------------------------------------------------------------------
/website/blog/2023-11-09-EcoAssistant/img/system.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:2bb216b71208637e7f07c79927a343fece46d866a40d4df8186de248a878d81e
3 | size 286438
4 |
--------------------------------------------------------------------------------
/website/blog/2023-11-09-EcoAssistant/img/template.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:2da5701547efc8956a13f18a566ab307ac20ebbbdd206249a907822e9e74982f
3 | size 335376
4 |
--------------------------------------------------------------------------------
/website/blog/2023-11-13-OAI-assistants/img/teaser.jpg:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:9ab1627cab5111f1b5c2c8aaf19a0356e718d0a9866ac40453202d26f3343cdb
3 | size 232610
4 |
--------------------------------------------------------------------------------
/website/blog/2023-11-20-AgentEval/img/agenteval-CQ.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:fb94c5b1f43f9112ead955d37414c8df5cb748e4aecb30ea01995f48768caf16
3 | size 175156
4 |
--------------------------------------------------------------------------------
/website/blog/2024-01-25-AutoGenBench/img/teaser.jpg:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:d566d133445514ce2b93c8259194fed07d63819537aafe13910ce8b934abf47e
3 | size 240855
4 |
--------------------------------------------------------------------------------
/website/blog/2024-02-02-AutoAnny/img/AutoAnnyLogo.jpg:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:3dc81d3d959885200859f7b17bdc504523a1170187c9752c1ddfaaddc3b4e803
3 | size 119359
4 |
--------------------------------------------------------------------------------
/website/blog/2024-02-11-FSM-GroupChat/img/FSM_logic.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:5a22d37e2ab16809547ad2dd7d936e0650df74c8eeddfff5c73f538a8f31ec22
3 | size 28311
4 |
--------------------------------------------------------------------------------
/website/blog/2024-02-11-FSM-GroupChat/img/teaser.jpg:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:5045f902ece8b19739d3fd6b48db52aad8901a8427ffe7223516adc240f7ca81
3 | size 34283
4 |
--------------------------------------------------------------------------------
/website/blog/2024-02-29-StateFlow/img/bash_result.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:3864c93f89da3435269645dddebd7e20d124b92285349944b219d71a9b7ccf8a
3 | size 55631
4 |
--------------------------------------------------------------------------------
/website/blog/2024-02-29-StateFlow/img/intercode.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:e4044db21b23c4dda83da2e505318736f7f48db3a24f17ed769858aade074809
3 | size 132147
4 |
--------------------------------------------------------------------------------
/website/blog/2024-02-29-StateFlow/img/sf_example_1.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:eec105959fdbc6e5d6e1de4cafc1d7c4cf3778b102ae33d96da3691fdc2b6268
3 | size 59596
4 |
--------------------------------------------------------------------------------
/website/blog/2024-03-03-AutoGen-Update/img/gaia.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:73416136382be5f2b4066185e7e91eae9e7bdccb5c899bdf74b0bf487d3ecb1a
3 | size 546588
4 |
--------------------------------------------------------------------------------
/website/blog/2024-03-03-AutoGen-Update/img/love.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:3d3517c19fc84f61a4b81d5cb823b1d5ec3f5fe84b21703b1f0689ff5d2f646c
3 | size 150529
4 |
--------------------------------------------------------------------------------
/website/blog/2024-03-03-AutoGen-Update/img/teach.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:7c2cb2b3bfd91346d8f7688504d463a1314252ca1ef26490cb5f355533494e3e
3 | size 921359
4 |
--------------------------------------------------------------------------------
/website/docs/autogen-studio/img/agent_assistant.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:fd8eff59d97c9fbdf118eefe071894125d6421cad6b428c3427d61630d57a3e8
3 | size 133246
4 |
--------------------------------------------------------------------------------
/website/docs/autogen-studio/img/agent_groupchat.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:060d2bfb9c38da7535015718202e17cdd6c51545a0a986dedfe6c91bd8accb52
3 | size 146086
4 |
--------------------------------------------------------------------------------
/website/docs/autogen-studio/img/agent_skillsmodel.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:d85a85e931123b404ab1f3d20e2fe52a0e874479f5b36a6d56cd3ffaa0f9991b
3 | size 147060
4 |
--------------------------------------------------------------------------------
/website/docs/autogen-studio/img/ara_stockprices.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:5e3340a765da6dff6585c8b2e8a4014df0c94b537d62d341d2d0d45627bbc345
3 | size 198222
4 |
--------------------------------------------------------------------------------
/website/docs/autogen-studio/img/workflow_export.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:db5e6f7171a4de9ddfeb6d1e29d7dac2464f727720438ae3433cf78ffe8b75ce
3 | size 204265
4 |
--------------------------------------------------------------------------------
/website/docs/autogen-studio/img/workflow_profile.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:3ad630cdf09112be8831c830f516a2ec061de1d0097e03d205eda982ab408a63
3 | size 283288
4 |
--------------------------------------------------------------------------------
/website/docs/autogen-studio/img/workflow_sequential.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:670715663ec78b47d53e2689ad2853e07f99ac498ed890f9bdd36c309e52758f
3 | size 117232
4 |
--------------------------------------------------------------------------------
/website/docs/ecosystem/img/ecosystem-databricks.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:19ac6d3ddc8dc8552d27dea0f055add9bc4abe5671a28c883940ec728d2aff0f
3 | size 203365
4 |
--------------------------------------------------------------------------------
/website/docs/ecosystem/img/ecosystem-promptflow.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:8580309dbfe6f266d3c0370071ec489da4cf068ce7204b067716ceb4f9707940
3 | size 216099
4 |
--------------------------------------------------------------------------------
/website/docs/tutorial/assets/code-executor-docker.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:41ab19925fe674924fadbcbe86fc3b4aee90273164b91ea5075b01d86793559f
3 | size 45857
4 |
--------------------------------------------------------------------------------
/website/docs/tutorial/assets/code-executor-no-docker.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:2ca20b9ff0d84e3852f0ca09147c33bd83436d0aebdcb8d92a97c877e3700296
3 | size 41216
4 |
--------------------------------------------------------------------------------
/dotnet/sample/AutoGen.BasicSamples/ImageResources/square.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:8323d0b8eceb752e14c29543b2e28bb2fc648ed9719095c31b7708867a4dc918
3 | size 491
4 |
--------------------------------------------------------------------------------
/dotnet/sample/AutoGen.Ollama.Sample/images/background.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:300b7c9d6ba0c23a3e52fbd2e268141ddcca0434a9fb9dcf7e58e7e903d36dcf
3 | size 2126185
4 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/GAIA/Templates/SocietyOfMind/requirements.txt:
--------------------------------------------------------------------------------
1 | git+https://github.com/microsoft/autogen.git@society_of_mind_gaia
2 | pdfminer.six
3 | markdownify
4 | pathvalidate
5 |
--------------------------------------------------------------------------------
/website/blog/2023-04-21-LLM-tuning-math/img/level2algebra.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:00104deeab1ee2fdbda87221c019a17e7e8e8d00eef7e719ba26e890b8b4d979
3 | size 40332
4 |
--------------------------------------------------------------------------------
/website/blog/2023-04-21-LLM-tuning-math/img/level3algebra.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:a9ae6c1c4e20494c5aa4882a621f889891b1eed1ea1149b7a5cf2bc4fd99e048
3 | size 41130
4 |
--------------------------------------------------------------------------------
/website/blog/2023-04-21-LLM-tuning-math/img/level4algebra.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:6103474a16b1f715a1226771fcf510b3a7a95a6396eb51df7d91c4a3a03642f4
3 | size 36724
4 |
--------------------------------------------------------------------------------
/website/blog/2023-04-21-LLM-tuning-math/img/level5algebra.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:1c9d938c95b031b9a88e559292850e810cd03475cee9a3046a631eb961740019
3 | size 35338
4 |
--------------------------------------------------------------------------------
/website/blog/2023-05-18-GPT-adaptive-humaneval/img/design.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:8eb30bfdfbc07d9fd2c6945e28e3f71063636c65654e37b323771bbf3ba6d3e9
3 | size 21265
4 |
--------------------------------------------------------------------------------
/website/blog/2023-11-09-EcoAssistant/img/template-demo.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:46e6a4b26aaa7d7a89f5f5920bfe76762ed2b3dcaf7a16db04cb310ca15339bd
3 | size 61483
4 |
--------------------------------------------------------------------------------
/website/blog/2023-11-20-AgentEval/img/math-problems-plot.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:12e283dd7a35af47f24cee18dc6d9054eacfe95761ea1c12d3da508dc29510ff
3 | size 92959
4 |
--------------------------------------------------------------------------------
/website/blog/2023-11-20-AgentEval/img/tasks-taxonomy.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:057d293bac0914acca3c991e3f4adf5737112f7b4ee751acb91376c2c65eb446
3 | size 100009
4 |
--------------------------------------------------------------------------------
/website/blog/2024-03-03-AutoGen-Update/img/contributors.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:da1a0a0f4a830acb8a9a29e54ccdc8be3841154f31c64cf8f53e0b23e5aaa6cb
3 | size 493276
4 |
--------------------------------------------------------------------------------
/website/blog/2024-03-03-AutoGen-Update/img/dalle_gpt4v.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:4516aaf4dd8e179fe8c9d47d782dfd4aa8ef256eafe4a857c07550d79b0b0e29
3 | size 3785874
4 |
--------------------------------------------------------------------------------
/website/blog/2024-03-11-AutoDefense/imgs/architecture.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:b4cb0e5128fefce942eeb5c04605b321b98950d75864c23d2e1a4b93ce65f784
3 | size 243058
4 |
--------------------------------------------------------------------------------
/website/blog/2024-03-11-AutoDefense/imgs/table-4agents.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:55492a3d4504ef448b9bcbf3d8980df461a11585d03ea7155f24dd7c2183cfda
3 | size 75521
4 |
--------------------------------------------------------------------------------
/website/blog/2024-03-11-AutoDefense/imgs/table-agents.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:68ee35135459a57d21d6eb310b6d4f3d46cbee1ce5a40bc1e44d40375c6486ef
3 | size 291050
4 |
--------------------------------------------------------------------------------
/website/docs/tutorial/assets/sequential-two-agent-chat.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:dcf72e7277451fe71121a05f754b7ae8fb82e6e0f124a6c03fbeea6d5e636856
3 | size 59877
4 |
--------------------------------------------------------------------------------
/dotnet/src/AutoGen.Core/ILLMConfig.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // ILLMConfig.cs
3 |
4 | namespace AutoGen.Core;
5 |
6 | public interface ILLMConfig
7 | {
8 | }
9 |
--------------------------------------------------------------------------------
/dotnet/website/images/articles/CreateUserProxyAgent/image-1.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:91813a034edc3918a27758296d77150d1c8d650911847bdc6a42cca79307714a
3 | size 9009
4 |
--------------------------------------------------------------------------------
/dotnet/website/images/articles/DynamicGroupChat/dynamicChat.gif:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:5cba3069e9669a1b8013f0b2fa4d191c1d7b0b7919b1664f1f8ec98a90c7a2b2
3 | size 411517
4 |
--------------------------------------------------------------------------------
/website/blog/2023-05-18-GPT-adaptive-humaneval/img/humaneval.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:98543c9fbf1f5d713c34b7611bbc76522610615d9f93c9e89a2a2e0876bc71fd
3 | size 47656
4 |
--------------------------------------------------------------------------------
/website/blog/2023-10-18-RetrieveChat/img/retrievechat-arch.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:a66cc322b34ab0d5c90b76e7accd0b7cf632e0d03e93851d2ad1f8b00c05829b
3 | size 253150
4 |
--------------------------------------------------------------------------------
/website/blog/2023-10-26-TeachableAgent/img/teachable-arch.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:3f681e83c85432aebd43d351283e4e4900f494cbfff9dced71f79d0e88fd8b19
3 | size 145406
4 |
--------------------------------------------------------------------------------
/website/blog/2023-11-26-Agent-AutoBuild/img/agent_autobuild.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:a4df8562660a9aae67c6a2dfa14453ae4a68707206621cd26b5c183867d77d7f
3 | size 269313
4 |
--------------------------------------------------------------------------------
/website/blog/2023-12-01-AutoGenStudio/img/autogenstudio_home.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:37e3e535e7d69d6bb1f1af7a1b7596599f122db848684172ec3b209c8d6d45c1
3 | size 821003
4 |
--------------------------------------------------------------------------------
/website/blog/2023-12-23-AgentOptimizer/img/agentoptimizer.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:cc5caafeb56e62dc82d79572dc25454425be3feedd05a87768342c1fb1aa7b9d
3 | size 197252
4 |
--------------------------------------------------------------------------------
/website/blog/2024-02-11-FSM-GroupChat/img/FSM_of_multi-agents.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:815b4de5822a76d6874d3e893dcd2428b08cbecff833cf1cb82938e6ec80728b
3 | size 46898
4 |
--------------------------------------------------------------------------------
/website/docs/topics/non-openai-models/images/cloudlocalproxy.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:1c2e71bbd8ca4f2a83d8c1e3dbb75a4fc3586318d849699ba3d2e6beaec3d3d3
3 | size 57529
4 |
--------------------------------------------------------------------------------
/website/docs/tutorial/assets/code-execution-in-conversation.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:f07f62e09015f13a254ebc1dbfe92c7209608ed4888ab28722b4f39dad575058
3 | size 27871
4 |
--------------------------------------------------------------------------------
/dotnet/sample/AutoGen.Ollama.Sample/Program.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // Program.cs
3 |
4 | using AutoGen.Ollama.Sample;
5 |
6 | await Chat_With_LLaVA.RunAsync();
7 |
--------------------------------------------------------------------------------
/dotnet/website/images/articles/PrintMessageMiddleware/printMessage.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:7ec3bc40d4e3c1228d5799e448a34521998e7abb700bc978afc790389805ecb4
3 | size 86924
4 |
--------------------------------------------------------------------------------
/scripts/docs_build.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -e
4 | set -x
5 |
6 | cd website &&
7 | yarn install --frozen-lockfile --ignore-engines &&
8 | pydoc-markdown &&
9 | yarn build
10 |
--------------------------------------------------------------------------------
/scripts/docs_serve.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -e
4 | set -x
5 |
6 | cd website &&
7 | yarn install --frozen-lockfile --ignore-engines &&
8 | pydoc-markdown &&
9 | yarn start
10 |
--------------------------------------------------------------------------------
/website/blog/2023-12-01-AutoGenStudio/img/autogenstudio_config.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:fdcbc2d7bcf2ba85864c14c6acebb50ad9f2c53b3696da0c81d08b73f3784e32
3 | size 173826
4 |
--------------------------------------------------------------------------------
/website/blog/2023-12-01-AutoGenStudio/img/autogenstudio_skills.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:67fc01c2e73b81904395e39c846e3fb3db7b2a68b4a93181a38b6e1ceda83d4b
3 | size 153680
4 |
--------------------------------------------------------------------------------
/website/blog/2024-03-11-AutoDefense/imgs/defense-agency-design.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:3ac119a748ecce74a319f5bd224e0bcb312b95a8674d834932f54279386174cc
3 | size 163963
4 |
--------------------------------------------------------------------------------
/website/blog/2024-03-11-AutoDefense/imgs/table-compared-methods.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:21f5534bb42f010908cef6b9b3d264ebd5ccf1cd29ab81f87b1d7100bc76aaa6
3 | size 110141
4 |
--------------------------------------------------------------------------------
/dotnet/website/images/articles/PrintMessageMiddleware/streamingoutput.gif:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:95feb667fe74177506435ca52fcf183fb187a3a407fac0b3b220bd9e8da721c7
3 | size 547023
4 |
--------------------------------------------------------------------------------
/dotnet/website/images/articles/SequentialGroupChat/SearcherSummarizer.gif:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:c6d8a5a534efaf49ecc796ad3ca8e62fb7a236b55d894bda7a0c258564195b5d
3 | size 620269
4 |
--------------------------------------------------------------------------------
/autogen/logger/__init__.py:
--------------------------------------------------------------------------------
1 | from .file_logger import FileLogger
2 | from .logger_factory import LoggerFactory
3 | from .sqlite_logger import SqliteLogger
4 |
5 | __all__ = ("LoggerFactory", "SqliteLogger", "FileLogger")
6 |
--------------------------------------------------------------------------------
/dotnet/website/.gitignore:
--------------------------------------------------------------------------------
1 | ###############
2 | # folder #
3 | ###############
4 | /**/DROP/
5 | /**/TEMP/
6 | /**/packages/
7 | /**/bin/
8 | /**/obj/
9 |
10 | # build artifacts for web
11 | _site/
12 | api/
13 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/MANIFEST.json:
--------------------------------------------------------------------------------
1 | {
2 | "scenarios": {
3 | "HumanEval": "HumanEval/",
4 | "GAIA": "GAIA/",
5 | "AutoGPT": "AutoGPT/",
6 | "MATH": "MATH/"
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/dotnet/website/template/public/main.js:
--------------------------------------------------------------------------------
1 | export default {
2 | iconLinks: [
3 | {
4 | icon: 'github',
5 | href: 'https://github.com/microsoft/autogen',
6 | title: 'GitHub'
7 | }
8 | ]
9 | }
--------------------------------------------------------------------------------
/samples/apps/autogen-studio/frontend/gatsby-browser.js:
--------------------------------------------------------------------------------
1 | import "antd/dist/reset.css";
2 | import "./src/styles/global.css";
3 |
4 | import AuthProvider from "./src/hooks/provider";
5 |
6 | export const wrapRootElement = AuthProvider;
7 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/AutoGPT/Challenges/1_sort_csv/artifacts_in/input.csv:
--------------------------------------------------------------------------------
1 | id,name,timestamp
2 | 3,Alice,2023-09-25 14:10:00
3 | 1,Bob,2023-09-24 12:05:00
4 | 2,Charlie,2023-09-24 12:10:00
5 | 4,David,2023-09-26 16:20:00
6 |
--------------------------------------------------------------------------------
/dotnet/sample/AutoGen.SemanticKernel.Sample/Program.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // Program.cs
3 |
4 | using AutoGen.SemanticKernel.Sample;
5 |
6 | await Use_Kernel_Functions_With_Other_Agent.RunAsync();
7 |
--------------------------------------------------------------------------------
/dotnet/sample/AutoGen.BasicSamples/Program.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // Program.cs
3 |
4 | using AutoGen.BasicSample;
5 | Console.ReadLine();
6 | await Example16_OpenAIChatAgent_ConnectToThirdPartyBackend.RunAsync();
7 |
--------------------------------------------------------------------------------
/dotnet/NuGet.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/samples/apps/autogen-studio/MANIFEST.in:
--------------------------------------------------------------------------------
1 | recursive-include autogenstudio/web/ui *
2 | recursive-include autogenstudio/web/database.sqlite
3 | recursive-exclude notebooks *
4 |
5 | recursive-exclude frontend *
6 | recursive-exclude docs *
7 | recursive-exclude tests *
8 |
--------------------------------------------------------------------------------
/samples/apps/promptflow-autogen/azure_openai.yaml:
--------------------------------------------------------------------------------
1 | $schema: https://azuremlschemas.azureedge.net/promptflow/latest/AzureOpenAIConnection.schema.json
2 | name: open_ai_connection
3 | type: azure_open_ai
4 | api_key: ""
5 | api_base: ""
6 | api_type: "azure"
7 |
--------------------------------------------------------------------------------
/dotnet/src/AutoGen.DotnetInteractive/dotnet-tools.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": 1,
3 | "isRoot": true,
4 | "tools": {
5 | "Microsoft.dotnet-interactive": {
6 | "version": "1.0.522904",
7 | "commands": [
8 | "dotnet-interactive"
9 | ]
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/samples/apps/cap/py/autogencap/Config.py:
--------------------------------------------------------------------------------
1 | # Set the current log level
2 | LOG_LEVEL = 0
3 | IGNORED_LOG_CONTEXTS = []
4 | xpub_url: str = "tcp://127.0.0.1:5555"
5 | xsub_url: str = "tcp://127.0.0.1:5556"
6 | router_url: str = "tcp://127.0.0.1:5557"
7 | dealer_url: str = "tcp://127.0.0.1:5558"
8 |
--------------------------------------------------------------------------------
/dotnet/test/AutoGen.SemanticKernel.Tests/ApprovalTests/KernelFunctionExtensionTests.ItCreateFunctionContractsFromPrompt.approved.txt:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "Name": "sayHello",
4 | "Description": "Generic function, unknown purpose",
5 | "Parameters": [],
6 | "ReturnDescription": ""
7 | }
8 | ]
--------------------------------------------------------------------------------
/website/docs/ecosystem/pgvector.md:
--------------------------------------------------------------------------------
1 | # PGVector
2 |
3 | [PGVector](https://github.com/pgvector/pgvector) is an open-source vector similarity search for Postgres.
4 |
5 | - [PGVector + AutoGen Code Examples](https://github.com/microsoft/autogen/blob/main/notebook/agentchat_pgvector_RetrieveChat.ipynb)
6 |
--------------------------------------------------------------------------------
/website/src/components/HomepageFeatures.module.css:
--------------------------------------------------------------------------------
1 | /* stylelint-disable docusaurus/copyright-header */
2 |
3 | .features {
4 | display: flex;
5 | align-items: center;
6 | padding: 2rem 0;
7 | width: 100%;
8 | }
9 |
10 | .featureSvg {
11 | height: 130px;
12 | width: auto;
13 | }
14 |
--------------------------------------------------------------------------------
/dotnet/src/AutoGen.DotnetInteractive/RestoreInteractive.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/dotnet/website/toc.yml:
--------------------------------------------------------------------------------
1 | - name: Docs
2 | href: articles/
3 |
4 | - name: API Reference
5 | href: api/
6 |
7 | - name: Update Log
8 | href: update.md
9 |
10 | - name: Other Languages
11 | dropdown: true
12 | items:
13 | - name: Python
14 | href: https://microsoft.github.io/autogen/
15 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/AutoGPT/Scripts/custom_tabulate.py:
--------------------------------------------------------------------------------
1 | import os
2 | import sys
3 |
4 | from autogenbench.tabulate_cmd import default_tabulate
5 |
6 |
7 | def main(args):
8 | default_tabulate(args)
9 |
10 |
11 | if __name__ == "__main__" and __package__ is None:
12 | main(sys.argv)
13 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/HumanEval/Scripts/custom_tabulate.py:
--------------------------------------------------------------------------------
1 | import os
2 | import sys
3 |
4 | from autogenbench.tabulate_cmd import default_tabulate
5 |
6 |
7 | def main(args):
8 | default_tabulate(args)
9 |
10 |
11 | if __name__ == "__main__" and __package__ is None:
12 | main(sys.argv)
13 |
--------------------------------------------------------------------------------
/autogen/__init__.py:
--------------------------------------------------------------------------------
1 | import logging
2 |
3 | from .agentchat import *
4 | from .code_utils import DEFAULT_MODEL, FAST_MODEL
5 | from .exception_utils import *
6 | from .oai import *
7 | from .version import __version__
8 |
9 | # Set the root logger.
10 | logger = logging.getLogger(__name__)
11 | logger.setLevel(logging.INFO)
12 |
--------------------------------------------------------------------------------
/samples/apps/cap/py/demo/_paths.py:
--------------------------------------------------------------------------------
1 | # Add autogencap to system path in case autogencap is not pip installed
2 | # Since this library has not been published to PyPi, it is not easy to install using pip
3 | import os
4 | import sys
5 |
6 | absparent = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
7 | sys.path.append(absparent)
8 |
--------------------------------------------------------------------------------
/dotnet/sample/AutoGen.Anthropic.Samples/Program.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // Program.cs
3 |
4 | namespace AutoGen.Anthropic.Samples;
5 |
6 | internal static class Program
7 | {
8 | public static async Task Main(string[] args)
9 | {
10 | await AnthropicSamples.RunAsync();
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/samples/apps/cap/py/demo/standalone/_paths.py:
--------------------------------------------------------------------------------
1 | # Add autogencap to system path in case autogencap is not pip installed
2 | # Since this library has not been published to PyPi, it is not easy to install using pip
3 | import os
4 | import sys
5 |
6 | absparent = os.path.abspath(os.path.join(os.path.dirname(__file__), "../.."))
7 | sys.path.append(absparent)
8 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/HumanEval/Templates/GroupChatFourAgents/coding/my_tests.py:
--------------------------------------------------------------------------------
1 | # Disable ruff linter for template files
2 | # ruff: noqa: F821
3 |
4 | __TEST__
5 |
6 |
7 | def run_tests(candidate):
8 | check(candidate)
9 | # We can search for this string in the output
10 | print("ALL TESTS PASSED !#!#\nTERMINATE")
11 |
--------------------------------------------------------------------------------
/dotnet/.config/dotnet-tools.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": 1,
3 | "isRoot": true,
4 | "tools": {
5 | "dotnet-repl": {
6 | "version": "0.1.205",
7 | "commands": [
8 | "dotnet-repl"
9 | ]
10 | },
11 | "docfx": {
12 | "version": "2.67.5",
13 | "commands": [
14 | "docfx"
15 | ]
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/HumanEval/Templates/GroupChatThreeAgents_Distractor/coding/my_tests.py:
--------------------------------------------------------------------------------
1 | # Disable ruff linter for template files
2 | # ruff: noqa: F821
3 |
4 | __TEST__
5 |
6 |
7 | def run_tests(candidate):
8 | check(candidate)
9 | # We can search for this string in the output
10 | print("ALL TESTS PASSED !#!#\nTERMINATE")
11 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/HumanEval/Templates/GroupChatThreeAgents_Guardrails/coding/my_tests.py:
--------------------------------------------------------------------------------
1 | # Disable ruff linter for template files
2 | # ruff: noqa: F821
3 |
4 | __TEST__
5 |
6 |
7 | def run_tests(candidate):
8 | check(candidate)
9 | # We can search for this string in the output
10 | print("ALL TESTS PASSED !#!#\nTERMINATE")
11 |
--------------------------------------------------------------------------------
/scripts/pre-commit-mypy-run.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # taken from: https://jaredkhan.com/blog/mypy-pre-commit
4 |
5 | # A script for running mypy,
6 | # with all its dependencies installed.
7 |
8 | set -o errexit
9 |
10 | # Change directory to the project root directory.
11 | cd "$(dirname "$0")"/..
12 |
13 | pip install -q -e .[types]
14 |
15 | mypy
16 |
--------------------------------------------------------------------------------
/test/test_files/example.txt:
--------------------------------------------------------------------------------
1 | AutoGen is an advanced tool designed to assist developers in harnessing the capabilities
2 | of Large Language Models (LLMs) for various applications. The primary purpose of AutoGen is to automate and
3 | simplify the process of building applications that leverage the power of LLMs, allowing for seamless
4 | integration, testing, and deployment.
5 |
--------------------------------------------------------------------------------
/dotnet/src/AutoGen.Mistral/DTOs/ResponseFormat.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // ResponseFormat.cs
3 |
4 | using System.Text.Json.Serialization;
5 |
6 | namespace AutoGen.Mistral;
7 |
8 | public class ResponseFormat
9 | {
10 | [JsonPropertyName("type")]
11 | public string ResponseFormatType { get; set; } = "json_object";
12 | }
13 |
--------------------------------------------------------------------------------
/autogen/io/__init__.py:
--------------------------------------------------------------------------------
1 | from .base import InputStream, IOStream, OutputStream
2 | from .console import IOConsole
3 | from .websockets import IOWebsockets
4 |
5 | # Set the default input/output stream to the console
6 | IOStream.set_global_default(IOConsole())
7 | IOStream.set_default(IOConsole())
8 |
9 | __all__ = ("IOConsole", "IOStream", "InputStream", "OutputStream", "IOWebsockets")
10 |
--------------------------------------------------------------------------------
/dotnet/src/AutoGen.Ollama/Embeddings/TextEmbeddingsResponse.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // TextEmbeddingsResponse.cs
3 |
4 | using System.Text.Json.Serialization;
5 |
6 | namespace AutoGen.Ollama;
7 |
8 | public class TextEmbeddingsResponse
9 | {
10 | [JsonPropertyName("embedding")]
11 | public double[]? Embedding { get; set; }
12 | }
13 |
--------------------------------------------------------------------------------
/samples/apps/promptflow-autogen/custom_conn.yaml:
--------------------------------------------------------------------------------
1 | $schema: https://azuremlschemas.azureedge.net/promptflow/latest/CustomConnection.schema.json
2 | name: "redis_connection_url"
3 | type: custom
4 | configs:
5 | key1: "test1"
6 | secrets:
7 | # Use'' to keep original value or '' to update it when the application runs.
8 | key2: "test2"
9 | redis_url: ""
10 |
--------------------------------------------------------------------------------
/website/docs/contributor-guide/pre-commit.md:
--------------------------------------------------------------------------------
1 | # Pre-commit
2 |
3 | Run `pre-commit install` to install pre-commit into your git hooks. Before you commit, run
4 | `pre-commit run` to check if you meet the pre-commit requirements. If you use Windows (without WSL) and can't commit after installing pre-commit, you can run `pre-commit uninstall` to uninstall the hook. In WSL or Linux this is supposed to work.
5 |
--------------------------------------------------------------------------------
/website/docs/ecosystem/llamaindex.md:
--------------------------------------------------------------------------------
1 | # Llamaindex
2 |
3 | 
4 |
5 | [Llamaindex](https://www.llamaindex.ai/) allows the users to create Llamaindex agents and integrate them in autogen conversation patterns.
6 |
7 | - [Llamaindex + AutoGen Code Examples](https://github.com/microsoft/autogen/blob/main/notebook/agentchat_group_chat_with_llamaindex_agents.ipynb)
8 |
--------------------------------------------------------------------------------
/dotnet/.gitignore:
--------------------------------------------------------------------------------
1 | # gitignore file for C#/VS
2 |
3 | # Build results
4 | [Dd]ebug/
5 | [Dd]ebugPublic/
6 | [Rr]elease/
7 | [Rr]eleases/
8 | x64/
9 | x86/
10 | build/
11 | bld/
12 | [Bb]in/
13 | [Oo]bj/
14 |
15 | # vs cache
16 | .vs/
17 |
18 | # vs code cache
19 | .vscode/
20 |
21 | # Properties
22 | Properties/
23 |
24 | artifacts/
25 | output/
26 |
27 | *.binlog
28 |
29 | # JetBrains Rider
30 | .idea/
--------------------------------------------------------------------------------
/dotnet/test/AutoGen.SourceGenerator.Tests/TopLevelStatementFunctionExample.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // TopLevelStatementFunctionExample.cs
3 |
4 | using AutoGen.Core;
5 |
6 | public partial class TopLevelStatementFunctionExample
7 | {
8 | [Function]
9 | public Task Add(int a, int b)
10 | {
11 | return Task.FromResult($"{a + b}");
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/HumanEval/Templates/TwoAgents/coding/my_tests.py:
--------------------------------------------------------------------------------
1 | # Disable ruff linter for template files
2 | # ruff: noqa: F821 E722
3 |
4 | __TEST__
5 |
6 |
7 | def run_tests(candidate):
8 | try:
9 | check(candidate)
10 | # We can search for this string in the output
11 | print("ALL TESTS PASSED !#!#\nTERMINATE")
12 | except:
13 | print("SOME TESTS FAILED - TRY AGAIN !#!#")
14 |
--------------------------------------------------------------------------------
/autogen/types.py:
--------------------------------------------------------------------------------
1 | from typing import Dict, List, Literal, TypedDict, Union
2 |
3 | MessageContentType = Union[str, List[Union[Dict, str]], None]
4 |
5 |
6 | class UserMessageTextContentPart(TypedDict):
7 | type: Literal["text"]
8 | text: str
9 |
10 |
11 | class UserMessageImageContentPart(TypedDict):
12 | type: Literal["image_url"]
13 | # Ignoring the other "detail param for now"
14 | image_url: Dict[Literal["url"], str]
15 |
--------------------------------------------------------------------------------
/dotnet/src/AutoGen.Ollama/Embeddings/ITextEmbeddingService.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // ITextEmbeddingService.cs
3 |
4 | using System.Threading;
5 | using System.Threading.Tasks;
6 |
7 | namespace AutoGen.Ollama;
8 |
9 | public interface ITextEmbeddingService
10 | {
11 | public Task GenerateAsync(TextEmbeddingsRequest request, CancellationToken cancellationToken);
12 | }
13 |
--------------------------------------------------------------------------------
/dotnet/website/README.md:
--------------------------------------------------------------------------------
1 | ## How to build and run the website
2 |
3 | ### Prerequisites
4 | - dotnet 7.0 or later
5 |
6 | ### Build
7 | Firstly, go to autogen/dotnet folder and run the following command to build the website:
8 | ```bash
9 | dotnet tool restore
10 | dotnet tool run docfx website/docfx.json --serve
11 | ```
12 |
13 | After the command is executed, you can open your browser and navigate to `http://localhost:8080` to view the website.
--------------------------------------------------------------------------------
/dotnet/test/AutoGen.Anthropic.Tests/AnthropicTestUtils.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // AnthropicTestUtils.cs
3 |
4 | namespace AutoGen.Anthropic;
5 |
6 | public static class AnthropicTestUtils
7 | {
8 | public static string ApiKey => Environment.GetEnvironmentVariable("ANTHROPIC_API_KEY") ??
9 | throw new Exception("Please set ANTHROPIC_API_KEY environment variable.");
10 | }
11 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/Examples/README.md:
--------------------------------------------------------------------------------
1 | # Example Tasks
2 |
3 | Various AutoGen example tasks. Unlike other benchmark tasks, these tasks have no automated evaluation.
4 |
5 | ## Running the tasks
6 |
7 | ```
8 | autogenbench run Tasks/default_two_agents
9 | ```
10 |
11 | Some tasks require a Bing API key. Edit the ENV.json file to provide a valid BING_API_KEY, or simply allow that task to fail (it is only required by one task).
12 |
--------------------------------------------------------------------------------
/dotnet/src/AutoGen.Ollama/OllamaConsts.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // OllamaConsts.cs
3 |
4 | namespace AutoGen.Ollama;
5 |
6 | public class OllamaConsts
7 | {
8 | public const string JsonFormatType = "json";
9 | public const string JsonMediaType = "application/json";
10 | public const string ChatCompletionEndpoint = "/api/chat";
11 | public const string EmbeddingsEndpoint = "/api/embeddings";
12 | }
13 |
--------------------------------------------------------------------------------
/dotnet/src/AutoGen.OpenAI/OpenAIConfig.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // OpenAIConfig.cs
3 |
4 | namespace AutoGen.OpenAI;
5 |
6 | public class OpenAIConfig : ILLMConfig
7 | {
8 | public OpenAIConfig(string apiKey, string modelId)
9 | {
10 | this.ApiKey = apiKey;
11 | this.ModelId = modelId;
12 | }
13 |
14 | public string ApiKey { get; }
15 |
16 | public string ModelId { get; }
17 | }
18 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/autogenbench/load_module.py:
--------------------------------------------------------------------------------
1 | import importlib.util
2 | import os
3 | import sys
4 |
5 |
6 | def load_module(module_path):
7 | module_name = os.path.basename(module_path).replace(".py", "")
8 | spec = importlib.util.spec_from_file_location(module_name, module_path)
9 | module = importlib.util.module_from_spec(spec)
10 | sys.modules[module_name] = module
11 | spec.loader.exec_module(module)
12 | return module
13 |
--------------------------------------------------------------------------------
/website/docs/ecosystem/ollama.md:
--------------------------------------------------------------------------------
1 | # Ollama
2 |
3 | 
4 |
5 | [Ollama](https://ollama.com/) allows the users to run open-source large language models, such as Llama 2, locally. Ollama bundles model weights, configuration, and data into a single package, defined by a Modelfile. It optimizes setup and configuration details, including GPU usage.
6 |
7 | - [Ollama + AutoGen instruction](https://ollama.ai/blog/openai-compatibility)
8 |
--------------------------------------------------------------------------------
/dotnet/test/AutoGen.SourceGenerator.Tests/FilescopeNamespaceFunctionExample.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // FilescopeNamespaceFunctionExample.cs
3 |
4 | using AutoGen.Core;
5 |
6 | namespace AutoGen.SourceGenerator.Tests;
7 | public partial class FilescopeNamespaceFunctionExample
8 | {
9 | [Function]
10 | public Task Add(int a, int b)
11 | {
12 | return Task.FromResult($"{a + b}");
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/samples/apps/cap/py/autogencap/utility.py:
--------------------------------------------------------------------------------
1 | from autogencap.DebugLog import Error
2 | from autogencap.proto.CAP_pb2 import Error as ErrorMsg
3 | from autogencap.proto.CAP_pb2 import ErrorCode
4 |
5 |
6 | def report_error_msg(msg: ErrorMsg, src: str):
7 | if msg is not None:
8 | err = ErrorMsg()
9 | err.ParseFromString(msg)
10 | if err.code != ErrorCode.EC_OK:
11 | Error(src, f"Error response: code[{err.code}] msg[{err.message}]")
12 |
--------------------------------------------------------------------------------
/test/coding/test_factory.py:
--------------------------------------------------------------------------------
1 | import pytest
2 |
3 | from autogen.coding.factory import CodeExecutorFactory
4 |
5 |
6 | def test_create_unknown() -> None:
7 | config = {"executor": "unknown"}
8 | with pytest.raises(ValueError, match="Unknown code executor unknown"):
9 | CodeExecutorFactory.create(config)
10 |
11 | config = {}
12 | with pytest.raises(ValueError, match="Unknown code executor None"):
13 | CodeExecutorFactory.create(config)
14 |
--------------------------------------------------------------------------------
/dotnet/test/AutoGen.SourceGenerator.Tests/ApprovalTests/FunctionExample.Sum_Test.approved.txt:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Sum",
3 | "description": "Sum function",
4 | "parameters": {
5 | "type": "object",
6 | "properties": {
7 | "args": {
8 | "type": "array",
9 | "items": {
10 | "type": "number"
11 | },
12 | "description": "an array of double values"
13 | }
14 | },
15 | "required": [
16 | "args"
17 | ]
18 | }
19 | }
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/Examples/MANIFEST.json:
--------------------------------------------------------------------------------
1 | {
2 | "files": {
3 | "Templates/TwoAgents/scenario_finalize.sh": "Templates/TwoAgents/scenario_finalize.sh",
4 | "Templates/TwoAgents/scenario.py": "Templates/TwoAgents/scenario.py",
5 | "Templates/TwoAgents/scenario_init.sh": "Templates/TwoAgents/scenario_init.sh",
6 | "Tasks/default_two_agents.jsonl": "Tasks/default_two_agents.jsonl",
7 | "README.md": "README.md"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Microsoft Open Source Code of Conduct
2 |
3 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
4 |
5 | Resources:
6 |
7 | - [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/)
8 | - [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
9 | - Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns
10 |
--------------------------------------------------------------------------------
/dotnet/test/AutoGen.SourceGenerator.Tests/ApprovalTests/FunctionExample.Add_Test.approved.txt:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Add",
3 | "description": "Add function",
4 | "parameters": {
5 | "type": "object",
6 | "properties": {
7 | "a": {
8 | "type": "integer",
9 | "description": "a"
10 | },
11 | "b": {
12 | "type": "integer",
13 | "description": "b"
14 | }
15 | },
16 | "required": [
17 | "a",
18 | "b"
19 | ]
20 | }
21 | }
--------------------------------------------------------------------------------
/samples/apps/autogen-studio/.gitignore:
--------------------------------------------------------------------------------
1 | database.sqlite
2 | .cache/*
3 | autogenstudio/web/files/user/*
4 | autogenstudio/test
5 | autogenstudio/web/files/ui/*
6 | OAI_CONFIG_LIST
7 | scratch/
8 | autogenstudio/web/workdir/*
9 | autogenstudio/web/ui/*
10 | autogenstudio/web/skills/user/*
11 | .release.sh
12 |
13 | # Byte-compiled / optimized / DLL files
14 | __pycache__/
15 | *.py[cod]
16 | *$py.class
17 |
18 | # Environments
19 | .env
20 | .venv
21 | env/
22 | venv/
23 | ENV/
24 | env.bak/
25 | venv.bak/
26 |
--------------------------------------------------------------------------------
/samples/apps/cap/py/autogencap/ag_adapter/AGActor.py:
--------------------------------------------------------------------------------
1 | import zmq
2 |
3 | from autogencap.Actor import Actor
4 | from autogencap.Constants import Termination_Topic
5 | from autogencap.DebugLog import Debug
6 |
7 |
8 | class AGActor(Actor):
9 | def on_start(self, context: zmq.Context):
10 | super().on_start(context)
11 | str_topic = Termination_Topic
12 | Debug(self.actor_name, f"subscribe to: {str_topic}")
13 | self._socket.setsockopt_string(zmq.SUBSCRIBE, f"{str_topic}")
14 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/HumanEval/MANIFEST.json:
--------------------------------------------------------------------------------
1 | {
2 | "files": {
3 | "Templates/TwoAgents/prompt.txt": "Templates/TwoAgents/prompt.txt",
4 | "Templates/TwoAgents/coding/my_tests.py": "Templates/TwoAgents/coding/my_tests.py",
5 | "Templates/TwoAgents/scenario.py": "Templates/TwoAgents/scenario.py",
6 | "README.md": "README.md",
7 | "Scripts/init_tasks.py": "Scripts/init_tasks.py",
8 | "Scripts/custom_tabulate.py": "Scripts/custom_tabulate.py"
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/dotnet/src/AutoGen.Mistral/DTOs/ErrorResponse.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // ErrorResponse.cs
3 |
4 | using System.Text.Json.Serialization;
5 |
6 | namespace AutoGen.Mistral;
7 |
8 | public class ErrorResponse
9 | {
10 | public ErrorResponse(Error error)
11 | {
12 | Error = error;
13 | }
14 | ///
15 | /// Gets or Sets Error
16 | ///
17 | [JsonPropertyName("error")]
18 | public Error Error { get; set; }
19 | }
20 |
--------------------------------------------------------------------------------
/website/docs/ecosystem/composio.md:
--------------------------------------------------------------------------------
1 | # Composio
2 |
3 | 
4 |
5 | Composio empowers AI agents to seamlessly connect with external tools, Apps, and APIs to perform actions and receive triggers. With built-in support for AutoGen, Composio enables the creation of highly capable and adaptable AI agents that can autonomously execute complex tasks and deliver personalized experiences.
6 |
7 | - [Composio + AutoGen Documentation with Code Examples](https://docs.composio.dev/framework/autogen)
8 |
--------------------------------------------------------------------------------
/dotnet/src/AutoGen/ConversableAgentConfig.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // ConversableAgentConfig.cs
3 |
4 | using System.Collections.Generic;
5 |
6 | namespace AutoGen;
7 |
8 | public class ConversableAgentConfig
9 | {
10 | public IEnumerable? FunctionContracts { get; set; }
11 |
12 | public IEnumerable? ConfigList { get; set; }
13 |
14 | public float? Temperature { get; set; } = 0.7f;
15 |
16 | public int? Timeout { get; set; }
17 | }
18 |
--------------------------------------------------------------------------------
/samples/apps/autogen-studio/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM python:3.10
2 |
3 | WORKDIR /code
4 |
5 | RUN pip install -U gunicorn autogenstudio
6 |
7 | RUN useradd -m -u 1000 user
8 | USER user
9 | ENV HOME=/home/user \
10 | PATH=/home/user/.local/bin:$PATH \
11 | AUTOGENSTUDIO_APPDIR=/home/user/app
12 |
13 | WORKDIR $HOME/app
14 |
15 | COPY --chown=user . $HOME/app
16 |
17 | CMD gunicorn -w $((2 * $(getconf _NPROCESSORS_ONLN) + 1)) --timeout 12600 -k uvicorn.workers.UvicornWorker autogenstudio.web.app:app --bind "0.0.0.0:8081"
18 |
--------------------------------------------------------------------------------
/samples/apps/websockets/README.md:
--------------------------------------------------------------------------------
1 | # Using websockets with FastAPI and AutoGen
2 |
3 | ## Running the example
4 |
5 | 1. Navigate to the directory containing the example:
6 | ```
7 | cd samples/apps/websockets
8 | ```
9 |
10 | 2. Install the necessary dependencies:
11 | ```
12 | ./setup.py
13 | ```
14 |
15 | 3. Run the application:
16 | ```
17 | uvicorn application:app --reload
18 | ```
19 |
20 | You should now be able to access the application in your web browser at `http://localhost:8000`.
21 |
--------------------------------------------------------------------------------
/samples/apps/autogen-studio/frontend/gatsby-ssr.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | const codeToRunOnClient = `(function() {
4 | try {
5 | var mode = localStorage.getItem('darkmode');
6 | document.getElementsByTagName("html")[0].className === 'dark' ? 'dark' : 'light';
7 | } catch (e) {}
8 | })();`;
9 |
10 | export const onRenderBody = ({ setHeadComponents }) =>
11 | setHeadComponents([
12 | ,
16 | ]);
17 |
--------------------------------------------------------------------------------
/samples/apps/autogen-studio/frontend/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "esnext",
4 | "lib": ["dom", "esnext"],
5 | "jsx": "react",
6 | "module": "esnext",
7 | "moduleResolution": "node",
8 | "esModuleInterop": true,
9 | "forceConsistentCasingInFileNames": true,
10 | "strict": true,
11 | "skipLibCheck": true
12 | },
13 | "include": [
14 | "./types/*",
15 | "./src/**/*",
16 | "./gatsby-node.ts",
17 | "./gatsby-config.ts",
18 | "./plugins/**/*"
19 | ]
20 | }
21 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/AutoGPT/README.md:
--------------------------------------------------------------------------------
1 | # AutoGPT Benchmark
2 |
3 | This scenario implements an older subset of the [AutoGPT](https://github.com/Significant-Gravitas/Auto-GPT-Benchmarks/tree/master/agbenchmark#readme) benchmark.
4 |
5 | Tasks were selected in November 2023, and may have since been deprecated. They are nonetheless useful for comparison and development.
6 |
7 | ## Running the tasks
8 |
9 | ```
10 | autogenbench run Tasks/autogpt__two_agents.jsonl
11 | autogenbench tabulate Results/autogpt__two_agents
12 | ```
13 |
--------------------------------------------------------------------------------
/test/test_files/agenteval-in-out/samples/sample_math_evaluated_results.json:
--------------------------------------------------------------------------------
1 | {
2 | "sample_algebra.json": {
3 | "actual_success": "true",
4 | "estimated_performance": {
5 | "Problem Interpretation": "completely accurate",
6 | "Mathematical Methodology": "completely effective",
7 | "Calculation Correctness": "completely correct",
8 | "Explanation Clarity": "very clear",
9 | "Code Efficiency": "very efficient",
10 | "Code Correctness": "completely correct"
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/dotnet/src/AutoGen.Anthropic/Utils/AnthropicConstants.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // Constants.cs
3 |
4 | namespace AutoGen.Anthropic.Utils;
5 |
6 | public static class AnthropicConstants
7 | {
8 | public static string Endpoint = "https://api.anthropic.com/v1/messages";
9 |
10 | // Models
11 | public static string Claude3Opus = "claude-3-opus-20240229";
12 | public static string Claude3Sonnet = "claude-3-sonnet-20240229";
13 | public static string Claude3Haiku = "claude-3-haiku-20240307";
14 | }
15 |
--------------------------------------------------------------------------------
/website/src/pages/index.module.css:
--------------------------------------------------------------------------------
1 | /* stylelint-disable docusaurus/copyright-header */
2 |
3 | /**
4 | * CSS files with the .module.css suffix will be treated as CSS modules
5 | * and scoped locally.
6 | */
7 |
8 | .heroBanner {
9 | padding: 4rem 0;
10 | text-align: center;
11 | position: relative;
12 | overflow: hidden;
13 | }
14 |
15 | @media screen and (max-width: 966px) {
16 | .heroBanner {
17 | padding: 2rem;
18 | }
19 | }
20 |
21 | .buttons {
22 | display: flex;
23 | align-items: center;
24 | justify-content: center;
25 | }
26 |
--------------------------------------------------------------------------------
/autogen/agentchat/contrib/agent_eval/README.md:
--------------------------------------------------------------------------------
1 | Agents for running the AgentEval pipeline.
2 |
3 | AgentEval is a process for evaluating a LLM-based system's performance on a given task.
4 |
5 | When given a task to evaluate and a few example runs, the critic and subcritic agents create evaluation criteria for evaluating a system's solution. Once the criteria has been created, the quantifier agent can evaluate subsequent task solutions based on the generated criteria.
6 |
7 | For more information see: [AgentEval Integration Roadmap](https://github.com/microsoft/autogen/issues/2162)
8 |
--------------------------------------------------------------------------------
/dotnet/src/AutoGen.Anthropic/DTO/ErrorResponse.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // ErrorResponse.cs
3 |
4 | using System.Text.Json.Serialization;
5 |
6 | namespace AutoGen.Anthropic.DTO;
7 |
8 | public sealed class ErrorResponse
9 | {
10 | [JsonPropertyName("error")]
11 | public Error? Error { get; set; }
12 | }
13 |
14 | public sealed class Error
15 | {
16 | [JsonPropertyName("Type")]
17 | public string? Type { get; set; }
18 |
19 | [JsonPropertyName("message")]
20 | public string? Message { get; set; }
21 | }
22 |
--------------------------------------------------------------------------------
/website/static/img/autogen.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/website/docs/notebooks.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | hide_table_of_contents: true
3 | ---
4 |
5 | import {findAllNotebooks} from '../src/components/NotebookUtils';
6 | import GalleryPage from '../src/components/GalleryPage';
7 |
8 | # Notebooks
9 |
10 | This page contains a collection of notebooks that demonstrate how to use
11 | AutoGen. The notebooks are tagged with the topics they cover.
12 | For example, a notebook that demonstrates how to use function calling will
13 | be tagged with `function call`.
14 |
15 |
16 |
--------------------------------------------------------------------------------
/dotnet/test/.editorconfig:
--------------------------------------------------------------------------------
1 | # Suppressing errors for Test projects under test folder
2 | [*.cs]
3 | dotnet_diagnostic.CA2007.severity = none # Do not directly await a Task
4 | dotnet_diagnostic.VSTHRD111.severity = none # Use .ConfigureAwait(bool) is hidden by default, set to none to prevent IDE from changing on autosave
5 | dotnet_diagnostic.CS1591.severity = none # Missing XML comment for publicly visible type or member
6 | dotnet_diagnostic.CS1998.severity = none # Async method lacks 'await' operators and will run synchronously
7 | dotnet_diagnostic.IDE1006.severity = warning # Naming rule violations
--------------------------------------------------------------------------------
/dotnet/test/AutoGen.SourceGenerator.Tests/ApprovalTests/FunctionExample.DictionaryToString_Test.approved.txt:
--------------------------------------------------------------------------------
1 | {
2 | "name": "DictionaryToStringAsync",
3 | "description": "DictionaryToString function",
4 | "parameters": {
5 | "type": "object",
6 | "properties": {
7 | "xargs": {
8 | "type": "object",
9 | "additionalProperties": {
10 | "type": "string"
11 | },
12 | "description": "an object of key-value pairs. key is string, value is string"
13 | }
14 | },
15 | "required": [
16 | "xargs"
17 | ]
18 | }
19 | }
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/AutoGPT/Challenges/3_qa_small_csv/artifacts_in/file1.csv:
--------------------------------------------------------------------------------
1 | Date,Description,Amount,Category
2 | 2023-01-01,Grocery Store,52.3,Groceries
3 | 2023-01-02,Pharmacy,12.5,Healthcare
4 | 2023-01-03,Gas Station,29.1,Transportation
5 | 2023-01-04,Water,19,Utilities
6 | 2023-01-05,Grocery Store,60.25,Groceries
7 | 2023-01-06,Coffee Shop,4.5,Dining
8 | 2023-01-07,Cinema Tickets,20,Entertainment
9 | 2023-01-08,Book Store,30.4,Shopping
10 | 2023-01-09,Restaurant Dinner,55.8,Dining
11 | 2023-01-10,Electric Bill,65.35,Utilities
12 | 2023-01-11,Grocery Store,45.1,Groceries
13 |
--------------------------------------------------------------------------------
/.github/workflows/lfs-check.yml:
--------------------------------------------------------------------------------
1 | name: "Git LFS Check"
2 |
3 | on: pull_request
4 | permissions: {}
5 | jobs:
6 | lfs-check:
7 | runs-on: ubuntu-latest
8 | steps:
9 | - name: Checkout
10 | uses: actions/checkout@v4
11 | with:
12 | lfs: true
13 | - name: "Check Git LFS files for consistency, if you see error like 'pointer: unexpectedGitObject ... should have been a pointer but was not', please install Git LFS locally, delete the problematic file, and then add it back again. This ensures it's properly tracked."
14 | run: |
15 | git lfs fsck
16 |
--------------------------------------------------------------------------------
/website/docs/ecosystem/memgpt.md:
--------------------------------------------------------------------------------
1 | # MemGPT
2 |
3 | 
4 |
5 | MemGPT enables LLMs to manage their own memory and overcome limited context windows. You can use MemGPT to create perpetual chatbots that learn about you and modify their own personalities over time. You can connect MemGPT to your own local filesystems and databases, as well as connect MemGPT to your own tools and APIs. The MemGPT + AutoGen integration allows you to equip any AutoGen agent with MemGPT capabilities.
6 |
7 | - [MemGPT + AutoGen Documentation with Code Examples](https://memgpt.readme.io/docs/autogen)
8 |
--------------------------------------------------------------------------------
/website/pydoc-markdown.yml:
--------------------------------------------------------------------------------
1 | loaders:
2 | - type: python
3 | search_path: [../autogen/]
4 | processors:
5 | - type: filter
6 | skip_empty_modules: true
7 | - type: google
8 | renderer:
9 | type: docusaurus
10 | docs_base_path: docs
11 | relative_output_path: reference
12 | relative_sidebar_path: sidebar.json
13 | sidebar_top_level_label: Reference
14 | markdown:
15 | escape_html_in_docstring: false
16 | descriptive_class_title: false
17 | header_level_by_type:
18 | Module: 1
19 | Class: 2
20 | Method: 3
21 | Function: 3
22 | Variable: 4
23 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/MATH/MANIFEST.json:
--------------------------------------------------------------------------------
1 | {
2 | "files": {
3 | "README.md": "README.md",
4 | "Scripts/init_tasks.py": "Scripts/init_tasks.py",
5 | "Scripts/custom_tabulate.py": "Scripts/custom_tabulate.py",
6 | "Templates/TwoAgents/prompt.txt": "Templates/TwoAgents/prompt.txt",
7 | "Templates/TwoAgents/expected_answer.txt": "Templates/TwoAgents/expected_answer.txt",
8 | "Templates/TwoAgents/scenario.py": "Templates/TwoAgents/scenario.py",
9 | "Templates/TwoAgents/scenario_init.sh": "Templates/TwoAgents/scenario_init.sh"
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/samples/apps/cap/py/demo/AGDemo.py:
--------------------------------------------------------------------------------
1 | from autogen import AssistantAgent, UserProxyAgent, config_list_from_json
2 |
3 |
4 | def ag_demo():
5 | config_list = config_list_from_json(env_or_file="OAI_CONFIG_LIST")
6 | assistant = AssistantAgent("assistant", llm_config={"config_list": config_list})
7 | user_proxy = UserProxyAgent(
8 | "user_proxy",
9 | code_execution_config={"work_dir": "coding"},
10 | is_termination_msg=lambda x: "TERMINATE" in x.get("content"),
11 | )
12 | user_proxy.initiate_chat(assistant, message="Plot a chart of MSFT daily closing prices for last 1 Month.")
13 |
--------------------------------------------------------------------------------
/dotnet/src/AutoGen.Core/Agent/IStreamingAgent.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // IStreamingAgent.cs
3 |
4 | using System.Collections.Generic;
5 | using System.Threading;
6 |
7 | namespace AutoGen.Core;
8 |
9 | ///
10 | /// agent that supports streaming reply
11 | ///
12 | public interface IStreamingAgent : IAgent
13 | {
14 | public IAsyncEnumerable GenerateStreamingReplyAsync(
15 | IEnumerable messages,
16 | GenerateReplyOptions? options = null,
17 | CancellationToken cancellationToken = default);
18 | }
19 |
--------------------------------------------------------------------------------
/autogen/coding/__init__.py:
--------------------------------------------------------------------------------
1 | from .base import CodeBlock, CodeExecutor, CodeExtractor, CodeResult
2 | from .docker_commandline_code_executor import DockerCommandLineCodeExecutor
3 | from .factory import CodeExecutorFactory
4 | from .local_commandline_code_executor import LocalCommandLineCodeExecutor
5 | from .markdown_code_extractor import MarkdownCodeExtractor
6 |
7 | __all__ = (
8 | "CodeBlock",
9 | "CodeResult",
10 | "CodeExtractor",
11 | "CodeExecutor",
12 | "CodeExecutorFactory",
13 | "MarkdownCodeExtractor",
14 | "LocalCommandLineCodeExecutor",
15 | "DockerCommandLineCodeExecutor",
16 | )
17 |
--------------------------------------------------------------------------------
/autogen/coding/jupyter/__init__.py:
--------------------------------------------------------------------------------
1 | from .base import JupyterConnectable, JupyterConnectionInfo
2 | from .docker_jupyter_server import DockerJupyterServer
3 | from .embedded_ipython_code_executor import EmbeddedIPythonCodeExecutor
4 | from .jupyter_client import JupyterClient
5 | from .jupyter_code_executor import JupyterCodeExecutor
6 | from .local_jupyter_server import LocalJupyterServer
7 |
8 | __all__ = [
9 | "JupyterConnectable",
10 | "JupyterConnectionInfo",
11 | "JupyterClient",
12 | "LocalJupyterServer",
13 | "DockerJupyterServer",
14 | "EmbeddedIPythonCodeExecutor",
15 | "JupyterCodeExecutor",
16 | ]
17 |
--------------------------------------------------------------------------------
/dotnet/src/AutoGen.Mistral/MistralAIModelID.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // MistralAIModelID.cs
3 |
4 | namespace AutoGen.Mistral;
5 |
6 | public class MistralAIModelID
7 | {
8 | public const string OPEN_MISTRAL_7B = "open-mistral-7b";
9 | public const string OPEN_MISTRAL_8X7B = "open-mixtral-8x7b";
10 | public const string OPEN_MISTRAL_8X22B = "open-mixtral-8x22b";
11 | public const string MISTRAL_SMALL_LATEST = "mistral-small-latest";
12 | public const string MISTRAL_MEDIUM_LATEST = "mistral-medium-latest";
13 | public const string MISTRAL_LARGE_LATEST = "mistral-large-latest";
14 | }
15 |
--------------------------------------------------------------------------------
/dotnet/src/AutoGen.Ollama/DTOs/ChatResponseUpdate.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // ChatResponseUpdate.cs
3 |
4 | using System.Text.Json.Serialization;
5 |
6 | namespace AutoGen.Ollama;
7 |
8 | public class ChatResponseUpdate
9 | {
10 | [JsonPropertyName("model")]
11 | public string Model { get; set; } = string.Empty;
12 |
13 | [JsonPropertyName("created_at")]
14 | public string CreatedAt { get; set; } = string.Empty;
15 |
16 | [JsonPropertyName("message")]
17 | public Message? Message { get; set; }
18 |
19 | [JsonPropertyName("done")]
20 | public bool Done { get; set; }
21 | }
22 |
--------------------------------------------------------------------------------
/autogen/agentchat/__init__.py:
--------------------------------------------------------------------------------
1 | from .agent import Agent
2 | from .assistant_agent import AssistantAgent
3 | from .chat import ChatResult, initiate_chats
4 | from .conversable_agent import ConversableAgent, register_function
5 | from .groupchat import GroupChat, GroupChatManager
6 | from .user_proxy_agent import UserProxyAgent
7 | from .utils import gather_usage_summary
8 |
9 | __all__ = (
10 | "Agent",
11 | "ConversableAgent",
12 | "AssistantAgent",
13 | "UserProxyAgent",
14 | "GroupChat",
15 | "GroupChatManager",
16 | "register_function",
17 | "initiate_chats",
18 | "gather_usage_summary",
19 | "ChatResult",
20 | )
21 |
--------------------------------------------------------------------------------
/samples/apps/cap/py/demo/SimpleActorDemo.py:
--------------------------------------------------------------------------------
1 | from AppAgents import GreeterAgent
2 | from autogencap.ComponentEnsemble import ComponentEnsemble
3 |
4 |
5 | def simple_actor_demo():
6 | """
7 | Demonstrates the usage of the CAP platform by registering an actor, connecting to the actor,
8 | sending a message, and performing cleanup operations.
9 | """
10 | # CAP Platform
11 | ensemble = ComponentEnsemble()
12 | agent = GreeterAgent()
13 | ensemble.register(agent)
14 | ensemble.connect()
15 | greeter_link = ensemble.find_by_name("Greeter")
16 | greeter_link.send_txt_msg("Hello World!")
17 | ensemble.disconnect()
18 |
--------------------------------------------------------------------------------
/autogen/agentchat/contrib/capabilities/agent_capability.py:
--------------------------------------------------------------------------------
1 | from autogen.agentchat.assistant_agent import ConversableAgent
2 |
3 |
4 | class AgentCapability:
5 | """Base class for composable capabilities that can be added to an agent."""
6 |
7 | def __init__(self):
8 | pass
9 |
10 | def add_to_agent(self, agent: ConversableAgent):
11 | """
12 | Adds a particular capability to the given agent. Must be implemented by the capability subclass.
13 | An implementation will typically call agent.register_hook() one or more times. See teachability.py as an example.
14 | """
15 | raise NotImplementedError
16 |
--------------------------------------------------------------------------------
/samples/apps/cap/py/demo/RemoteAGDemo.py:
--------------------------------------------------------------------------------
1 | # Start Broker & Assistant
2 | # Start UserProxy - Let it run
3 |
4 |
5 | def remote_ag_demo():
6 | print("Remote Agent Demo")
7 | instructions = """
8 | In this demo, Assistant, and UserProxy are running in separate processes.
9 | demo/standalone/user_proxy.py will initiate a conversation by sending UserProxy Agent a message.
10 |
11 | Please do the following:
12 | 1) Start Assistant (python demo/standalone/assistant.py)
13 | 2) Start UserProxy (python demo/standalone/user_proxy.py)
14 | """
15 | print(instructions)
16 | input("Press Enter to return to demo menu...")
17 | pass
18 |
--------------------------------------------------------------------------------
/dotnet/website/articles/Create-an-agent.md:
--------------------------------------------------------------------------------
1 | ## AssistantAgent
2 |
3 | [`AssistantAgent`](../api/AutoGen.AssistantAgent.yml) is a built-in agent in `AutoGen` that acts as an AI assistant. It uses LLM to generate response to user input. It also supports function call if the underlying LLM model supports it (e.g. `gpt-3.5-turbo-0613`).
4 |
5 | ## Create an `AssistantAgent` using OpenAI model.
6 |
7 | [!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/CreateAnAgent.cs?name=code_snippet_1)]
8 |
9 | ## Create an `AssistantAgent` using Azure OpenAI model.
10 |
11 | [!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/CreateAnAgent.cs?name=code_snippet_2)]
12 |
--------------------------------------------------------------------------------
/dotnet/eng/MetaInfo.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 0.0.14
5 | AutoGen
6 | https://microsoft.github.io/autogen-for-net/
7 | https://github.com/microsoft/autogen
8 | git
9 | MIT
10 | false
11 |
12 |
--------------------------------------------------------------------------------
/dotnet/test/AutoGen.SourceGenerator.Tests/ApprovalTests/FunctionExample.Query_Test.approved.txt:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Query",
3 | "description": "query function",
4 | "parameters": {
5 | "type": "object",
6 | "properties": {
7 | "query": {
8 | "type": "string",
9 | "description": "query, required"
10 | },
11 | "k": {
12 | "type": "integer",
13 | "description": "top k, optional, default value is 3"
14 | },
15 | "thresold": {
16 | "type": "number",
17 | "description": "thresold, optional, default value is 0.5"
18 | }
19 | },
20 | "required": [
21 | "query"
22 | ]
23 | }
24 | }
--------------------------------------------------------------------------------
/website/docs/ecosystem/databricks.md:
--------------------------------------------------------------------------------
1 | # Databricks
2 |
3 | 
4 |
5 | The [Databricks Data Intelligence Platform ](https://www.databricks.com/product/data-intelligence-platform) allows your entire organization to use data and AI. It’s built on a lakehouse to provide an open, unified foundation for all data and governance, and is powered by a Data Intelligence Engine that understands the uniqueness of your data.
6 |
7 |
8 | This example demonstrates how to use AutoGen alongside Databricks Foundation Model APIs and open-source LLM DBRX.
9 |
10 | - [Databricks + AutoGen Code Examples](/docs/notebooks/agentchat_databricks_dbrx)
11 |
--------------------------------------------------------------------------------
/dotnet/sample/AutoGen.BasicSamples/CodeSnippet/UserProxyAgentCodeSnippet.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // UserProxyAgentCodeSnippet.cs
3 | using AutoGen.Core;
4 |
5 | namespace AutoGen.BasicSample.CodeSnippet;
6 |
7 | public class UserProxyAgentCodeSnippet
8 | {
9 | public async Task CodeSnippet1()
10 | {
11 | #region code_snippet_1
12 | // create a user proxy agent which always ask user for input
13 | var agent = new UserProxyAgent(
14 | name: "user",
15 | humanInputMode: HumanInputMode.ALWAYS);
16 |
17 | await agent.SendAsync("hello");
18 | #endregion code_snippet_1
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/dotnet/src/AutoGen.Mistral/AutoGen.Mistral.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 | AutoGen.Mistral
6 |
7 |
8 |
9 |
10 |
11 |
12 | AutoGen.Mistral
13 |
14 | Provide support for consuming Mistral model in AutoGen
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/dotnet/src/AutoGen.Anthropic/AutoGen.Anthropic.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 | AutoGen.Anthropic
6 |
7 |
8 |
9 |
10 |
11 |
12 | AutoGen.Anthropic
13 |
14 | Provide support for consuming Anthropic models in AutoGen
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/dotnet/src/AutoGen.OpenAI/AzureOpenAIConfig.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // AzureOpenAIConfig.cs
3 |
4 | namespace AutoGen.OpenAI;
5 |
6 | public class AzureOpenAIConfig : ILLMConfig
7 | {
8 | public AzureOpenAIConfig(string endpoint, string deploymentName, string apiKey, string? modelId = null)
9 | {
10 | this.Endpoint = endpoint;
11 | this.DeploymentName = deploymentName;
12 | this.ApiKey = apiKey;
13 | this.ModelId = modelId;
14 | }
15 |
16 | public string Endpoint { get; }
17 |
18 | public string DeploymentName { get; }
19 |
20 | public string ApiKey { get; }
21 |
22 | public string? ModelId { get; }
23 | }
24 |
--------------------------------------------------------------------------------
/samples/apps/websockets/setup.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 |
3 | # Equivalent to running the basj script below, but with an additional check if the files was moved:
4 | # cd ../../..
5 | # pip install -e .[websockets] fastapi uvicorn
6 |
7 | import subprocess
8 | from pathlib import Path
9 |
10 | repo_root = Path(__file__).parents[3]
11 | if not (repo_root / "setup.py").exists():
12 | raise RuntimeError("This script has been moved, please run it from its original location.")
13 |
14 | print("Installing the package in editable mode, with the websockets extra, and fastapi and uvicorn...", flush=True)
15 | subprocess.run(["pip", "install", "-e", ".[websockets]", "fastapi", "uvicorn"], cwd=repo_root, check=True)
16 |
--------------------------------------------------------------------------------
/test/twoagent.py:
--------------------------------------------------------------------------------
1 | from autogen import AssistantAgent, UserProxyAgent, config_list_from_json
2 |
3 | # Load LLM inference endpoints from an env variable or a file
4 | # See https://microsoft.github.io/autogen/docs/FAQ#set-your-api-endpoints
5 | # and OAI_CONFIG_LIST_sample
6 | config_list = config_list_from_json(env_or_file="OAI_CONFIG_LIST")
7 | assistant = AssistantAgent("assistant", llm_config={"config_list": config_list})
8 | user_proxy = UserProxyAgent(
9 | "user_proxy", code_execution_config={"work_dir": "coding", "use_docker": False}
10 | ) # IMPORTANT: set to True to run code in docker, recommended
11 | user_proxy.initiate_chat(assistant, message="Plot a chart of NVDA and TESLA stock price change YTD.")
12 |
--------------------------------------------------------------------------------
/website/docs/ecosystem/microsoft-fabric.md:
--------------------------------------------------------------------------------
1 | # Microsoft Fabric
2 |
3 | 
4 |
5 | [Microsoft Fabric](https://learn.microsoft.com/en-us/fabric/get-started/microsoft-fabric-overview) is an all-in-one analytics solution for enterprises that covers everything from data movement to data science, Real-Time Analytics, and business intelligence. It offers a comprehensive suite of services, including data lake, data engineering, and data integration, all in one place. In this notenook, we give a simple example for using AutoGen in Microsoft Fabric.
6 |
7 | - [Microsoft Fabric + AutoGen Code Examples](https://github.com/microsoft/autogen/blob/main/notebook/agentchat_microsoft_fabric.ipynb)
8 |
--------------------------------------------------------------------------------
/dotnet/src/AutoGen.Core/IGroupChat.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // IGroupChat.cs
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Threading;
7 | using System.Threading.Tasks;
8 |
9 | namespace AutoGen.Core;
10 |
11 | public interface IGroupChat
12 | {
13 | ///
14 | /// Send an introduction message to the group chat.
15 | ///
16 | void SendIntroduction(IMessage message);
17 |
18 | [Obsolete("please use SendIntroduction")]
19 | void AddInitializeMessage(IMessage message);
20 |
21 | Task> CallAsync(IEnumerable? conversation = null, int maxRound = 10, CancellationToken ct = default);
22 | }
23 |
--------------------------------------------------------------------------------
/dotnet/website/articles/OpenAIChatAgent-simple-chat.md:
--------------------------------------------------------------------------------
1 | The following example shows how to create an @AutoGen.OpenAI.OpenAIChatAgent and chat with it.
2 |
3 | Firsly, import the required namespaces:
4 | [!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/OpenAICodeSnippet.cs?name=using_statement)]
5 |
6 | Then, create an @AutoGen.OpenAI.OpenAIChatAgent and chat with it:
7 | [!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/OpenAICodeSnippet.cs?name=create_openai_chat_agent)]
8 |
9 | @AutoGen.OpenAI.OpenAIChatAgent also supports streaming chat via @AutoGen.Core.IAgent.GenerateStreamingReplyAsync*.
10 |
11 | [!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/OpenAICodeSnippet.cs?name=create_openai_chat_agent_streaming)]
--------------------------------------------------------------------------------
/samples/apps/autogen-studio/frontend/src/pages/index.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react";
2 | import Layout from "../components/layout";
3 | import { graphql } from "gatsby";
4 | import RAView from "../components/views/playground/ra";
5 |
6 | // markup
7 | const IndexPage = ({ data }: any) => {
8 | return (
9 |
10 |
11 |
12 |
13 |
14 | );
15 | };
16 |
17 | export const query = graphql`
18 | query HomePageQuery {
19 | site {
20 | siteMetadata {
21 | description
22 | title
23 | }
24 | }
25 | }
26 | `;
27 |
28 | export default IndexPage;
29 |
--------------------------------------------------------------------------------
/samples/apps/autogen-studio/frontend/src/pages/build.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react";
2 | import Layout from "../components/layout";
3 | import { graphql } from "gatsby";
4 | import BuildView from "../components/views/builder/build";
5 |
6 | // markup
7 | const IndexPage = ({ data }: any) => {
8 | return (
9 |
10 |
11 |
12 |
13 |
14 | );
15 | };
16 |
17 | export const query = graphql`
18 | query HomePageQuery {
19 | site {
20 | siteMetadata {
21 | description
22 | title
23 | }
24 | }
25 | }
26 | `;
27 |
28 | export default IndexPage;
29 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/autogenbench/res/Dockerfile:
--------------------------------------------------------------------------------
1 | # Host a jsPsych experiment in Azure
2 | FROM python:3.11
3 | MAINTAINER AutoGen
4 |
5 | # Upgrade pip
6 | RUN pip install --upgrade pip
7 |
8 | # Set the image to the Pacific Timezone
9 | RUN ln -snf /usr/share/zoneinfo/US/Pacific /etc/localtime && echo "US/Pacific" > /etc/timezone
10 |
11 | # Pre-load autogen dependencies, but not autogen itself since we'll often want to install the latest from source
12 | RUN pip install pyautogen[teachable,lmm,graphs,websurfer]
13 | RUN pip uninstall --yes pyautogen
14 |
15 | # Pre-load popular packages as per https://learnpython.com/blog/most-popular-python-packages/
16 | RUN pip install numpy pandas matplotlib seaborn scikit-learn requests urllib3 nltk pillow pytest
17 |
--------------------------------------------------------------------------------
/dotnet/src/AutoGen.Mistral/DTOs/Usage.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // Usage.cs
3 |
4 | using System.Text.Json.Serialization;
5 |
6 | namespace AutoGen.Mistral;
7 |
8 | public class Usage
9 | {
10 | [JsonPropertyName("prompt_tokens")]
11 | public int PromptTokens { get; set; }
12 |
13 | ///
14 | /// Gets or Sets CompletionTokens
15 | ///
16 | /// 93
17 | [JsonPropertyName("completion_tokens")]
18 | public int CompletionTokens { get; set; }
19 |
20 | ///
21 | /// Gets or Sets TotalTokens
22 | ///
23 | /// 107
24 | [JsonPropertyName("total_tokens")]
25 | public int TotalTokens { get; set; }
26 | }
27 |
--------------------------------------------------------------------------------
/dotnet/src/AutoGen.Ollama/AutoGen.Ollama.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 | AutoGen.Ollama
6 | True
7 |
8 |
9 |
10 |
11 |
12 |
13 | AutoGen.Ollama
14 |
15 | Provide support for Ollama server in AutoGen
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/azure-pipelines.yml:
--------------------------------------------------------------------------------
1 | # Starter pipeline
2 | # Start with a minimal pipeline that you can customize to build and deploy your code.
3 | # Add steps that build, run tests, deploy, and more:
4 | # https://aka.ms/yaml
5 |
6 | trigger:
7 | - main
8 |
9 | pool:
10 | vmImage: 'windows-latest'
11 |
12 | steps:
13 | - task: securedevelopmentteam.vss-secure-development-tools.build-task-policheck.PoliCheck@2
14 | displayName: 'Run PoliCheck'
15 | inputs:
16 | targetType: F
17 | optionsPE: '1|2|3|4'
18 |
19 | - task: securedevelopmentteam.vss-secure-development-tools.build-task-postanalysis.PostAnalysis@2
20 | displayName: 'Policheck Break Build'
21 | inputs:
22 | GdnBreakAllTools: false
23 | GdnBreakGdnToolPoliCheck: true
24 | GdnBreakGdnToolPoliCheckSeverity: Warning
25 |
--------------------------------------------------------------------------------
/dotnet/src/AutoGen.Core/Middleware/MiddlewareContext.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // MiddlewareContext.cs
3 |
4 | using System.Collections.Generic;
5 |
6 | namespace AutoGen.Core;
7 |
8 | public class MiddlewareContext
9 | {
10 | public MiddlewareContext(
11 | IEnumerable messages,
12 | GenerateReplyOptions? options)
13 | {
14 | this.Messages = messages;
15 | this.Options = options;
16 | }
17 |
18 | ///
19 | /// Messages to send to the agent
20 | ///
21 | public IEnumerable Messages { get; }
22 |
23 | ///
24 | /// Options to generate the reply
25 | ///
26 | public GenerateReplyOptions? Options { get; }
27 | }
28 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/AutoGPT/Challenges/12_url_shortener/custom_python/test_url_shorten.py:
--------------------------------------------------------------------------------
1 | import unittest
2 |
3 | from url_shortener import retrieve_url, shorten_url
4 |
5 |
6 | class TestURLShortener(unittest.TestCase):
7 | def test_url_retrieval(self):
8 | # Shorten the URL to get its shortened form
9 | shortened_url = shorten_url("https://www.example.com")
10 |
11 | # Retrieve the original URL using the shortened URL directly
12 | retrieved_url = retrieve_url(shortened_url)
13 |
14 | self.assertEqual(
15 | retrieved_url,
16 | "https://www.example.com",
17 | "Retrieved URL does not match the original!",
18 | )
19 |
20 |
21 | if __name__ == "__main__":
22 | unittest.main()
23 |
--------------------------------------------------------------------------------
/dotnet/src/AutoGen.LMStudio/AutoGen.LMStudio.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 | AutoGen.LMStudio
6 |
7 |
8 |
9 |
10 |
11 |
12 | AutoGen.LMStudio
13 |
14 | Provide support for consuming LMStudio openai-like API service in AutoGen
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/dotnet/src/AutoGen.LMStudio/LMStudioConfig.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // LMStudioConfig.cs
3 |
4 | using System;
5 |
6 | ///
7 | /// Add support for consuming openai-like API from LM Studio
8 | ///
9 | public class LMStudioConfig : ILLMConfig
10 | {
11 | public LMStudioConfig(string host, int port)
12 | {
13 | this.Host = host;
14 | this.Port = port;
15 | this.Uri = new Uri($"http://{host}:{port}");
16 | }
17 |
18 | public LMStudioConfig(Uri uri)
19 | {
20 | this.Uri = uri;
21 | this.Host = uri.Host;
22 | this.Port = uri.Port;
23 | }
24 |
25 | public string Host { get; }
26 |
27 | public int Port { get; }
28 |
29 | public Uri Uri { get; }
30 | }
31 |
--------------------------------------------------------------------------------
/dotnet/src/AutoGen.OpenAI/AutoGen.OpenAI.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | netstandard2.0
4 | AutoGen.OpenAI
5 |
6 |
7 |
8 |
9 |
10 |
11 | AutoGen.OpenAI
12 |
13 | OpenAI Intergration for AutoGen.
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/.devcontainer/devcontainer.json:
--------------------------------------------------------------------------------
1 | {
2 | "customizations": {
3 | "vscode": {
4 | "extensions": [
5 | "ms-python.python",
6 | "ms-toolsai.jupyter",
7 | "visualstudioexptteam.vscodeintellicode",
8 | "GitHub.copilot"
9 | ],
10 | "settings": {
11 | "terminal.integrated.profiles.linux": {
12 | "bash": {
13 | "path": "/bin/bash"
14 | }
15 | },
16 | "terminal.integrated.defaultProfile.linux": "bash"
17 | }
18 | }
19 | },
20 | "dockerFile": "Dockerfile",
21 | "updateContentCommand": "pip install -e . pre-commit && pre-commit install"
22 | }
23 |
--------------------------------------------------------------------------------
/samples/apps/cap/py/autogencap/ag_adapter/agent.py:
--------------------------------------------------------------------------------
1 | import time
2 |
3 | from autogen import ConversableAgent
4 |
5 | from ..DebugLog import Info, Warn
6 | from .CAP2AG import CAP2AG
7 |
8 |
9 | class Agent:
10 | def __init__(self, agent: ConversableAgent, counter_party_name="user_proxy", init_chat=False):
11 | self._agent = agent
12 | self._the_other_name = counter_party_name
13 | self._agent_adptr = CAP2AG(
14 | ag_agent=self._agent, the_other_name=self._the_other_name, init_chat=init_chat, self_recursive=True
15 | )
16 |
17 | def register(self, network):
18 | Info("Agent", f"Running Standalone {self._agent.name}")
19 | network.register(self._agent_adptr)
20 |
21 | def running(self):
22 | return self._agent_adptr.run
23 |
--------------------------------------------------------------------------------
/dotnet/src/AutoGen.Mistral/DTOs/FunctionDefinition.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // FunctionDefinition.cs
3 |
4 | using System.Text.Json.Serialization;
5 | using Json.Schema;
6 |
7 | namespace AutoGen.Mistral;
8 |
9 | public class FunctionDefinition
10 | {
11 | public FunctionDefinition(string name, string description, JsonSchema? parameters = default)
12 | {
13 | Name = name;
14 | Description = description;
15 | Parameters = parameters;
16 | }
17 |
18 | [JsonPropertyName("name")]
19 | public string Name { get; set; }
20 |
21 | [JsonPropertyName("description")]
22 | public string Description { get; set; }
23 |
24 | [JsonPropertyName("parameters")]
25 | public JsonSchema? Parameters { get; set; }
26 | }
27 |
--------------------------------------------------------------------------------
/autogen/oai/__init__.py:
--------------------------------------------------------------------------------
1 | from autogen.cache.cache import Cache
2 | from autogen.oai.client import ModelClient, OpenAIWrapper
3 | from autogen.oai.completion import ChatCompletion, Completion
4 | from autogen.oai.openai_utils import (
5 | config_list_from_dotenv,
6 | config_list_from_json,
7 | config_list_from_models,
8 | config_list_gpt4_gpt35,
9 | config_list_openai_aoai,
10 | filter_config,
11 | get_config_list,
12 | )
13 |
14 | __all__ = [
15 | "OpenAIWrapper",
16 | "ModelClient",
17 | "Completion",
18 | "ChatCompletion",
19 | "get_config_list",
20 | "config_list_gpt4_gpt35",
21 | "config_list_openai_aoai",
22 | "config_list_from_models",
23 | "config_list_from_json",
24 | "config_list_from_dotenv",
25 | "filter_config",
26 | "Cache",
27 | ]
28 |
--------------------------------------------------------------------------------
/dotnet/src/AutoGen.Core/Middleware/IMiddleware.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // IMiddleware.cs
3 |
4 | using System.Threading;
5 | using System.Threading.Tasks;
6 |
7 | namespace AutoGen.Core;
8 |
9 | ///
10 | /// The middleware interface. For streaming-version middleware, check .
11 | ///
12 | public interface IMiddleware
13 | {
14 | ///
15 | /// the name of the middleware
16 | ///
17 | public string? Name { get; }
18 |
19 | ///
20 | /// The method to invoke the middleware
21 | ///
22 | public Task InvokeAsync(
23 | MiddlewareContext context,
24 | IAgent agent,
25 | CancellationToken cancellationToken = default);
26 | }
27 |
--------------------------------------------------------------------------------
/samples/apps/autogen-studio/frontend/src/pages/gallery/index.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react";
2 | import { graphql } from "gatsby";
3 | import Layout from "../../components/layout";
4 | import GalleryView from "../../components/views/gallery/gallery";
5 |
6 | // markup
7 | const GalleryPage = ({ location, data }: any) => {
8 | return (
9 |
10 |
11 |
12 |
13 |
14 | );
15 | };
16 |
17 | export const query = graphql`
18 | query HomePageQuery {
19 | site {
20 | siteMetadata {
21 | description
22 | title
23 | }
24 | }
25 | }
26 | `;
27 |
28 | export default GalleryPage;
29 |
--------------------------------------------------------------------------------
/dotnet/nuget/NUGET.md:
--------------------------------------------------------------------------------
1 | ### About AutoGen for .NET
2 | `AutoGen for .NET` is the official .NET SDK for [AutoGen](https://github.com/microsoft/autogen). It enables you to create LLM agents and construct multi-agent workflows with ease. It also provides integration with popular platforms like OpenAI, Semantic Kernel, and LM Studio.
3 |
4 | ### Gettings started
5 | - Find documents and examples on our [document site](https://microsoft.github.io/autogen-for-net/)
6 | - Join our [Discord channel](https://discord.gg/pAbnFJrkgZ) to get help and discuss with the community
7 | - Report a bug or request a feature by creating a new issue in our [github repo](https://github.com/microsoft/autogen)
8 | - Consume the nightly build package from one of the [nightly build feeds](https://microsoft.github.io/autogen-for-net/articles/Installation.html#nighly-build)
--------------------------------------------------------------------------------
/dotnet/website/articles/AutoGen.SemanticKernel/SemanticKernelAgent-simple-chat.md:
--------------------------------------------------------------------------------
1 | You can chat with @AutoGen.SemanticKernel.SemanticKernelAgent using both streaming and non-streaming methods and use native `ChatMessageContent` type via `IMessage`.
2 |
3 | The following example shows how to create an @AutoGen.SemanticKernel.SemanticKernelAgent and chat with it using non-streaming method:
4 |
5 | [!code-csharp[](../../../sample/AutoGen.BasicSamples/CodeSnippet/SemanticKernelCodeSnippet.cs?name=create_semantic_kernel_agent)]
6 |
7 | @AutoGen.SemanticKernel.SemanticKernelAgent also supports streaming chat via @AutoGen.Core.IStreamingAgent.GenerateStreamingReplyAsync*.
8 |
9 | [!code-csharp[](../../../sample/AutoGen.BasicSamples/CodeSnippet/SemanticKernelCodeSnippet.cs?name=create_semantic_kernel_agent_streaming)]
10 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/Examples/Tasks/default_two_agents.jsonl:
--------------------------------------------------------------------------------
1 | { "id": "nvda_tsla_stocks", "template": "../Templates/TwoAgents", "substitutions": { "scenario.py": { "__PROMPT__": "Plot and save to disk a chart of NVDA and TESLA stock price YTD." } } }
2 | { "id": "arxiv_search", "template": "../Templates/TwoAgents", "substitutions": { "scenario.py": { "__PROMPT__": "Find 10 papers on explainable or interpretable AI that were submitted to arXiv within the last year. When printing results, include paper titles, authors, dates, and URLs, but not their abstracts." } } }
3 | { "id": "old_mslogo_search", "template": "../Templates/TwoAgents", "substitutions": { "scenario.py": { "__PROMPT__": "Find Microsoft's logo from 1983, and save it to disk. If searching the web, use Bing with API key stored in os.environ['BING_API_KEY']" } } }
4 |
--------------------------------------------------------------------------------
/website/src/components/NotebookUtils.js:
--------------------------------------------------------------------------------
1 | function findAllNotebooks() {
2 | const notebooks = [];
3 | const context = require.context("../../docs/notebooks", true, /\.mdx$/);
4 | context.keys().forEach((key) => {
5 | const notebook = context(key);
6 | // Remove .mdx extension from the key.
7 | key = key.slice(0, -4);
8 |
9 | notebooks.push({
10 | title: notebook.frontMatter.title,
11 | link: "/autogen/docs/notebooks/" + key,
12 | description: notebook.frontMatter.description,
13 | image: notebook.frontMatter.image,
14 | tags: notebook.frontMatter.tags,
15 | source: notebook.frontMatter.source_notebook
16 | });
17 | });
18 | return notebooks;
19 | }
20 |
21 | export {
22 | findAllNotebooks
23 | };
24 |
--------------------------------------------------------------------------------
/autogen/logger/logger_factory.py:
--------------------------------------------------------------------------------
1 | from typing import Any, Dict, Literal, Optional
2 |
3 | from autogen.logger.base_logger import BaseLogger
4 | from autogen.logger.file_logger import FileLogger
5 | from autogen.logger.sqlite_logger import SqliteLogger
6 |
7 | __all__ = ("LoggerFactory",)
8 |
9 |
10 | class LoggerFactory:
11 | @staticmethod
12 | def get_logger(
13 | logger_type: Literal["sqlite", "file"] = "sqlite", config: Optional[Dict[str, Any]] = None
14 | ) -> BaseLogger:
15 | if config is None:
16 | config = {}
17 |
18 | if logger_type == "sqlite":
19 | return SqliteLogger(config)
20 | elif logger_type == "file":
21 | return FileLogger(config)
22 | else:
23 | raise ValueError(f"[logger_factory] Unknown logger type: {logger_type}")
24 |
--------------------------------------------------------------------------------
/samples/apps/autogen-studio/autogenstudio/database/migrations/script.py.mako:
--------------------------------------------------------------------------------
1 | """${message}
2 |
3 | Revision ID: ${up_revision}
4 | Revises: ${down_revision | comma,n}
5 | Create Date: ${create_date}
6 |
7 | """
8 | from typing import Sequence, Union
9 |
10 | from alembic import op
11 | import sqlalchemy as sa
12 | import sqlmodel
13 | ${imports if imports else ""}
14 |
15 | # revision identifiers, used by Alembic.
16 | revision: str = ${repr(up_revision)}
17 | down_revision: Union[str, None] = ${repr(down_revision)}
18 | branch_labels: Union[str, Sequence[str], None] = ${repr(branch_labels)}
19 | depends_on: Union[str, Sequence[str], None] = ${repr(depends_on)}
20 |
21 |
22 | def upgrade() -> None:
23 | ${upgrades if upgrades else "pass"}
24 |
25 |
26 | def downgrade() -> None:
27 | ${downgrades if downgrades else "pass"}
28 |
--------------------------------------------------------------------------------
/dotnet/src/AutoGen.Core/Middleware/IStreamingMiddleware.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // IStreamingMiddleware.cs
3 |
4 | using System.Collections.Generic;
5 | using System.Threading;
6 |
7 | namespace AutoGen.Core;
8 |
9 | ///
10 | /// The streaming middleware interface. For non-streaming version middleware, check .
11 | ///
12 | public interface IStreamingMiddleware : IMiddleware
13 | {
14 | ///
15 | /// The streaming version of .
16 | ///
17 | public IAsyncEnumerable InvokeAsync(
18 | MiddlewareContext context,
19 | IStreamingAgent agent,
20 | CancellationToken cancellationToken = default);
21 | }
22 |
--------------------------------------------------------------------------------
/samples/apps/cap/py/autogencap/proto/Autogen.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | // Get protoc here https://github.com/protocolbuffers/protobuf/releases
4 | // .\protoc --python_out=. --pyi_out=. Autogen.proto
5 |
6 | message DataMap {
7 | map data = 1;
8 | }
9 |
10 | message ReceiveReq {
11 | oneof Type {
12 | DataMap data_map = 1;
13 | string data = 2;
14 | }
15 | optional string sender = 3;
16 | optional bool request_reply = 4;
17 | optional bool silent = 5;
18 | }
19 |
20 | message Terminate {
21 | optional string sender = 1;
22 | }
23 |
24 | message GenReplyReq {
25 | }
26 |
27 | message GenReplyResp {
28 | optional string data = 1;
29 | }
30 |
31 | message PrepChat {
32 | string recipient = 1;
33 | bool clear_history = 2;
34 | bool prepare_recipient = 3;
35 | }
36 |
--------------------------------------------------------------------------------
/.devcontainer/studio/devcontainer.json:
--------------------------------------------------------------------------------
1 | {
2 | "customizations": {
3 | "vscode": {
4 | "extensions": [
5 | "ms-python.python",
6 | "ms-toolsai.jupyter",
7 | "visualstudioexptteam.vscodeintellicode"
8 | ],
9 | "settings": {
10 | "terminal.integrated.profiles.linux": {
11 | "bash": {
12 | "path": "/bin/bash"
13 | }
14 | },
15 | "terminal.integrated.defaultProfile.linux": "bash"
16 | }
17 | }
18 | },
19 | "dockerFile": "Dockerfile",
20 | "updateContentCommand": "cd samples/apps/autogen-studio && pip install -e . && sudo npm install -g gatsby-cli && cd frontend && yarn install && yarn build"
21 | }
22 |
--------------------------------------------------------------------------------
/samples/apps/cap/TODO.md:
--------------------------------------------------------------------------------
1 | - ~~Pretty print debug_logs~~
2 | - ~~colors~~
3 | - ~~messages to oai should be condensed~~
4 | - ~~remove orchestrator in scenario 4 and have the two actors talk to each other~~
5 | - ~~pass a complex multi-part message~~
6 | - ~~protobuf for messages~~
7 | - ~~make changes to autogen to enable scenario 3 to work with CAN~~
8 | - ~~make groupchat work~~
9 | - ~~actors instead of agents~~
10 | - clean up for PR into autogen
11 | - ~~Create folder structure under Autogen examples~~
12 | - ~~CAN -> CAP (Composable Actor Protocol)~~
13 | - CAP actor lookup should use zmq
14 | - Add min C# actors & reorganize
15 | - Hybrid GroupChat with C# ProductManager
16 | - C++ Msg Layer
17 | - Rust Msg Layer
18 | - Node Msg Layer
19 | - Java Msg Layer
20 | - Investigate a standard logging framework that supports color in windows
21 | - structlog?
22 |
--------------------------------------------------------------------------------
/dotnet/website/articles/OpenAIChatAgent-support-more-messages.md:
--------------------------------------------------------------------------------
1 | By default, @AutoGen.OpenAI.OpenAIChatAgent only supports the @AutoGen.Core.IMessage type where `T` is original request or response message from `Azure.AI.OpenAI`. To support more AutoGen built-in message types like @AutoGen.Core.TextMessage, @AutoGen.Core.ImageMessage, @AutoGen.Core.MultiModalMessage and so on, you can register the agent with @AutoGen.OpenAI.OpenAIChatRequestMessageConnector. The @AutoGen.OpenAI.OpenAIChatRequestMessageConnector will convert the message from AutoGen built-in message types to `Azure.AI.OpenAI.ChatRequestMessage` and vice versa.
2 |
3 | import the required namespaces:
4 | [!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/OpenAICodeSnippet.cs?name=using_statement)]
5 |
6 | [!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/OpenAICodeSnippet.cs?name=register_openai_chat_message_connector)]
--------------------------------------------------------------------------------
/website/static/js/custom.js:
--------------------------------------------------------------------------------
1 | const fixColorContrast = (selector, color) => {
2 | const elements = document.querySelectorAll(selector);
3 | if (elements.length > 0) {
4 | elements.forEach(element => {
5 | element.style.color = color;
6 | });
7 | }
8 | }
9 |
10 | const observer = new MutationObserver(() => {
11 | const hashLinks = document.querySelectorAll('.hash-link[title="Direct link to heading"]');
12 | if (hashLinks.length > 0) {
13 | hashLinks.forEach(link => {
14 | link.setAttribute('tabindex', '-1');
15 | });
16 | }
17 |
18 | fixColorContrast('.token.comment', '#8a93c8')
19 | fixColorContrast('.token.boolean', '#ff5c79')
20 | fixColorContrast('blockquote a', '#0d55b4')
21 | fixColorContrast('.ant-select-selection-placeholder', '#747474')
22 | });
23 |
24 | observer.observe(document, {
25 | childList: true,
26 | subtree: true
27 | });
28 |
--------------------------------------------------------------------------------
/.github/workflows/type-check.yml:
--------------------------------------------------------------------------------
1 | name: Type check
2 | # see: https://help.github.com/en/actions/reference/events-that-trigger-workflows
3 | on: # Trigger the workflow on pull request or merge
4 | pull_request:
5 | merge_group:
6 | types: [checks_requested]
7 | defaults:
8 | run:
9 | shell: bash
10 | permissions: {}
11 | jobs:
12 | type-check:
13 | strategy:
14 | fail-fast: true
15 | matrix:
16 | version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
17 | runs-on: ubuntu-latest
18 | steps:
19 | - uses: actions/checkout@v4
20 | - uses: actions/setup-python@v5
21 | with:
22 | python-version: ${{ matrix.version }}
23 | # All additional modules should be defined in setup.py
24 | - run: pip install ".[types]"
25 | # Any additional configuration should be defined in pyproject.toml
26 | - run: |
27 | mypy
28 |
--------------------------------------------------------------------------------
/autogen/coding/jupyter/base.py:
--------------------------------------------------------------------------------
1 | from dataclasses import dataclass
2 | from typing import Optional, Protocol, runtime_checkable
3 |
4 |
5 | @dataclass
6 | class JupyterConnectionInfo:
7 | """(Experimental)"""
8 |
9 | host: str
10 | """`str` - Host of the Jupyter gateway server"""
11 | use_https: bool
12 | """`bool` - Whether to use HTTPS"""
13 | port: Optional[int] = None
14 | """`Optional[int]` - Port of the Jupyter gateway server. If None, the default port is used"""
15 | token: Optional[str] = None
16 | """`Optional[str]` - Token for authentication. If None, no token is used"""
17 |
18 |
19 | @runtime_checkable
20 | class JupyterConnectable(Protocol):
21 | """(Experimental)"""
22 |
23 | @property
24 | def connection_info(self) -> JupyterConnectionInfo:
25 | """Return the connection information for this connectable."""
26 | pass
27 |
--------------------------------------------------------------------------------
/dotnet/src/AutoGen.Core/AutoGen.Core.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | netstandard2.0
4 | AutoGen.Core
5 |
6 |
7 |
8 |
9 |
10 |
11 | AutoGen.Core
12 |
13 | Core library for AutoGen. This package provides contracts and core functionalities for AutoGen.
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/dotnet/eng/Sign.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | all
10 | runtime; build; native; contentfiles; analyzers
11 |
12 |
13 |
14 | Microsoft400
15 |
16 |
17 |
18 |
19 | NuGet
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/dotnet/test/AutoGen.Tests/Attribute/OpenAIFact.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // OpenAIFact.cs
3 |
4 | using System;
5 | using System.Linq;
6 |
7 | namespace AutoGen.Tests
8 | {
9 | ///
10 | /// A fact for tests requiring OPENAI_API_KEY env.
11 | ///
12 | public sealed class ApiKeyFactAttribute : EnvironmentSpecificFactAttribute
13 | {
14 | private readonly string[] _envVariableNames;
15 | public ApiKeyFactAttribute(params string[] envVariableNames) : base($"{envVariableNames} is not found in env")
16 | {
17 | _envVariableNames = envVariableNames;
18 | }
19 |
20 | ///
21 | protected override bool IsEnvironmentSupported()
22 | {
23 | return _envVariableNames.All(Environment.GetEnvironmentVariables().Contains);
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/website/.gitignore:
--------------------------------------------------------------------------------
1 | # Dependencies
2 | /node_modules
3 | package-lock.json
4 |
5 | # Production
6 | /build
7 |
8 | # Generated files
9 | .docusaurus
10 | .cache-loader
11 | docs/reference
12 | /docs/notebooks
13 |
14 | docs/tutorial/*.mdx
15 | docs/tutorial/**/*.png
16 | !docs/tutorial/assets/*.png
17 | docs/topics/llm_configuration.mdx
18 | docs/topics/code-execution/*.mdx
19 | docs/topics/task_decomposition.mdx
20 | docs/topics/prompting-and-reasoning/*.mdx
21 | docs/topics/non-openai-models/*.mdx
22 | docs/topics/non-openai-models/**/*.py
23 | docs/topics/non-openai-models/**/*.svg
24 | docs/topics/code-execution/*.mdx
25 | docs/topics/groupchat/customized_speaker_selection.mdx
26 | cell-*-output-*.png
27 |
28 | # Misc
29 | .DS_Store
30 | .env.local
31 | .env.development.local
32 | .env.test.local
33 | .env.production.local
34 |
35 | npm-debug.log*
36 | yarn-debug.log*
37 | yarn-error.log*
38 |
39 | /.quarto/
40 |
--------------------------------------------------------------------------------
/website/docs/ecosystem/promptflow.md:
--------------------------------------------------------------------------------
1 | # Promptflow
2 |
3 | Promptflow is a comprehensive suite of tools that simplifies the development, testing, evaluation, and deployment of LLM based AI applications. It also supports integration with Azure AI for cloud-based operations and is designed to streamline end-to-end development.
4 |
5 | Refer to [Promptflow docs](https://microsoft.github.io/promptflow/) for more information.
6 |
7 | Quick links:
8 |
9 | - Why use Promptflow - [Link](https://learn.microsoft.com/en-us/azure/machine-learning/prompt-flow/overview-what-is-prompt-flow)
10 | - Quick start guide - [Link](https://microsoft.github.io/promptflow/how-to-guides/quick-start.html)
11 | - Sample application for Promptflow + AutoGen integration - [Link](https://github.com/microsoft/autogen/tree/main/samples/apps/promptflow-autogen)
12 |
13 | ## Sample Flow
14 |
15 | 
16 |
--------------------------------------------------------------------------------
/dotnet/sample/AutoGen.SemanticKernel.Sample/AutoGen.SemanticKernel.Sample.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | $(TestTargetFramework)
6 | True
7 | $(NoWarn);CS8981;CS8600;CS8602;CS8604;CS8618;CS0219;SKEXP0054;SKEXP0050;SKEXP0110
8 | enable
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ## Why are these changes needed?
6 |
7 |
8 |
9 | ## Related issue number
10 |
11 |
12 |
13 | ## Checks
14 |
15 | - [ ] I've included any doc changes needed for https://microsoft.github.io/autogen/. See https://microsoft.github.io/autogen/docs/Contribute#documentation to build and test documentation locally.
16 | - [ ] I've added tests (if relevant) corresponding to the changes introduced in this PR.
17 | - [ ] I've made sure all auto checks have passed.
18 |
--------------------------------------------------------------------------------
/dotnet/sample/AutoGen.Anthropic.Samples/AutoGen.Anthropic.Samples.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | $(TestTargetFramework)
6 | enable
7 | enable
8 | True
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/GAIA/MANIFEST.json:
--------------------------------------------------------------------------------
1 | {
2 | "files": {
3 | "README.md": "README.md",
4 | "Scripts/init_tasks.py": "Scripts/init_tasks.py",
5 | "Scripts/custom_tabulate.py": "Scripts/custom_tabulate.py",
6 | "Templates/BasicTwoAgents/expected_answer.txt": "Templates/BasicTwoAgents/expected_answer.txt",
7 | "Templates/BasicTwoAgents/prompt.txt": "Templates/BasicTwoAgents/prompt.txt",
8 | "Templates/BasicTwoAgents/scenario.py": "Templates/BasicTwoAgents/scenario.py",
9 | "Templates/SocietyOfMind/expected_answer.txt": "Templates/SocietyOfMind/expected_answer.txt",
10 | "Templates/SocietyOfMind/prompt.txt": "Templates/SocietyOfMind/prompt.txt",
11 | "Templates/SocietyOfMind/scenario.py": "Templates/SocietyOfMind/scenario.py",
12 | "Templates/SocietyOfMind/requirements.txt": "Templates/SocietyOfMind/requirements.txt"
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/MATH/Scripts/custom_tabulate.py:
--------------------------------------------------------------------------------
1 | import json
2 | import os
3 | import sys
4 |
5 | from autogenbench.tabulate_cmd import default_tabulate
6 |
7 |
8 | def scorer(instance_dir):
9 | checker_messages = os.path.join(instance_dir, "checker_messages.json")
10 | if os.path.isfile(checker_messages):
11 | with open(checker_messages, "rt") as fh:
12 | messages = json.loads(fh.read())["checker_proxy"]
13 | results = messages[-1]["content"].lower()
14 | if "the answer is correct" in results or "the answer is approximated but should be correct" in results:
15 | return True
16 | else:
17 | return False
18 | else:
19 | return None
20 |
21 |
22 | def main(args):
23 | default_tabulate(args, scorer=scorer)
24 |
25 |
26 | if __name__ == "__main__" and __package__ is None:
27 | main(sys.argv)
28 |
--------------------------------------------------------------------------------
/dotnet/src/AutoGen.Core/Agent/DefaultReplyAgent.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // DefaultReplyAgent.cs
3 |
4 | using System.Collections.Generic;
5 | using System.Threading;
6 | using System.Threading.Tasks;
7 |
8 | namespace AutoGen.Core;
9 |
10 | public class DefaultReplyAgent : IAgent
11 | {
12 | public DefaultReplyAgent(
13 | string name,
14 | string? defaultReply)
15 | {
16 | Name = name;
17 | DefaultReply = defaultReply ?? string.Empty;
18 | }
19 |
20 | public string Name { get; }
21 |
22 | public string DefaultReply { get; } = string.Empty;
23 |
24 | public async Task GenerateReplyAsync(
25 | IEnumerable _,
26 | GenerateReplyOptions? __ = null,
27 | CancellationToken ___ = default)
28 | {
29 | return new TextMessage(Role.Assistant, DefaultReply, from: this.Name);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/dotnet/test/AutoGen.AotCompatibility.Tests/AutoGen.AotCompatibility.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | net8.0
6 | enable
7 | enable
8 | true
9 | true
10 | True
11 | true
12 | true
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/samples/apps/promptflow-autogen/flow.dag.yaml:
--------------------------------------------------------------------------------
1 | $schema: https://azuremlschemas.azureedge.net/promptflow/latest/Flow.schema.json
2 | environment:
3 | python_requirements_txt: requirements.txt
4 | inputs:
5 | chat_history:
6 | type: list
7 | is_chat_history: true
8 | default: []
9 | question:
10 | type: string
11 | is_chat_input: true
12 | default: Write a concise but engaging blogpost about programming language python
13 | autogen_workflow_id:
14 | type: int
15 | default: 2
16 | outputs:
17 | answer:
18 | type: string
19 | reference: ${autogen_task.output}
20 | is_chat_output: true
21 | nodes:
22 | - name: autogen_task
23 | type: python
24 | source:
25 | type: code
26 | path: autogen_task.py
27 | inputs:
28 | redisConnection: redis_connection_url
29 | azureOpenAiConnection: aoai-connection
30 | question: ${inputs.question}
31 | autogen_workflow_id: ${inputs.autogen_workflow_id}
32 |
--------------------------------------------------------------------------------
/website/build_website.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # This script generates documentation using pydoc-markdown and renders the website using Quarto.
4 | #
5 |
6 | missing_deps=false
7 |
8 | #
9 | # Check for missing dependencies, report them, and exit when building the
10 | # website is likely to fail.
11 | #
12 | for dependency in node pydoc-markdown quarto python yarn npm
13 | do
14 | if ! command -v "$dependency" &> /dev/null
15 | then
16 | echo "Command '$dependency' not found."
17 | missing_deps=true
18 | fi
19 | done
20 |
21 | if [ "$missing_deps" = true ]
22 | then
23 | echo -e "\nSome of the dependencies are missing."
24 | echo "Please install them to build the website."
25 | exit 1
26 | fi
27 |
28 | # Generate documentation using pydoc-markdown
29 | pydoc-markdown
30 |
31 | # Process notebooks using a Python script
32 | python ./process_notebooks.py render
33 |
34 | # Start the website using yarn
35 | yarn start
36 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/AutoGPT/Challenges/10_password_generator/custom_python/test_pwd.py:
--------------------------------------------------------------------------------
1 | import unittest
2 |
3 | import password_generator
4 |
5 |
6 | class TestPasswordGenerator(unittest.TestCase):
7 | def test_password_length(self):
8 | for i in range(8, 17):
9 | password = password_generator.generate_password(i)
10 | self.assertEqual(len(password), i)
11 |
12 | def test_value_error(self):
13 | with self.assertRaises(ValueError):
14 | password_generator.generate_password(7)
15 | with self.assertRaises(ValueError):
16 | password_generator.generate_password(17)
17 |
18 | def test_password_content(self):
19 | password = password_generator.generate_password()
20 | self.assertTrue(any(c.isdigit() for c in password))
21 | self.assertTrue(any(c in password_generator.string.punctuation for c in password))
22 |
23 |
24 | if __name__ == "__main__":
25 | unittest.main()
26 |
--------------------------------------------------------------------------------
/website/static/img/fast.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/.github/workflows/pre-commit.yml:
--------------------------------------------------------------------------------
1 | name: Code formatting
2 |
3 | # see: https://help.github.com/en/actions/reference/events-that-trigger-workflows
4 | on: # Trigger the workflow on pull request or merge
5 | pull_request:
6 | merge_group:
7 | types: [checks_requested]
8 |
9 | defaults:
10 | run:
11 | shell: bash
12 | permissions: {}
13 | # actions: read
14 | # checks: read
15 | # contents: read
16 | # deployments: read
17 | jobs:
18 |
19 | pre-commit-check:
20 | runs-on: ubuntu-latest
21 | env:
22 | SKIP: "mypy"
23 | steps:
24 | - uses: actions/checkout@v4
25 | - uses: actions/setup-python@v5
26 | - name: Set $PY environment variable
27 | run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
28 | - uses: actions/cache@v4
29 | with:
30 | path: ~/.cache/pre-commit
31 | key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
32 | - uses: pre-commit/action@v3.0.1
33 |
--------------------------------------------------------------------------------
/dotnet/website/articles/Group-chat-overview.md:
--------------------------------------------------------------------------------
1 | @AutoGen.Core.IGroupChat is a fundamental feature in AutoGen. It provides a way to organize multiple agents under the same context and work together to resolve a given task.
2 |
3 | In AutoGen, there are two types of group chat:
4 | - @AutoGen.Core.RoundRobinGroupChat : This group chat runs agents in a round-robin sequence. The chat history plus the most recent reply from the previous agent will be passed to the next agent.
5 | - @AutoGen.Core.GroupChat : This group chat provides a more dynamic yet controlable way to determine the next speaker agent. You can either use a llm agent as group admin, or use a @AutoGen.Core.Graph, which is introduced by [this PR](https://github.com/microsoft/autogen/pull/1761), or both to determine the next speaker agent.
6 |
7 | > [!NOTE]
8 | > In @AutoGen.Core.GroupChat, when only the group admin is used to determine the next speaker agent, it's recommented to use a more powerful llm model, such as `gpt-4` to ensure the best experience.
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/AutoGPT/Challenges/4_qa_csv/data.json:
--------------------------------------------------------------------------------
1 | {
2 | "category": [
3 | "data"
4 | ],
5 | "cutoff": 90,
6 | "dependencies": [
7 | "TestAnswerQuestionSmallCsv"
8 | ],
9 | "eval_id": "bb6e0a4b-7faf-4aa6-a524-548cddbc2732",
10 | "ground": {
11 | "answer": "The correct amount spent on utilities.",
12 | "eval": {
13 | "type": "file"
14 | },
15 | "files": [
16 | "output.txt"
17 | ],
18 | "should_contain": [
19 | "1861"
20 | ]
21 | },
22 | "info": {
23 | "description": "Tests if the agent can answer a question from a csv",
24 | "difficulty": "intermediate",
25 | "side_effects": [
26 | ""
27 | ]
28 | },
29 | "name": "AnswerQuestionCsv",
30 | "task": "Read and analyze 'file1.txt', then answer the question: How much was spent on utilities in total? Write the answer in 'output.txt'."
31 | }
32 |
--------------------------------------------------------------------------------
/dotnet/test/AutoGen.SemanticKernel.Tests/ApprovalTests/KernelFunctionExtensionTests.ItCreateFunctionContractsFromMethod.approved.txt:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "Name": "_ItCreateFunctionContractsFromMethod_b__2_0",
4 | "Description": "",
5 | "Parameters": [],
6 | "ReturnType": "System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e",
7 | "ReturnDescription": ""
8 | },
9 | {
10 | "Name": "_ItCreateFunctionContractsFromMethod_b__2_1",
11 | "Description": "",
12 | "Parameters": [
13 | {
14 | "Name": "message",
15 | "Description": "",
16 | "ParameterType": "System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e",
17 | "IsRequired": true,
18 | "DefaultValue": ""
19 | }
20 | ],
21 | "ReturnType": "System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e",
22 | "ReturnDescription": ""
23 | }
24 | ]
--------------------------------------------------------------------------------
/samples/simple_chat.py:
--------------------------------------------------------------------------------
1 | from autogen import ConversableAgent, UserProxyAgent, config_list_from_json
2 |
3 |
4 | def main():
5 | # Load LLM inference endpoints from an env variable or a file
6 | # See https://microsoft.github.io/autogen/docs/FAQ#set-your-api-endpoints
7 | # and OAI_CONFIG_LIST_sample.
8 | # For example, if you have created a OAI_CONFIG_LIST file in the current working directory, that file will be used.
9 | config_list = config_list_from_json(env_or_file="OAI_CONFIG_LIST")
10 |
11 | # Create the agent that uses the LLM.
12 | assistant = ConversableAgent("agent", llm_config={"config_list": config_list})
13 |
14 | # Create the agent that represents the user in the conversation.
15 | user_proxy = UserProxyAgent("user", code_execution_config=False)
16 |
17 | # Let the assistant start the conversation. It will end when the user types exit.
18 | assistant.initiate_chat(user_proxy, message="How can I help you today?")
19 |
20 |
21 | if __name__ == "__main__":
22 | main()
23 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/AutoGPT/Challenges/3_qa_small_csv/data.json:
--------------------------------------------------------------------------------
1 | {
2 | "category": [
3 | "data",
4 | "general"
5 | ],
6 | "cutoff": 60,
7 | "dependencies": [
8 | "TestReadFile"
9 | ],
10 | "eval_id": "9df3f07a-5047-488f-b788-1e1f57eba970",
11 | "ground": {
12 | "answer": "The correct amount spent on utilities.",
13 | "eval": {
14 | "type": "file"
15 | },
16 | "files": [
17 | "output.txt"
18 | ],
19 | "should_contain": [
20 | "84"
21 | ]
22 | },
23 | "info": {
24 | "description": "Tests if the agent can answer a question from a small csv",
25 | "difficulty": "intermediate",
26 | "side_effects": [
27 | ""
28 | ]
29 | },
30 | "name": "AnswerQuestionSmallCsv",
31 | "task": "Read and analyze 'file1.csv', then answer the question: How much was spent on utilities in total? Write the answer in file 'output.txt'."
32 | }
33 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/AutoGPT/Challenges/6_book_price/data.json:
--------------------------------------------------------------------------------
1 | {
2 | "category": [
3 | "scrape_synthesize",
4 | "general"
5 | ],
6 | "cutoff": 60,
7 | "dependencies": [
8 | "TestSearch"
9 | ],
10 | "eval_id": "cd96e6b2-779d-4a4a-8367-d520023e27ae",
11 | "ground": {
12 | "answer": "\u00a325.89",
13 | "eval": {
14 | "type": "file"
15 | },
16 | "files": [
17 | ".txt"
18 | ],
19 | "should_contain": [
20 | "25.89"
21 | ],
22 | "should_not_contain": []
23 | },
24 | "info": {
25 | "description": "Tests if the agent can retrieve a specific information from a website.",
26 | "difficulty": "basic",
27 | "side_effects": []
28 | },
29 | "name": "BasicRetrieval",
30 | "task": "Write the price of the book in this url 'http://books.toscrape.com/catalogue/meditations_33/index.html' to a .txt file. Save it to the current directory: './'"
31 | }
32 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.yml:
--------------------------------------------------------------------------------
1 | name: Feature Request
2 | description: File a feature request
3 | labels: ["enhancement"]
4 | title: "[Feature Request]: "
5 |
6 | body:
7 | - type: textarea
8 | id: problem_description
9 | attributes:
10 | label: Is your feature request related to a problem? Please describe.
11 | description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12 | placeholder: What problem are you trying to solve?
13 |
14 | - type: textarea
15 | id: solution_description
16 | attributes:
17 | label: Describe the solution you'd like
18 | description: A clear and concise description of what you want to happen.
19 | placeholder: How do you envision the solution?
20 |
21 | - type: textarea
22 | id: additional_context
23 | attributes:
24 | label: Additional context
25 | description: Add any other context or screenshots about the feature request here.
26 | placeholder: Any additional information
27 |
--------------------------------------------------------------------------------
/samples/apps/cap/py/pyproject.toml:
--------------------------------------------------------------------------------
1 | [build-system]
2 | requires = ["hatchling"]
3 | build-backend = "hatchling.build"
4 |
5 | [project]
6 | name = "autogencap_rajan.jedi"
7 | version = "0.0.10"
8 | authors = [
9 | { name="Rajan Chari", email="rajan.jedi@gmail.com" },
10 | ]
11 | dependencies = [
12 | "pyzmq >= 25.1.2",
13 | "protobuf >= 4.25.3",
14 | "termcolor >= 2.4.0",
15 | "pyautogen >= 0.2.23",
16 | ]
17 | description = "CAP w/ autogen bindings"
18 | readme = "README.md"
19 | requires-python = ">=3.8"
20 | classifiers = [
21 | "Programming Language :: Python :: 3",
22 | "License :: OSI Approved :: MIT License",
23 | "Operating System :: OS Independent",
24 | ]
25 |
26 | [project.urls]
27 | "Homepage" = "https://github.com/microsoft/autogen"
28 | "Bug Tracker" = "https://github.com/microsoft/autogen/issues"
29 |
30 | [tool.hatch.build.targets.sdist]
31 | packages = ["autogencap"]
32 | only-packages = true
33 |
34 | [tool.hatch.build.targets.wheel]
35 | packages = ["autogencap"]
36 | only-packages = true
37 |
--------------------------------------------------------------------------------
/test/agentchat/contrib/agent_eval/test_task.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3 -m pytest
2 |
3 | from autogen.agentchat.contrib.agent_eval.task import Task
4 |
5 |
6 | def test_parse_json_str():
7 | task = Task(
8 | **{
9 | "name": "Math problem solving",
10 | "description": "Given any question, the system needs to solve the problem as consisely and accurately as possible",
11 | "successful_response": '{"message": "The answer is 5", "is_correct": True}',
12 | "failed_response": '{"message": "I don\'t know the answer", "is_correct": False}',
13 | }
14 | )
15 | assert task
16 | assert task.name == "Math problem solving"
17 | assert (
18 | task.description
19 | == "Given any question, the system needs to solve the problem as consisely and accurately as possible"
20 | )
21 | assert task.successful_response == '{"message": "The answer is 5", "is_correct": True}'
22 | assert task.failed_response == '{"message": "I don\'t know the answer", "is_correct": False}'
23 |
--------------------------------------------------------------------------------
/test/agentchat/extensions/tsp_api.py:
--------------------------------------------------------------------------------
1 | from .tsp import tsp_data
2 |
3 |
4 | def change_dist(dist: dict, i: int, j: int, new_cost: float) -> float:
5 | """Change the distance between two points.
6 |
7 | Args:
8 | dist (dict): distance matrix, where the key is a pair and value is
9 | the cost (aka, distance).
10 | i (int): the source node
11 | j (int): the destination node
12 | new_cost (float): the new cost for the distance
13 |
14 | Returns:
15 | float: the previous cost
16 | """
17 | prev_cost = dist[i, j]
18 | dist[i, j] = new_cost
19 | return prev_cost
20 |
21 |
22 | def compare_costs(prev_cost, new_cost) -> float:
23 | """Compare the previous cost and the new cost.
24 |
25 | Args:
26 | prev_cost (float): the previous cost
27 | new_cost (float): the updated cost
28 |
29 | Returns:
30 | float: the ratio between these two costs
31 | """
32 | return (new_cost - prev_cost) / prev_cost
33 |
34 |
35 | dists = tsp_data(5, seed=1)
36 |
--------------------------------------------------------------------------------
/dotnet/eng/Version.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 1.0.0-beta.17
5 | 1.10.0
6 | 1.10.0-alpha
7 | 5.0.0
8 | 4.3.0
9 | 6.0.0
10 | 6.8.0
11 | 2.4.2
12 | 17.7.0
13 | 1.0.0-beta.24229.4
14 | 8.0.0
15 | 4.3.0.2
16 |
17 |
--------------------------------------------------------------------------------
/dotnet/sample/AutoGen.Ollama.Sample/Chat_With_LLaMA.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // Chat_With_LLaMA.cs
3 |
4 | #region Using
5 | using AutoGen.Core;
6 | using AutoGen.Ollama.Extension;
7 | #endregion Using
8 |
9 | namespace AutoGen.Ollama.Sample;
10 |
11 | public class Chat_With_LLaMA
12 | {
13 | public static async Task RunAsync()
14 | {
15 | #region Create_Ollama_Agent
16 | using var httpClient = new HttpClient()
17 | {
18 | BaseAddress = new Uri("http://localhost:11434"),
19 | };
20 |
21 | var ollamaAgent = new OllamaAgent(
22 | httpClient: httpClient,
23 | name: "ollama",
24 | modelName: "llama3:latest",
25 | systemMessage: "You are a helpful AI assistant")
26 | .RegisterMessageConnector()
27 | .RegisterPrintMessage();
28 |
29 | var reply = await ollamaAgent.SendAsync("Can you write a piece of C# code to calculate 100th of fibonacci?");
30 | #endregion Create_Ollama_Agent
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/AutoGPT/Challenges/1_sort_csv/data.json:
--------------------------------------------------------------------------------
1 | {
2 | "category": [
3 | "data",
4 | "general"
5 | ],
6 | "cutoff": 60,
7 | "dependencies": [
8 | "TestReadFile"
9 | ],
10 | "eval_id": "d59ec964-6f67-4b3d-a4de-c4436fc76f95",
11 | "ground": {
12 | "answer": "The csv sorted by date",
13 | "eval": {
14 | "type": "file"
15 | },
16 | "files": [
17 | "output.csv"
18 | ],
19 | "should_contain": [
20 | "id,name,timestamp\n1,Bob,2023-09-24 12:05:00\n2,Charlie,2023-09-24 12:10:00\n3,Alice,2023-09-25 14:10:00\n4,David,2023-09-26 16:20:00"
21 | ]
22 | },
23 | "info": {
24 | "description": "Tests if the agent can sort a csv",
25 | "difficulty": "basic",
26 | "side_effects": [
27 | ""
28 | ]
29 | },
30 | "name": "SortCsv",
31 | "task": "Sort the input.csv by the 'timestamp' column and write the new csv in the output.csv file. The order of the columns should be preserved."
32 | }
33 |
--------------------------------------------------------------------------------
/dotnet/test/AutoGen.SemanticKernel.Tests/ApprovalTests/KernelFunctionExtensionTests.ItCreateFunctionContractsFromTestPlugin.approved.txt:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "ClassName": "test_plugin",
4 | "Name": "GetState",
5 | "Description": "Gets the state of the light.",
6 | "Parameters": [],
7 | "ReturnType": "System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e",
8 | "ReturnDescription": ""
9 | },
10 | {
11 | "ClassName": "test_plugin",
12 | "Name": "ChangeState",
13 | "Description": "Changes the state of the light.'",
14 | "Parameters": [
15 | {
16 | "Name": "newState",
17 | "Description": "new state",
18 | "ParameterType": "System.Boolean, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e",
19 | "IsRequired": true,
20 | "DefaultValue": ""
21 | }
22 | ],
23 | "ReturnType": "System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e",
24 | "ReturnDescription": ""
25 | }
26 | ]
--------------------------------------------------------------------------------
/dotnet/src/AutoGen.Core/Agent/GroupChatManager.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // GroupChatManager.cs
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Linq;
7 | using System.Threading;
8 | using System.Threading.Tasks;
9 |
10 | namespace AutoGen.Core;
11 |
12 | public class GroupChatManager : IAgent
13 | {
14 | public GroupChatManager(IGroupChat groupChat)
15 | {
16 | GroupChat = groupChat;
17 | }
18 | public string Name => throw new ArgumentException("GroupChatManager does not have a name");
19 |
20 | public IEnumerable? Messages { get; private set; }
21 |
22 | public IGroupChat GroupChat { get; }
23 |
24 | public async Task GenerateReplyAsync(
25 | IEnumerable messages,
26 | GenerateReplyOptions? options,
27 | CancellationToken cancellationToken = default)
28 | {
29 | var response = await GroupChat.CallAsync(messages, ct: cancellationToken);
30 | Messages = response;
31 |
32 | return response.Last();
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/dotnet/src/AutoGen.Core/Message/ToolCallAggregateMessage.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // FunctionCallAggregateMessage.cs
3 |
4 | using System.Collections.Generic;
5 |
6 | namespace AutoGen.Core;
7 |
8 | ///
9 | /// An aggregate message that contains a tool call message and a tool call result message.
10 | /// This message type is used by to return both and .
11 | ///
12 | public class ToolCallAggregateMessage : AggregateMessage, ICanGetTextContent, ICanGetToolCalls
13 | {
14 | public ToolCallAggregateMessage(ToolCallMessage message1, ToolCallResultMessage message2, string? from = null)
15 | : base(message1, message2, from)
16 | {
17 | }
18 |
19 | public string? GetContent()
20 | {
21 | return this.Message2.GetContent();
22 | }
23 |
24 | public IEnumerable GetToolCalls()
25 | {
26 | return this.Message1.GetToolCalls();
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/dotnet/src/AutoGen.Ollama/DTOs/Message.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // ChatResponseUpdate.cs
3 |
4 | using System.Collections.Generic;
5 | using System.Text.Json.Serialization;
6 |
7 | namespace AutoGen.Ollama;
8 |
9 | public class Message
10 | {
11 | public Message()
12 | {
13 | }
14 |
15 | public Message(string role, string value)
16 | {
17 | Role = role;
18 | Value = value;
19 | }
20 |
21 | ///
22 | /// the role of the message, either system, user or assistant
23 | ///
24 | [JsonPropertyName("role")]
25 | public string Role { get; set; } = string.Empty;
26 | ///
27 | /// the content of the message
28 | ///
29 | [JsonPropertyName("content")]
30 | public string Value { get; set; } = string.Empty;
31 |
32 | ///
33 | /// (optional): a list of images to include in the message (for multimodal models such as llava)
34 | ///
35 | [JsonPropertyName("images")]
36 | public IList? Images { get; set; }
37 | }
38 |
--------------------------------------------------------------------------------
/dotnet/src/AutoGen.Anthropic/DTO/Content.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // Content.cs
3 |
4 | using System.Text.Json.Serialization;
5 |
6 | namespace AutoGen.Anthropic.DTO;
7 |
8 | public abstract class ContentBase
9 | {
10 | [JsonPropertyName("type")]
11 | public abstract string Type { get; }
12 | }
13 |
14 | public class TextContent : ContentBase
15 | {
16 | [JsonPropertyName("type")]
17 | public override string Type => "text";
18 |
19 | [JsonPropertyName("text")]
20 | public string? Text { get; set; }
21 | }
22 |
23 | public class ImageContent : ContentBase
24 | {
25 | [JsonPropertyName("type")]
26 | public override string Type => "image";
27 |
28 | [JsonPropertyName("source")]
29 | public ImageSource? Source { get; set; }
30 | }
31 |
32 | public class ImageSource
33 | {
34 | [JsonPropertyName("type")]
35 | public string Type => "base64";
36 |
37 | [JsonPropertyName("media_type")]
38 | public string? MediaType { get; set; }
39 |
40 | [JsonPropertyName("data")]
41 | public string? Data { get; set; }
42 | }
43 |
--------------------------------------------------------------------------------
/dotnet/src/AutoGen.LMStudio/README.md:
--------------------------------------------------------------------------------
1 | ## AutoGen.LMStudio
2 |
3 | This package provides support for consuming openai-like API from LMStudio local server.
4 |
5 | ## Installation
6 | To use `AutoGen.LMStudio`, add the following package to your `.csproj` file:
7 |
8 | ```xml
9 |
10 |
11 |
12 | ```
13 |
14 | ## Usage
15 | ```csharp
16 | using AutoGen.LMStudio;
17 | var localServerEndpoint = "localhost";
18 | var port = 5000;
19 | var lmStudioConfig = new LMStudioConfig(localServerEndpoint, port);
20 | var agent = new LMStudioAgent(
21 | name: "agent",
22 | systemMessage: "You are an agent that help user to do some tasks.",
23 | lmStudioConfig: lmStudioConfig)
24 | .RegisterPrintMessage(); // register a hook to print message nicely to console
25 |
26 | await agent.SendAsync("Can you write a piece of C# code to calculate 100th of fibonacci?");
27 | ```
28 |
29 | ## Update history
30 | ### Update on 0.0.7 (2024-02-11)
31 | - Add `LMStudioAgent` to support consuming openai-like API from LMStudio local server.
32 |
--------------------------------------------------------------------------------
/dotnet/src/AutoGen.SemanticKernel/AutoGen.SemanticKernel.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 | AutoGen.SemanticKernel
6 | $(NoWarn);SKEXP0110
7 |
8 |
9 |
10 |
11 |
12 |
13 | AutoGen.SemanticKernel
14 |
15 | This package contains the semantic kernel integration for AutoGen
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/AutoGPT/Challenges/5_search/data.json:
--------------------------------------------------------------------------------
1 | {
2 | "category": [
3 | "general",
4 | "scrape_synthesize"
5 | ],
6 | "cutoff": 120,
7 | "dependencies": [
8 | "TestWriteFile"
9 | ],
10 | "eval_id": "0bb23182-b434-402b-a73e-9c226469b959",
11 | "ground": {
12 | "answer": "This is a Heading\nThis is a paragraph.",
13 | "eval": {
14 | "type": "file"
15 | },
16 | "files": [
17 | ".txt"
18 | ],
19 | "should_contain": [
20 | "Heading",
21 | "paragraph"
22 | ],
23 | "should_not_contain": [
24 | "The",
25 | "the"
26 | ]
27 | },
28 | "info": {
29 | "description": "Tests if the agent can search.",
30 | "difficulty": "interface",
31 | "side_effects": [
32 | ""
33 | ]
34 | },
35 | "name": "Search",
36 | "task": "Open 'https://silennaihin.com/random/plain.html' and paste all of the text on the page in a .txt file. Save it to the current directory: './' "
37 | }
38 |
--------------------------------------------------------------------------------
/dotnet/src/AutoGen/Agent/AssistantAgent.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // AssistantAgent.cs
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Threading;
7 | using System.Threading.Tasks;
8 |
9 | namespace AutoGen;
10 |
11 | public class AssistantAgent : ConversableAgent
12 | {
13 | public AssistantAgent(
14 | string name,
15 | string systemMessage = "You are a helpful AI assistant",
16 | ConversableAgentConfig? llmConfig = null,
17 | Func, CancellationToken, Task>? isTermination = null,
18 | HumanInputMode humanInputMode = HumanInputMode.NEVER,
19 | IDictionary>>? functionMap = null,
20 | string? defaultReply = null)
21 | : base(name: name,
22 | systemMessage: systemMessage,
23 | llmConfig: llmConfig,
24 | isTermination: isTermination,
25 | humanInputMode: humanInputMode,
26 | functionMap: functionMap,
27 | defaultReply: defaultReply)
28 | {
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/Examples/Templates/TwoAgents/scenario.py:
--------------------------------------------------------------------------------
1 | import json
2 | import os
3 |
4 | import testbed_utils
5 |
6 | import autogen
7 |
8 | testbed_utils.init()
9 | ##############################
10 |
11 | config_list = autogen.config_list_from_json("OAI_CONFIG_LIST")
12 |
13 | assistant = autogen.AssistantAgent(
14 | "assistant",
15 | is_termination_msg=lambda x: x.get("content", "").rstrip().find("TERMINATE") >= 0,
16 | llm_config=testbed_utils.default_llm_config(config_list, timeout=180),
17 | )
18 | user_proxy = autogen.UserProxyAgent(
19 | "user_proxy",
20 | human_input_mode="NEVER",
21 | is_termination_msg=lambda x: x.get("content", "").rstrip().find("TERMINATE") >= 0,
22 | code_execution_config={
23 | "work_dir": "coding",
24 | "use_docker": False,
25 | },
26 | max_consecutive_auto_reply=10,
27 | default_auto_reply="",
28 | )
29 | user_proxy.initiate_chat(
30 | assistant,
31 | message="""
32 | __PROMPT__
33 | """.strip(),
34 | )
35 |
36 |
37 | ##############################
38 | testbed_utils.finalize(agents=[assistant, user_proxy])
39 |
--------------------------------------------------------------------------------
/dotnet/src/AutoGen/Agent/UserProxyAgent.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // UserProxyAgent.cs
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Threading;
7 | using System.Threading.Tasks;
8 |
9 | namespace AutoGen;
10 |
11 | public class UserProxyAgent : ConversableAgent
12 | {
13 | public UserProxyAgent(
14 | string name,
15 | string systemMessage = "You are a helpful AI assistant",
16 | ConversableAgentConfig? llmConfig = null,
17 | Func, CancellationToken, Task>? isTermination = null,
18 | HumanInputMode humanInputMode = HumanInputMode.ALWAYS,
19 | IDictionary>>? functionMap = null,
20 | string? defaultReply = null)
21 | : base(name: name,
22 | systemMessage: systemMessage,
23 | llmConfig: llmConfig,
24 | isTermination: isTermination,
25 | humanInputMode: humanInputMode,
26 | functionMap: functionMap,
27 | defaultReply: defaultReply)
28 | {
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/AutoGPT/Challenges/7_revenue/data.json:
--------------------------------------------------------------------------------
1 | {
2 | "category": [
3 | "scrape_synthesize",
4 | "general"
5 | ],
6 | "cutoff": 60,
7 | "dependencies": [
8 | "TestBasicRetrieval"
9 | ],
10 | "eval_id": "dc2114d7-1597-4c9b-bed0-a97937ad977f",
11 | "ground": {
12 | "answer": "It was $81.462 billion in 2022. In millions the answer is 81,462.",
13 | "eval": {
14 | "type": "file"
15 | },
16 | "files": [
17 | ".txt"
18 | ],
19 | "should_contain": [
20 | "81,462"
21 | ],
22 | "should_not_contain": []
23 | },
24 | "info": {
25 | "description": "Tests if the agent can retrieve Tesla's revenue in 2022.",
26 | "difficulty": "intermediate",
27 | "side_effects": []
28 | },
29 | "name": "RevenueRetrieval",
30 | "task": "Write tesla's exact revenue in 2022 into a .txt file. Use the US notation, with a precision rounded to the nearest million dollars (for instance, $31,578 million). Save the file to the current directory: './'"
31 | }
32 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/AutoGPT/Challenges/8_get_information/data.json:
--------------------------------------------------------------------------------
1 | {
2 | "category": [
3 | "scrape_synthesize",
4 | "general"
5 | ],
6 | "cutoff": 60,
7 | "dependencies": [
8 | "TestRevenueRetrieval"
9 | ],
10 | "eval_id": "1758058c-f726-484f-96fa-f05e278e5ff5",
11 | "ground": {
12 | "answer": "The twitter handles of the two hosts of Latent Space.",
13 | "case_sensitive": false,
14 | "eval": {
15 | "type": "file"
16 | },
17 | "files": [
18 | "output.txt"
19 | ],
20 | "should_contain": [
21 | "swyx",
22 | "FanaHOVA"
23 | ],
24 | "should_not_contain": []
25 | },
26 | "info": {
27 | "description": "Tests if the agent can retrieve twitter handles given a vague description.",
28 | "difficulty": "intermediate",
29 | "side_effects": [
30 | ""
31 | ]
32 | },
33 | "name": "TestGetInformation",
34 | "task": "Write the twitter handle of the two hosts of Latent Space to a file called output.txt"
35 | }
36 |
--------------------------------------------------------------------------------
/.devcontainer/studio/Dockerfile:
--------------------------------------------------------------------------------
1 | #-------------------------------------------------------------------------------------------------------------
2 | # Copyright (c) Microsoft Corporation. All rights reserved.
3 | # Licensed under the MIT License. See LICENSE file in the project root for license information.
4 | #-------------------------------------------------------------------------------------------------------------
5 |
6 | FROM mcr.microsoft.com/vscode/devcontainers/python:3.10
7 |
8 | #
9 | # Update the OS and maybe install packages
10 | #
11 | ENV DEBIAN_FRONTEND=noninteractive
12 |
13 | # add git lhs to apt
14 | RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
15 |
16 | RUN apt-get update \
17 | && apt-get upgrade -y \
18 | && apt-get -y install --no-install-recommends build-essential npm git-lfs \
19 | && apt-get autoremove -y \
20 | && apt-get clean -y \
21 | && rm -rf /var/lib/apt/lists/*
22 | ENV DEBIAN_FRONTEND=dialog
23 |
24 | # For docs
25 | RUN npm install --global yarn
26 | RUN pip install --upgrade pip
27 | RUN pip install pydoc-markdown
28 |
--------------------------------------------------------------------------------
/samples/apps/autogen-studio/frontend/src/hooks/store.tsx:
--------------------------------------------------------------------------------
1 | import { create } from "zustand";
2 | import { v4 as uuidv4 } from "uuid";
3 |
4 | import { IChatMessage, IChatSession } from "../components/types";
5 |
6 | interface ConfigState {
7 | messages: IChatMessage[] | null;
8 | setMessages: (messages: IChatMessage[]) => void;
9 | session: IChatSession | null;
10 | setSession: (session: IChatSession | null) => void;
11 | sessions: IChatSession[];
12 | setSessions: (sessions: IChatSession[]) => void;
13 | version: string | null;
14 | setVersion: (version: string) => void;
15 | connectionId: string;
16 | setConnectionId: (connectionId: string) => void;
17 | }
18 |
19 | export const useConfigStore = create()((set) => ({
20 | messages: null,
21 | setMessages: (messages) => set({ messages }),
22 | session: null,
23 | setSession: (session) => set({ session }),
24 | sessions: [],
25 | setSessions: (sessions) => set({ sessions }),
26 | version: null,
27 | setVersion: (version) => set({ version }),
28 | connectionId: uuidv4(),
29 | setConnectionId: (connectionId) => set({ connectionId }),
30 | }));
31 |
--------------------------------------------------------------------------------
/dotnet/src/AutoGen.SourceGenerator/FunctionExtension.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // FunctionExtension.cs
3 |
4 | using AutoGen.SourceGenerator;
5 |
6 | internal static class FunctionExtension
7 | {
8 | public static string GetFunctionName(this SourceGeneratorFunctionContract function)
9 | {
10 | return function.Name ?? string.Empty;
11 | }
12 |
13 | public static string GetFunctionSchemaClassName(this SourceGeneratorFunctionContract function)
14 | {
15 | return $"{function.GetFunctionName()}Schema";
16 | }
17 |
18 | public static string GetFunctionDefinitionName(this SourceGeneratorFunctionContract function)
19 | {
20 | return $"{function.GetFunctionName()}Function";
21 | }
22 |
23 | public static string GetFunctionWrapperName(this SourceGeneratorFunctionContract function)
24 | {
25 | return $"{function.GetFunctionName()}Wrapper";
26 | }
27 |
28 | public static string GetFunctionContractName(this SourceGeneratorFunctionContract function)
29 | {
30 | return $"{function.GetFunctionName()}FunctionContract";
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/.devcontainer/full/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM python:3.11-slim-bookworm
2 |
3 | # add git lhs to apt
4 | RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
5 |
6 | # Update and install dependencies
7 | RUN apt-get update \
8 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
9 | software-properties-common sudo git-lfs \
10 | && apt-get clean \
11 | && rm -rf /var/lib/apt/lists/*
12 |
13 | # Setup a non-root user 'autogen' with sudo access
14 | RUN adduser --disabled-password --gecos '' autogen
15 | RUN adduser autogen sudo
16 | RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
17 | USER autogen
18 | WORKDIR /home/autogen
19 |
20 | # Set environment variable if needed
21 | # ENV OPENAI_API_KEY="{OpenAI-API-Key}"
22 |
23 | # Install Python packages
24 | RUN pip install --upgrade pip
25 | RUN pip install pyautogen[teachable,lmm,retrievechat,mathchat,blendsearch] autogenra
26 | RUN pip install numpy pandas matplotlib seaborn scikit-learn requests urllib3 nltk pillow pytest beautifulsoup4
27 |
28 | # Expose port
29 | EXPOSE 8081
30 |
31 | # Start Command
32 | CMD ["/bin/bash"]
33 |
--------------------------------------------------------------------------------
/dotnet/src/AutoGen.Mistral/DTOs/Error.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // Error.cs
3 |
4 | using System.Text.Json.Serialization;
5 |
6 | namespace AutoGen.Mistral
7 | {
8 | public class Error
9 | {
10 | public Error(string type, string message, string? param = default(string), string? code = default(string))
11 | {
12 | Type = type;
13 | Message = message;
14 | Param = param;
15 | Code = code;
16 | }
17 |
18 | [JsonPropertyName("type")]
19 | public string Type { get; set; }
20 |
21 | ///
22 | /// Gets or Sets Message
23 | ///
24 | [JsonPropertyName("message")]
25 | public string Message { get; set; }
26 |
27 | ///
28 | /// Gets or Sets Param
29 | ///
30 | [JsonPropertyName("param")]
31 | public string? Param { get; set; }
32 |
33 | ///
34 | /// Gets or Sets Code
35 | ///
36 | [JsonPropertyName("code")]
37 | public string? Code { get; set; }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/dotnet/test/AutoGen.Anthropic.Tests/AutoGen.Anthropic.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(TestTargetFramework)
5 | enable
6 | false
7 | True
8 | AutoGen.Anthropic.Tests
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/samples/tools/autogenbench/scenarios/AutoGPT/Challenges/2_combine_csv/data.json:
--------------------------------------------------------------------------------
1 | {
2 | "category": [
3 | "data",
4 | "general"
5 | ],
6 | "cutoff": 60,
7 | "dependencies": [
8 | "TestSortCsv"
9 | ],
10 | "eval_id": "52467beb-b951-4356-9776-9a0ae46bb33b",
11 | "ground": {
12 | "answer": "The csv data is combined",
13 | "eval": {
14 | "type": "file"
15 | },
16 | "files": [
17 | "output.csv"
18 | ],
19 | "should_contain": [
20 | "Age,ID,Name,Occupation,Salary\n28,101,John,Engineer,80000\n34,102,Alice,Doctor,120000\n45,103,Bob,Lawyer,95000"
21 | ]
22 | },
23 | "info": {
24 | "description": "Tests if the agent can combine data from a csv",
25 | "difficulty": "intermediate",
26 | "side_effects": [
27 | ""
28 | ]
29 | },
30 | "name": "CombineCsv",
31 | "task": "The csvs 'file1.csv' and 'file2.csv' both have a column 'ID'. Combine these 2 csvs using the 'ID' column. Then sort the rows by 'ID' in ascending order, sort the columns alphabetically. Write the output in 'output.csv'."
32 | }
33 |
--------------------------------------------------------------------------------
/dotnet/sample/AutoGen.Anthropic.Samples/AnthropicSamples.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // AnthropicSamples.cs
3 |
4 | using AutoGen.Anthropic.Extensions;
5 | using AutoGen.Anthropic.Utils;
6 | using AutoGen.Core;
7 |
8 | namespace AutoGen.Anthropic.Samples;
9 |
10 | public static class AnthropicSamples
11 | {
12 | public static async Task RunAsync()
13 | {
14 | #region create_anthropic_agent
15 | var apiKey = Environment.GetEnvironmentVariable("ANTHROPIC_API_KEY") ?? throw new Exception("Missing ANTHROPIC_API_KEY environment variable.");
16 | var anthropicClient = new AnthropicClient(new HttpClient(), AnthropicConstants.Endpoint, apiKey);
17 | var agent = new AnthropicClientAgent(anthropicClient, "assistant", AnthropicConstants.Claude3Haiku);
18 | #endregion
19 |
20 | #region register_middleware
21 | var agentWithConnector = agent
22 | .RegisterMessageConnector()
23 | .RegisterPrintMessage();
24 | #endregion register_middleware
25 |
26 | await agentWithConnector.SendAsync(new TextMessage(Role.Assistant, "Hello", from: "user"));
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/dotnet/src/AutoGen.SourceGenerator/SourceGeneratorFunctionContract.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // FunctionContract.cs
3 |
4 | namespace AutoGen.SourceGenerator
5 | {
6 | internal class SourceGeneratorFunctionContract
7 | {
8 | public string? Namespace { get; set; }
9 |
10 | public string? ClassName { get; set; }
11 |
12 | public string? Name { get; set; }
13 |
14 | public string? Description { get; set; }
15 |
16 | public string? ReturnDescription { get; set; }
17 |
18 | public SourceGeneratorParameterContract[]? Parameters { get; set; }
19 |
20 | public string? ReturnType { get; set; }
21 | }
22 |
23 | internal class SourceGeneratorParameterContract
24 | {
25 | public string? Name { get; set; }
26 |
27 | public string? Description { get; set; }
28 |
29 | public string? JsonType { get; set; }
30 |
31 | public string? JsonItemType { get; set; }
32 |
33 | public string? Type { get; set; }
34 |
35 | public bool IsOptional { get; set; }
36 |
37 | public string? DefaultValue { get; set; }
38 |
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/dotnet/test/AutoGen.Anthropic.Tests/AnthropicClientAgentTest.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // AnthropicClientAgentTest.cs
3 |
4 | using AutoGen.Anthropic.Extensions;
5 | using AutoGen.Anthropic.Utils;
6 | using AutoGen.Tests;
7 | using Xunit.Abstractions;
8 |
9 | namespace AutoGen.Anthropic;
10 |
11 | public class AnthropicClientAgentTest
12 | {
13 | private readonly ITestOutputHelper _output;
14 |
15 | public AnthropicClientAgentTest(ITestOutputHelper output) => _output = output;
16 |
17 | [ApiKeyFact("ANTHROPIC_API_KEY")]
18 | public async Task AnthropicAgentChatCompletionTestAsync()
19 | {
20 | var client = new AnthropicClient(new HttpClient(), AnthropicConstants.Endpoint, AnthropicTestUtils.ApiKey);
21 |
22 | var agent = new AnthropicClientAgent(
23 | client,
24 | name: "AnthropicAgent",
25 | AnthropicConstants.Claude3Haiku).RegisterMessageConnector();
26 |
27 | var singleAgentTest = new SingleAgentTest(_output);
28 | await singleAgentTest.UpperCaseTestAsync(agent);
29 | await singleAgentTest.UpperCaseStreamingTestAsync(agent);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/samples/apps/autogen-studio/frontend/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 Victor Dibia
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/samples/apps/cap/py/demo/single_threaded.py:
--------------------------------------------------------------------------------
1 | import _paths
2 | from AppAgents import GreeterAgent
3 | from autogencap.ComponentEnsemble import ComponentEnsemble
4 | from autogencap.DebugLog import Error
5 | from autogencap.proto.CAP_pb2 import Ping
6 |
7 |
8 | def single_threaded_demo():
9 | """
10 | Demonstrates the usage of the CAP platform by registering an actor, connecting to the actor,
11 | sending a message, and performing cleanup operations.
12 | """
13 | # CAP Platform
14 | ensemble = ComponentEnsemble()
15 | agent = GreeterAgent(start_thread=False)
16 | ensemble.register(agent)
17 | ensemble.connect()
18 | greeter_link = ensemble.find_by_name("Greeter")
19 | greeter_link.send_txt_msg("Hello World!")
20 |
21 | no_msg = 0
22 | while no_msg < 5:
23 | message = agent.get_message()
24 | agent.dispatch_message(message)
25 | if message is None:
26 | no_msg += 1
27 |
28 | message = agent.get_message()
29 | agent.dispatch_message(message)
30 |
31 | ensemble.disconnect()
32 |
33 |
34 | def main():
35 | single_threaded_demo()
36 |
37 |
38 | if __name__ == "__main__":
39 | main()
40 |
--------------------------------------------------------------------------------
/dotnet/sample/AutoGen.BasicSamples/Example06_UserProxyAgent.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // Example06_UserProxyAgent.cs
3 | using AutoGen.Core;
4 | using AutoGen.OpenAI;
5 |
6 | namespace AutoGen.BasicSample;
7 |
8 | public static class Example06_UserProxyAgent
9 | {
10 | public static async Task RunAsync()
11 | {
12 | var gpt35 = LLMConfiguration.GetOpenAIGPT3_5_Turbo();
13 |
14 | var assistantAgent = new GPTAgent(
15 | name: "assistant",
16 | systemMessage: "You are an assistant that help user to do some tasks.",
17 | config: gpt35)
18 | .RegisterPrintMessage();
19 |
20 | // set human input mode to ALWAYS so that user always provide input
21 | var userProxyAgent = new UserProxyAgent(
22 | name: "user",
23 | humanInputMode: HumanInputMode.ALWAYS)
24 | .RegisterPrintMessage();
25 |
26 | // start the conversation
27 | await userProxyAgent.InitiateChatAsync(
28 | receiver: assistantAgent,
29 | message: "Hey assistant, please help me to do some tasks.",
30 | maxRound: 10);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/dotnet/website/articles/AutoGen.SemanticKernel/SemanticKernelAgent-support-more-messages.md:
--------------------------------------------------------------------------------
1 | @AutoGen.SemanticKernel.SemanticKernelAgent only supports the original `ChatMessageContent` type via `IMessage`. To support more AutoGen built-in message types like @AutoGen.Core.TextMessage, @AutoGen.Core.ImageMessage, @AutoGen.Core.MultiModalMessage, you can register the agent with @AutoGen.SemanticKernel.SemanticKernelChatMessageContentConnector. The @AutoGen.SemanticKernel.SemanticKernelChatMessageContentConnector will convert the message from AutoGen built-in message types to `ChatMessageContent` and vice versa.
2 | > [!NOTE]
3 | > At the current stage, @AutoGen.SemanticKernel.SemanticKernelChatMessageContentConnector only supports conversation for the followng built-in @AutoGen.Core.IMessage
4 | > - @AutoGen.Core.TextMessage
5 | > - @AutoGen.Core.ImageMessage
6 | > - @AutoGen.Core.MultiModalMessage
7 | >
8 | > Function call message type like @AutoGen.Core.ToolCallMessage and @AutoGen.Core.ToolCallResultMessage are not supported yet.
9 |
10 | [!code-csharp[](../../../sample/AutoGen.BasicSamples/CodeSnippet/SemanticKernelCodeSnippet.cs?name=register_semantic_kernel_chat_message_content_connector)]
--------------------------------------------------------------------------------
/dotnet/sample/AutoGen.Ollama.Sample/AutoGen.Ollama.Sample.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | Exe
4 | $(TestTargetFramework)
5 | enable
6 | True
7 | $(NoWarn);CS8981;CS8600;CS8602;CS8604;CS8618;CS0219;SKEXP0054;SKEXP0050;SKEXP0110
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | PreserveNewest
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/test/conftest.py:
--------------------------------------------------------------------------------
1 | import pytest
2 |
3 | skip_openai = False
4 | skip_redis = False
5 | skip_docker = False
6 | reason = "requested to skip"
7 | MOCK_OPEN_AI_API_KEY = "sk-mockopenaiAPIkeyinexpectedformatfortestingonly"
8 |
9 |
10 | # Registers command-line options like '--skip-openai' and '--skip-redis' via pytest hook.
11 | # When these flags are set, it indicates that tests requiring OpenAI or Redis (respectively) should be skipped.
12 | def pytest_addoption(parser):
13 | parser.addoption("--skip-openai", action="store_true", help="Skip all tests that require openai")
14 | parser.addoption("--skip-redis", action="store_true", help="Skip all tests that require redis")
15 | parser.addoption("--skip-docker", action="store_true", help="Skip all tests that require docker")
16 |
17 |
18 | # pytest hook implementation extracting command line args and exposing it globally
19 | @pytest.hookimpl(tryfirst=True)
20 | def pytest_configure(config):
21 | global skip_openai
22 | skip_openai = config.getoption("--skip-openai", False)
23 | global skip_redis
24 | skip_redis = config.getoption("--skip-redis", False)
25 | global skip_docker
26 | skip_docker = config.getoption("--skip-docker", False)
27 |
--------------------------------------------------------------------------------
/samples/apps/autogen-studio/frontend/tailwind.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | content: ["./src/**/*.{js,jsx,ts,tsx}"],
3 | darkMode: "class",
4 | theme: {
5 | extend: {
6 | typography: {
7 | DEFAULT: {
8 | css: {
9 | maxWidth: "100ch", // add required value here
10 | },
11 | },
12 | },
13 | transitionProperty: {
14 | height: "height",
15 | spacing: "margin, padding",
16 | },
17 | backgroundColor: {
18 | primary: "var(--color-bg-primary)",
19 | secondary: "var(--color-bg-secondary)",
20 | accent: "var(--color-bg-accent)",
21 | light: "var(--color-bg-light)",
22 | tertiary: "var(--color-bg-tertiary)",
23 | },
24 | textColor: {
25 | accent: "var(--color-text-accent)",
26 | primary: "var(--color-text-primary)",
27 | secondary: "var(--color-text-secondary)",
28 | },
29 | borderColor: {
30 | accent: "var(--color-border-accent)",
31 | primary: "var(--color-border-primary)",
32 | secondary: "var(--color-border-secondary)",
33 | },
34 | },
35 | },
36 | plugins: [require("@tailwindcss/typography")],
37 | };
38 |
--------------------------------------------------------------------------------
/samples/apps/cap/py/autogencap/proto/CAP.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | // Get protoc here https://github.com/protocolbuffers/protobuf/releases
4 | // .\protoc --python_out=. --pyi_out=. CAP.proto
5 |
6 | enum ErrorCode {
7 | option allow_alias = true;
8 | EC_OK = 0;
9 | EC_NOT_FOUND = 1;
10 | EC_ALREADY_EXISTS = 2;
11 | EC_MAX = 2; // IMPORTANT: Update this if you add more error codes
12 | }
13 |
14 | message Error {
15 | ErrorCode code = 1;
16 | optional string message = 2;
17 | }
18 |
19 | message ActorInfo {
20 | string name = 1;
21 | optional string namespace = 2;
22 | optional string description = 3;
23 | }
24 |
25 | message ActorRegistration {
26 | ActorInfo actor_info = 1;
27 | }
28 |
29 | message ActorLookup {
30 | optional ActorInfo actor_info = 1;
31 | // TODO: May need more structure here for semantic service discovery
32 | // optional string service_descriptor = 2;
33 | }
34 |
35 | message ActorInfoCollection {
36 | repeated ActorInfo info_coll = 1;
37 | }
38 |
39 | message ActorLookupResponse {
40 | bool found = 1;
41 | optional ActorInfoCollection actor = 2;
42 | }
43 |
44 | message Ping {
45 | }
46 |
47 | message Pong {
48 | }
49 |
--------------------------------------------------------------------------------