Skip to content

Latest commit

 

History

History
98 lines (69 loc) · 3.92 KB

File metadata and controls

98 lines (69 loc) · 3.92 KB

Creating an AIAgent with various providers

These samples show how to create an AIAgent instance using various providers, organized by provider. This is not an exhaustive list, but shows a variety of the more popular options.

For other samples that demonstrate how to use AIAgent instances, see the Getting Started With Agents samples.

Prerequisites

See the README.md for each sample for the prerequisites for that sample.

Providers

Sample Description
Agent with A2A Create an AIAgent for an existing A2A agent
Sample Description
Agent with Anthropic Create an AIAgent using Anthropic Claude models
Running Basic Anthropic agent usage
Reasoning Using Anthropic reasoning capabilities
Function Tools Using function tools with Anthropic
Skills Using skills with Anthropic agents
Sample Description
Azure AI Project Create a Foundry Project agent using the Azure.AI.Project SDK
Azure Foundry Model Use any model deployed to Microsoft Foundry
Azure OpenAI ChatCompletion Create an AIAgent using Azure OpenAI ChatCompletion
Azure OpenAI Responses Create an AIAgent using Azure OpenAI Responses
Sample Description
Custom Implementation Create an AIAgent with a custom implementation

See foundry/README.md for the full list of Foundry agent samples, covering basics, function tools, structured output, middleware, MCP, code interpreter, and more.

Sample Description
GitHub Copilot Create an AIAgent using GitHub Copilot SDK
Sample Description
Google Gemini Create an AIAgent using Google Gemini
Sample Description
Ollama Create an AIAgent using Ollama
Sample Description
ONNX Create an AIAgent using ONNX Runtime
Sample Description
OpenAI ChatCompletion Create an AIAgent using OpenAI ChatCompletion
OpenAI Responses Create an AIAgent using OpenAI Responses
Running Basic OpenAI agent usage
Reasoning Using OpenAI reasoning capabilities
Create from ChatClient Create agent from IChatClient
Create from Response Client Create agent from OpenAI Response client
Conversation Multi-turn conversations with OpenAI
Code Interpreter Code interpreter with file downloads

Running the samples

Navigate to a sample directory and run:

dotnet run

Set the required environment variables as documented in each sample's README. If the variables are not set, you will be prompted for the values when running the samples.