AGENT SKILL

foundry-config-setup

Resolve missing setup caused by a hardcoded Foundry project endpoint or model in a sample. Use when a sample fails because it uses a placeholder/hardcoded project_endpoint (for example "https://your-project.services.ai.azure.com") or a hardcoded model instead of reading them from the environment.

License 许可
MIT
最近更新
2026-11-12
Stars
★ 1.5w
Forks
2.6k

01 前言 Front Matter

name
foundry-config-setup
license
MIT
metadata
{ "author": "agent-framework-samples", "version": "1.0" }
description
Resolve missing setup caused by a hardcoded Foundry project endpoint or model in a sample. Use when a sample fails because it uses a placeholder/hardcoded project_endpoint (for example "https://your-project.services.ai.azure.com") or a hardcoded model instead of reading them from the environment.
compatibility
Works with any model that supports tool use.

02 资源文件 1

03 SKILL.md 正文

Usage

Some samples (notably those under 01-get-started) hardcode the Foundry project endpoint and model directly in the FoundryChatClient constructor using placeholder values, for example:

client = FoundryChatClient(
    project_endpoint="https://your-project.services.ai.azure.com",
    model="gpt-4o",
    credential=AzureCliCredential(),
)

These placeholder values are not real and the sample cannot run as written. The validation environment provides the real values through environment variables, so the sample must read them from the environment instead.

When you detect a hardcoded/placeholder project_endpoint (or model) that is causing the sample to fail with missing or invalid setup:

  1. Replace the hardcoded project_endpoint value with a read from the FOUNDRY_PROJECT_ENDPOINT environment variable.
  2. Replace the hardcoded model value with a read from the FOUNDRY_MODEL environment variable.
  3. Ensure import os is present at the top of the file.

The corrected constructor should look like:

import os

client = FoundryChatClient(
    project_endpoint=os.environ["FOUNDRY_PROJECT_ENDPOINT"],
    model=os.environ["FOUNDRY_MODEL"],
    credential=AzureCliCredential(),
)

These samples are intentionally written with hardcoded placeholders, so this is expected setup—not a defect in the sample. After applying the change, re-run the sample and report the result as a success if it now runs.

04 同仓库更多 Skills

microsoft
microsoft/agent-framework

draft-release-notes

Create or rewrite Agent Framework release notes from a generated GitHub release log. Use when preparing Python or .NET release notes, filtering mixed-language changelogs, deduplicating changes, preserving inline contributor credits, or documenting breaking-change migrations from pull requests. Requires the user to provide the generated GitHub log, language, and release version before work begins.

★ 1.5w
microsoft
microsoft/agent-framework

agent-framework-builder-python

Use this skill when building, modifying, reviewing, evaluating, integrating, or hosting Python applications with Microsoft Agent Framework. Use it for Agent Framework agents, harness agents, workflows, orchestrations, declarative definitions, tools, sessions, middleware, evaluation, observability, integrations, or hosting, even when the user has not yet chosen the correct framework pattern.

Skill与智能体开发
★ 1.5w
microsoft
microsoft/agent-framework

agent-framework-builder-dotnet

Use this skill when building, modifying, reviewing, evaluating, integrating, or hosting .NET (C#) applications with Microsoft Agent Framework. Use it for Agent Framework agents, harness agents, workflows, orchestrations, declarative definitions, tools, sessions, middleware, evaluation, observability, integrations, or hosting, even when the user has not yet chosen the correct framework pattern.

Skill与智能体开发
★ 1.5w
microsoft
microsoft/agent-framework

foundry-hosted-agent-validation

Step-by-step process for validating a Python Foundry hosted agent sample (under python/samples/04-hosting/foundry-hosted-agents/) end to end — running it locally (native runtime and `azd ai agent run`) and after deploying it to an Azure AI Foundry project with `azd`. Use this when asked to validate a hosted agent sample.

Skill与智能体开发
★ 1.5w
microsoft
microsoft/agent-framework

support-style

Contoso Outdoors customer-support tone and formatting guidelines.

★ 1.5w
microsoft
microsoft/agent-framework

escalation-policy

When and how to escalate Contoso Outdoors customer-support tickets.

★ 1.5w