mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Add proposed stucture for samples and user documentation (#484)
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
# Microsoft Agent Framework for .NET
|
||||
|
||||
## Overview
|
||||
|
||||
The Microsoft Agent Framework for .NET provides a set of tools and libraries to help developers create intelligent agents that can interact with users in natural language as well as orchestrate those agents together to perform complex tasks.
|
||||
|
||||
The framework, in conjunction with its python counterpart, is the successor of the Semantic Kernel and AutoGen agent frameworks.
|
||||
|
||||
## See also
|
||||
|
||||
- [Getting Started](./getting-started/)
|
||||
- [Migration Guide](./migration-guide/)
|
||||
- [User Guide](./user-guide/)
|
||||
- [Samples](../../dotnet/samples)
|
||||
@@ -0,0 +1,39 @@
|
||||
# Microsoft Agent Framework for .NET Getting Started
|
||||
|
||||
This guide will help you get up and running quickly with a basic agent using the Agent Framework and Azure OpenAI.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Before you begin, ensure you have the following:
|
||||
|
||||
- [.NET 8.0 SDK or later](https://dotnet.microsoft.com/download)
|
||||
- An [Azure OpenAI](https://learn.microsoft.com/azure/ai-services/openai/) resource with a deployed model (e.g., `gpt-4o-mini`)
|
||||
- [Azure CLI](https://learn.microsoft.com/cli/azure/install-azure-cli) installed and authenticated (`az login`)
|
||||
|
||||
**Note**: This demo uses Azure CLI credentials for authentication. Make sure you're logged in with `az login` and have access to the Azure OpenAI resource. For more information, see the [Azure CLI documentation](https://learn.microsoft.com/cli/azure/authenticate-azure-cli-interactively).
|
||||
|
||||
## Running a Basic Agent Sample
|
||||
|
||||
This sample demonstrates how to create and use a simple AI agent with Azure OpenAI as the backend. It will create a basic agent using `AzureOpenAIClient` with `gpt-4o-mini` and custom instructions.
|
||||
|
||||
Make sure to replace `https://your-resource.openai.azure.com/` with the endpoint of your Azure OpenAI resource.
|
||||
|
||||
### Sample Code
|
||||
|
||||
```csharp
|
||||
using System;
|
||||
using Azure.AI.OpenAI;
|
||||
using Azure.Identity;
|
||||
using Microsoft.Extensions.AI.Agents;
|
||||
using OpenAI;
|
||||
|
||||
AIAgent agent = new AzureOpenAIClient(
|
||||
new Uri("https://your-resource.openai.azure.com/"),
|
||||
new AzureCliCredential())
|
||||
.GetChatClient("gpt-4o-mini")
|
||||
.CreateAIAgent(instructions: "You are good at telling jokes.");
|
||||
|
||||
Console.WriteLine(await agent.RunAsync("Tell me a joke about a pirate."));
|
||||
```
|
||||
|
||||
For more details and more advanced scenarios, see [Getting Started Steps](../../../dotnet/samples/GettingStartedSteps/).
|
||||
@@ -0,0 +1,4 @@
|
||||
# Microsoft Agent Framework for .NET Concepts
|
||||
|
||||
- [Agent Types](./agent-types.md)
|
||||
- [Multi-turn conversations and Threading](./multi-turn-conversations.md)
|
||||
@@ -0,0 +1,41 @@
|
||||
# Microsoft Agent Framework for .NET Agent Types
|
||||
|
||||
The Microsoft Agent Framework for .NET provides support for several types of agents to accommodate different use cases and requirements.
|
||||
|
||||
All agents are derived from a common base class, `AIAgent`, which provides a consistent interface for all agent types. This allows for building common, agent agnostic, higher level functionality such as multi-agent orchestrations.
|
||||
|
||||
Let's dive into each agent type in more detail.
|
||||
|
||||
## Simple custom agents based on inference services
|
||||
|
||||
The agent framework makes it easy to create simple custom agents based on many different inference services.
|
||||
Any inference service that provides a `Microsoft.Extensions.AI.IChatClient` implementation can be used to build these agents.
|
||||
|
||||
These agents support a wide range of functionality:
|
||||
|
||||
1. Function calling
|
||||
1. Multi-turn conversations with local chat history management or service provided chat history management
|
||||
1. Custom service provided tools (e.g. MCP, Code Execution)
|
||||
1. Structured output
|
||||
|
||||
To create one of these agents, simply construct a `ChatClientAgent` using the `IChatClient` implementation of your choice:
|
||||
|
||||
```csharp
|
||||
using Microsoft.Extensions.AI;
|
||||
|
||||
var agent = new ChatClientAgent(chatClient, instructions: "You are a helpful asssistant");
|
||||
```
|
||||
|
||||
For examples on how to construct `ChatClientAgents` with various `IChatClient` implementations, see the [Agent setup samples](../../../dotnet/samples/AgentSetup).
|
||||
|
||||
## Complex custom agents
|
||||
|
||||
To be added.
|
||||
|
||||
## Remote agents
|
||||
|
||||
To be added.
|
||||
|
||||
## Pre-built agents
|
||||
|
||||
To be added.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Microsoft Agent Framework for .NET Multi-Turn Conversations and Threading
|
||||
|
||||
To be added.
|
||||
Reference in New Issue
Block a user