Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
/samples/typescript/quickstart/chat-with-agent/src/quickstart-chat-with-agent.ts @microsoft-foundry/AI-Platform-Docs
/samples/typescript/quickstart/create-agent/src/quickstart-create-agent.ts @microsoft-foundry/AI-Platform-Docs
/samples/typescript/quickstart/responses/src/quickstart-responses.ts @microsoft-foundry/AI-Platform-Docs
/samples/typescript/quickstart/agent-service/src/quickstart.ts @microsoft-foundry/AI-Platform-Docs

#### Additional ownership entries (added via issue triage) ##############################################
# Routing for sample paths that were uncovered during issue triage.
Expand Down
2 changes: 1 addition & 1 deletion samples/csharp/hosted-agents/README-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ Press **F5** to start the agent. The agent starts and the **Agent Inspector** op

### Or run manually, then open the Inspector

1. Set the required environment variables and sign in to Azure with the Azure CLI (`az login`).
1. Configure the agent — copy `.env.example` to `.env` and fill in the values (the app loads `.env` automatically on startup) — then sign in to Azure with the Azure CLI (`az login`).
2. Start the agent: `dotnet run` (listens on `http://localhost:8088`).
3. Command Palette (`Ctrl+Shift+P`) → **Foundry Toolkit: Open Agent Inspector**, then send a message to test.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
using Microsoft.Agents.AI.Foundry.Hosting;

// Load .env file if present (for local development)
Env.TraversePath().Load();
Env.NoClobber().TraversePath().Load();

var projectEndpoint = new Uri(Environment.GetEnvironmentVariable("FOUNDRY_PROJECT_ENDPOINT")
?? throw new InvalidOperationException("FOUNDRY_PROJECT_ENDPOINT environment variable is not set."));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
using Microsoft.Agents.AI.Foundry.Hosting;

// Load .env file if present (for local development)
Env.TraversePath().Load();
Env.NoClobber().TraversePath().Load();

var projectEndpoint = new Uri(Environment.GetEnvironmentVariable("FOUNDRY_PROJECT_ENDPOINT")
?? throw new InvalidOperationException("FOUNDRY_PROJECT_ENDPOINT environment variable is not set."));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
using Microsoft.Extensions.AI;

// Load .env file if present (for local development).
Env.TraversePath().Load();
Env.NoClobber().TraversePath().Load();

var projectEndpoint = new Uri(Environment.GetEnvironmentVariable("FOUNDRY_PROJECT_ENDPOINT")
?? throw new InvalidOperationException("FOUNDRY_PROJECT_ENDPOINT environment variable is not set."));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
using Microsoft.Agents.AI.Foundry.Hosting;
using Microsoft.Extensions.AI;

Env.TraversePath().Load();
Env.NoClobber().TraversePath().Load();

var projectEndpoint = new Uri(Environment.GetEnvironmentVariable("FOUNDRY_PROJECT_ENDPOINT")
?? throw new InvalidOperationException("FOUNDRY_PROJECT_ENDPOINT environment variable is not set."));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
using Microsoft.Extensions.AI;
using BrowserAutomation;

Env.TraversePath().Load();
Env.NoClobber().TraversePath().Load();

// ── Configuration ────────────────────────────────────────────────────────────
var projectEndpoint = new Uri(Environment.GetEnvironmentVariable("FOUNDRY_PROJECT_ENDPOINT")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using Microsoft.Agents.AI.Foundry.Hosting;
using Microsoft.Extensions.AI;

Env.TraversePath().Load();
Env.NoClobber().TraversePath().Load();

var projectEndpoint = new Uri(Environment.GetEnvironmentVariable("FOUNDRY_PROJECT_ENDPOINT")
?? throw new InvalidOperationException("FOUNDRY_PROJECT_ENDPOINT environment variable is not set."));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
using Microsoft.Agents.AI.Foundry.Hosting;
using Microsoft.Extensions.AI;

Env.TraversePath().Load();
Env.NoClobber().TraversePath().Load();

var projectEndpoint = new Uri(Environment.GetEnvironmentVariable("FOUNDRY_PROJECT_ENDPOINT")
?? throw new InvalidOperationException("FOUNDRY_PROJECT_ENDPOINT environment variable is not set."));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
using ModelContextProtocol.Client;

// Load .env file if present (for local development).
Env.TraversePath().Load();
Env.NoClobber().TraversePath().Load();

string projectEndpoint = Environment.GetEnvironmentVariable("FOUNDRY_PROJECT_ENDPOINT")
?? throw new InvalidOperationException("FOUNDRY_PROJECT_ENDPOINT environment variable is not set.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
using Microsoft.Agents.AI.Foundry.Hosting;

// Load .env file if present (for local development)
Env.TraversePath().Load();
Env.NoClobber().TraversePath().Load();

var projectEndpoint = new Uri(Environment.GetEnvironmentVariable("FOUNDRY_PROJECT_ENDPOINT")
?? throw new InvalidOperationException("FOUNDRY_PROJECT_ENDPOINT environment variable is not set."));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,7 @@ Press **F5** to start the agent. The agent starts and the **Agent Inspector** op
dotnet restore
```

2. Set the required environment variables:

```bash
export FOUNDRY_PROJECT_ENDPOINT="https://<account>.services.ai.azure.com/api/projects/<project>"
export AZURE_AI_MODEL_DEPLOYMENT_NAME="<your-model-deployment-name>"
```
2. Configure the agent: copy `.env.example` to `.env` and fill in the values. The agent loads `.env` automatically on startup.

3. Sign in to Azure with the Azure CLI:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,13 @@
using Azure.AI.AgentServer.Core;
using Azure.AI.Projects;
using Azure.Identity;
using DotNetEnv;
using Microsoft.Agents.AI;
using Microsoft.Agents.AI.Foundry.Hosting;

// Load environment variables from a .env file if present (for local development).
Env.NoClobber().TraversePath().Load();

if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("APPLICATIONINSIGHTS_CONNECTION_STRING")))
{
Console.Error.WriteLine(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
<PackageReference Include="Microsoft.Agents.AI.Foundry.Hosting" Version="1.12.0-preview.260629.1" />
<!-- Foundry SDK — provides AIProjectClient and AsAIAgent -->
<PackageReference Include="Azure.AI.Projects" Version="2.1.0-beta.3" />
<!-- .env file support for local development -->
<PackageReference Include="DotNetEnv" Version="3.1.1" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@

using Azure.AI.AgentServer.Core;
using Azure.AI.AgentServer.Invocations;
using DotNetEnv;
using InvocationsEchoAgent;
using Microsoft.Agents.AI;

// Load environment variables from a .env file if present (for local development).
Env.NoClobber().TraversePath().Load();

var builder = AgentHost.CreateBuilder(args);

// Register the echo agent as a singleton (no LLM needed).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
<ItemGroup>
<PackageReference Include="Microsoft.Agents.AI.Foundry.Hosting" Version="1.12.0-preview.260629.1" />
<PackageReference Include="Azure.AI.AgentServer.Invocations" Version="1.0.0-beta.5" />
<!-- .env file support for local development -->
<PackageReference Include="DotNetEnv" Version="3.1.1" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using Microsoft.Agents.AI.Foundry.Hosting;
using Microsoft.Extensions.AI;

Env.TraversePath().Load();
Env.NoClobber().TraversePath().Load();

var projectEndpoint = new Uri(Environment.GetEnvironmentVariable("FOUNDRY_PROJECT_ENDPOINT")
?? throw new InvalidOperationException("FOUNDRY_PROJECT_ENDPOINT environment variable is not set."));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
using ModelContextProtocol.Client;

// Load .env file if present (for local development)
Env.TraversePath().Load();
Env.NoClobber().TraversePath().Load();

var projectEndpoint = new Uri(Environment.GetEnvironmentVariable("FOUNDRY_PROJECT_ENDPOINT")
?? throw new InvalidOperationException("FOUNDRY_PROJECT_ENDPOINT environment variable is not set."));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using Microsoft.Agents.AI.Foundry.Hosting;
using Microsoft.Extensions.AI;

Env.TraversePath().Load();
Env.NoClobber().TraversePath().Load();

var projectEndpoint = new Uri(Environment.GetEnvironmentVariable("FOUNDRY_PROJECT_ENDPOINT")
?? throw new InvalidOperationException("FOUNDRY_PROJECT_ENDPOINT environment variable is not set."));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using Microsoft.Agents.AI;
using Microsoft.Agents.AI.Foundry.Hosting;

Env.TraversePath().Load();
Env.NoClobber().TraversePath().Load();

var projectEndpoint = new Uri(Environment.GetEnvironmentVariable("FOUNDRY_PROJECT_ENDPOINT")
?? throw new InvalidOperationException("FOUNDRY_PROJECT_ENDPOINT environment variable is not set."));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
using Microsoft.Agents.AI.Foundry.Hosting;

// Load .env file if present (for local development)
Env.TraversePath().Load();
Env.NoClobber().TraversePath().Load();

var projectEndpoint = new Uri(Environment.GetEnvironmentVariable("FOUNDRY_PROJECT_ENDPOINT")
?? throw new InvalidOperationException("FOUNDRY_PROJECT_ENDPOINT environment variable is not set."));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using Microsoft.Agents.AI.Foundry.Hosting;
using Microsoft.Extensions.AI;

Env.TraversePath().Load();
Env.NoClobber().TraversePath().Load();

var projectEndpoint = new Uri(Environment.GetEnvironmentVariable("FOUNDRY_PROJECT_ENDPOINT")
?? throw new InvalidOperationException("FOUNDRY_PROJECT_ENDPOINT environment variable is not set."));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
using Microsoft.Extensions.DependencyInjection;

// Load .env file if present (for local development)
Env.TraversePath().Load();
Env.NoClobber().TraversePath().Load();

var projectEndpoint = new Uri(Environment.GetEnvironmentVariable("FOUNDRY_PROJECT_ENDPOINT")
?? throw new InvalidOperationException("FOUNDRY_PROJECT_ENDPOINT environment variable is not set."));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using Microsoft.Agents.AI.Foundry.Hosting;
using Microsoft.Agents.AI.Workflows;

Env.TraversePath().Load();
Env.NoClobber().TraversePath().Load();

var projectEndpoint = new Uri(Environment.GetEnvironmentVariable("FOUNDRY_PROJECT_ENDPOINT")
?? throw new InvalidOperationException("FOUNDRY_PROJECT_ENDPOINT environment variable is not set."));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,7 @@ Press **F5** to start the agent. The agent starts and the **Agent Inspector** op
dotnet restore
```

2. Set the required environment variables (see [Environment variables](#environment-variables)):

```bash
export FOUNDRY_PROJECT_ENDPOINT="https://<account>.services.ai.azure.com/api/projects/<project>"
export AZURE_AI_MODEL_DEPLOYMENT_NAME="<your-model-deployment-name>"
```
2. Configure the agent: copy `.env.example` to `.env` and fill in the values (see [Environment variables](#environment-variables)). The agent loads `.env` automatically on startup.

3. Sign in to Azure with the Azure CLI:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
<PackageReference Include="Azure.AI.Extensions.OpenAI" Version="2.0.0" />
<!-- Azure authentication via DefaultAzureCredential -->
<PackageReference Include="Azure.Identity" Version="1.21.0" />
<!-- .env file support for local development -->
<PackageReference Include="DotNetEnv" Version="3.1.1" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,14 @@
using Azure.AI.Extensions.OpenAI;
using Azure.AI.Projects;
using Azure.Identity;
using DotNetEnv;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;
using OpenAI.Responses;

// Load environment variables from a .env file if present (for local development).
Env.NoClobber().TraversePath().Load();

// One-liner startup — wires up Kestrel on port 8088, OpenTelemetry, health probes,
// and the Invocations API endpoints. Telemetry is configured automatically:
// when APPLICATIONINSIGHTS_CONNECTION_STRING is set, traces and logs are sent to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,7 @@ Press **F5** to start the agent. The agent starts and the **Agent Inspector** op
dotnet restore
```

2. Set the required environment variables:

```bash
export FOUNDRY_PROJECT_ENDPOINT="https://your-resource.openai.azure.com/api/projects/proj"
export AZURE_AI_MODEL_DEPLOYMENT_NAME="gpt-5.4-mini"
```
2. Configure the agent: copy `.env.example` to `.env` and fill in the values. The agent loads `.env` automatically on startup.

3. Sign in to Azure with the Azure CLI:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@
using Azure.AI.Extensions.OpenAI;
using Azure.AI.Projects;
using Azure.Identity;
using DotNetEnv;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using OpenAI.Responses;

// Load environment variables from a .env file if present (for local development).
Env.NoClobber().TraversePath().Load();

// ---------------------------------------------------------------------------
// Foundry project configuration
// ---------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
<PackageReference Include="Azure.AI.Extensions.OpenAI" Version="2.0.0" />
<!-- Azure authentication via DefaultAzureCredential -->
<PackageReference Include="Azure.Identity" Version="1.21.0" />
<!-- .env file support for local development -->
<PackageReference Include="DotNetEnv" Version="3.1.1" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,14 @@ Try sending `{"message": "save a note - book reservation for dinner"}`, then `{"

### Or run manually, then open the Inspector

1. Sign in to Azure with the Azure CLI (`az login`), build, and set env values:
1. Sign in to Azure with the Azure CLI (`az login`) and build:

```bash
dotnet build
cp .env.example .env # then edit values (skip if .env already exists)
export FOUNDRY_PROJECT_ENDPOINT="https://your-project.services.ai.azure.com/api/projects/your-project"
export AZURE_AI_MODEL_DEPLOYMENT_NAME="gpt-5.4-mini"
```

Copy `.env.example` to `.env` and fill in the values (the agent loads `.env` automatically on startup).

2. Start the agent: `dotnet run` (listens on `http://localhost:8088`).
3. Command Palette (`Ctrl+Shift+P`) → **Foundry Toolkit: Open Agent Inspector**, then send a message to test.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@
using Azure.AI.Extensions.OpenAI;
using Azure.AI.Projects;
using Azure.Identity;
using DotNetEnv;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using OpenAI.Responses;

// Load environment variables from a .env file if present (for local development).
Env.NoClobber().TraversePath().Load();

if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("APPLICATIONINSIGHTS_CONNECTION_STRING")))
Console.Error.WriteLine(
"[WARNING] APPLICATIONINSIGHTS_CONNECTION_STRING not set — traces will not be sent " +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
<PackageReference Include="Azure.AI.Extensions.OpenAI" Version="2.0.0" />
<!-- Azure authentication via DefaultAzureCredential -->
<PackageReference Include="Azure.Identity" Version="1.21.0" />
<!-- .env file support for local development -->
<PackageReference Include="DotNetEnv" Version="3.1.1" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
<PackageReference Include="Azure.AI.VoiceLive" Version="1.1.0-beta.4" />
<!-- Azure authentication via DefaultAzureCredential -->
<PackageReference Include="Azure.Identity" Version="1.21.0" />
<!-- .env file support for local development -->
<PackageReference Include="DotNetEnv" Version="3.1.1" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,14 @@
using Azure.AI.VoiceLive;
using Azure.Core;
using Azure.Identity;
using DotNetEnv;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;

// Load environment variables from a .env file if present (for local development).
Env.NoClobber().TraversePath().Load();

InvocationsServer.Run<VoiceLiveHandler>(configure: builder =>
{
if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("APPLICATIONINSIGHTS_CONNECTION_STRING")))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,7 @@ Press **F5** to start the agent. The agent starts and the **Agent Inspector** op
dotnet restore
```

2. Set the required environment variables (see [Environment variables](#environment-variables)):

```bash
export FOUNDRY_PROJECT_ENDPOINT="https://<account>.services.ai.azure.com/api/projects/<project>"
export AZURE_AI_MODEL_DEPLOYMENT_NAME="<your-model-deployment-name>"
```
2. Configure the agent: copy `.env.example` to `.env` and fill in the values (see [Environment variables](#environment-variables)). The agent loads `.env` automatically on startup.

3. Sign in to Azure with the Azure CLI:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
<PackageReference Include="Azure.AI.Extensions.OpenAI" Version="2.0.0" />
<!-- Azure authentication via DefaultAzureCredential -->
<PackageReference Include="Azure.Identity" Version="1.21.0" />
<!-- .env file support for local development -->
<PackageReference Include="DotNetEnv" Version="3.1.1" />
</ItemGroup>

</Project>
Loading
Loading