You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/prompts/update_translations.prompt.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,4 +4,4 @@ description: Use this prompt to update the Spanish translations in the repo.
4
4
model: GPT-5.2 (copilot)
5
5
---
6
6
7
-
Update the Spanish translations in the repo according to the guidelines in AGENTS.md. Ensure there are spanish equivalents of each english example. Make sure to keep the translations consistent with the original content and maintain the technical accuracy of the code.
7
+
Update the Spanish translations in the repo according to the guidelines in AGENTS.md. Ensure there are spanish equivalents of each english example. Make sure to keep the translations consistent with the original content and maintain the technical accuracy of the code.
Copy file name to clipboardExpand all lines: AGENTS.md
+92-1Lines changed: 92 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ The agent-framework GitHub repo is here:
6
6
https://github.com/microsoft/agent-framework
7
7
It contains both Python and .NET agent framework code, but we are only using the Python packages in this repo.
8
8
9
-
MAF is changing rapidly still, so we sometimes need to check the repo changelog and issues to see if there are any breaking changes that might affect our code.
9
+
MAF is changing rapidly still, so we sometimes need to check the repo changelog and issues to see if there are any breaking changes that might affect our code.
After upgrading dependencies or making changes across examples, use this plan to verify everything works. Run each example with `uv run python examples/<file>.py`.
99
+
100
+
### No extra setup (Azure OpenAI only)
101
+
102
+
These work with just `API_HOST=azure` and the standard `.env` from `azd up`:
|`agent_history_sqlite.py`| SQLite history provider (no tools — see [agent-framework#3295](https://github.com/microsoft/agent-framework/issues/3295)) |
125
+
|`agent_memory_mem0.py`| Mem0 memory provider |
126
+
127
+
### Requires Redis (dev container)
128
+
129
+
Redis runs automatically in the dev container at `redis://redis:6379`.
130
+
131
+
| Examples | Notes |
132
+
|----------|-------|
133
+
|`agent_history_redis.py`| Redis history provider (no tools — see [agent-framework#3295](https://github.com/microsoft/agent-framework/issues/3295)) |
134
+
|`agent_memory_redis.py`| Redis memory provider |
135
+
136
+
### Requires PostgreSQL (dev container)
137
+
138
+
PostgreSQL runs automatically in the dev container at `postgresql://admin:LocalPasswordOnly@db:5432/postgres`.
|`workflow_hitl_checkpoint_pg.py`| HITL with PG-backed checkpoints |
146
+
147
+
### Requires Azure AI Search
148
+
149
+
Needs `AZURE_SEARCH_ENDPOINT` and `AZURE_SEARCH_KNOWLEDGE_BASE_NAME` in `.env`.
150
+
151
+
| Examples | Notes |
152
+
|----------|-------|
153
+
|`agent_knowledge_aisearch.py`| Azure AI Search knowledge base (agentic mode) |
154
+
155
+
### Requires MCP server
156
+
157
+
Start the MCP server first: `uv run python examples/mcp_server.py`
158
+
159
+
| Examples | Notes |
160
+
|----------|-------|
161
+
|`agent_mcp_local.py`| Local MCP server (stdio) |
162
+
|`agent_mcp_remote.py`| Remote MCP server (SSE) |
163
+
164
+
### Requires OTel / Aspire
165
+
166
+
| Examples | Notes |
167
+
|----------|-------|
168
+
|`agent_otel_aspire.py`| Aspire dashboard (runs in dev container at `http://aspire-dashboard:18888`) |
169
+
|`agent_otel_appinsights.py`| Needs `APPLICATIONINSIGHTS_CONNECTION_STRING` in `.env`|
170
+
171
+
### Slow-running examples (⏱ 2–10 minutes)
172
+
173
+
These take significantly longer than other examples:
174
+
175
+
| Examples | Notes |
176
+
|----------|-------|
177
+
|`agent_evaluation.py`| Runs agent + evaluators inline. ~2–3 min. |
178
+
|`agent_evaluation_generate.py`| Generates eval data JSONL. ~2 min. |
179
+
|`agent_evaluation_batch.py`| Batch evaluators on JSONL. ~3–5 min. Needs `eval_data.jsonl` from `agent_evaluation_generate.py`. |
180
+
|`agent_redteam.py`| Red team attack simulation. ~5–10 min. |
181
+
|`workflow_magenticone.py`| Multi-agent MagenticOne orchestration. ~2–5 min. |
182
+
183
+
### Spanish examples
184
+
185
+
Spanish files under `examples/spanish/` mirror the English examples exactly (same code, translated strings). After changes, spot-check 3–5 Spanish files to confirm they run correctly.
[](https://codespaces.new/Azure-Samples/python-agentframework-demos)
18
18
[](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/Azure-Samples/python-agentframework-demos)
19
19
20
-
This repository provides examples of [Microsoft Agent Framework](https://learn.microsoft.com/agent-framework/) using LLMs from [GitHub Models](https://github.com/marketplace/models), [Azure AI Foundry](https://learn.microsoft.com/azure/ai-foundry/), or other model providers. GitHub Models are free to use for anyone with a GitHub account, up to a [daily rate limit](https://docs.github.com/github-models/prototyping-with-ai-models#rate-limits).
20
+
This repository provides examples of [Microsoft Agent Framework](https://learn.microsoft.com/agent-framework/) using LLMs from [Microsoft Foundry](https://learn.microsoft.com/azure/ai-foundry/) or other model providers.
21
21
22
22
*[Getting started](#getting-started)
23
23
*[GitHub Codespaces](#github-codespaces)
24
24
*[VS Code Dev Containers](#vs-code-dev-containers)
25
25
*[Local environment](#local-environment)
26
26
*[Configuring model providers](#configuring-model-providers)
27
-
*[Using GitHub Models](#using-github-models)
28
-
*[Using Azure AI Foundry models](#using-azure-ai-foundry-models)
27
+
*[Using Microsoft Foundry models](#using-microsoft-foundry-models)
*[Running the Python examples](#running-the-python-examples)
31
30
*[Resources](#resources)
@@ -95,35 +94,11 @@ The dev container includes a Redis server, which is used by the `agent_history_r
95
94
96
95
## Configuring model providers
97
96
98
-
These examples can be run with Azure AI Foundry, OpenAI.com, or GitHub Models, depending on the environment variables you set. All the scripts reference the environment variables from a `.env` file, and an example `.env.sample` file is provided. Host-specific instructions are below.
97
+
These examples can be run with Microsoft Foundry or OpenAI.com, depending on the environment variables you set. All the scripts reference the environment variables from a `.env` file, and an example `.env.sample` file is provided. Host-specific instructions are below.
99
98
100
-
## Using GitHub Models
99
+
## Using Microsoft Foundry models
101
100
102
-
If you open this repository in GitHub Codespaces, you can run the scripts forfree using GitHub Models without any additional steps, as your `GITHUB_TOKEN` is already configuredin the Codespaces environment.
103
-
104
-
If you want to run the scripts locally, you need to set up the `GITHUB_TOKEN` environment variable with a GitHub personal access token (PAT). You can create a PAT by following these steps:
105
-
106
-
1. Go to your GitHub account settings.
107
-
2. Click on "Developer settings"in the left sidebar.
108
-
3. Click on "Personal access tokens"in the left sidebar.
109
-
4. Click on "Tokens (classic)" or "Fine-grained tokens" depending on your preference.
110
-
5. Click on "Generate new token".
111
-
6. Give your token a name and selectthe scopes you want to grant. For this project, you don't need any specific scopes.
112
-
7. Click on "Generate token".
113
-
8. Copy the generated token.
114
-
9. Set the `GITHUB_TOKEN` environment variable in your terminal or IDE:
115
-
116
-
```shell
117
-
export GITHUB_TOKEN=your_personal_access_token
118
-
```
119
-
120
-
10. Optionally, you can use a model other than "gpt-4.1-mini" by setting the `GITHUB_MODEL` environment variable. Use a model that supports function calling, such as: `gpt-5`, `gpt-4.1-mini`, `gpt-4o`, `gpt-4o-mini`, `o3-mini`, `AI21-Jamba-1.5-Large`, `AI21-Jamba-1.5-Mini`, `Codestral-2501`, `Cohere-command-r`, `Ministral-3B`, `Mistral-Large-2411`, `Mistral-Nemo`, `Mistral-small`
121
-
122
-
## Using Azure AI Foundry models
123
-
124
-
You can run all examples in this repository using GitHub Models. If you want to run the examples using models from Azure AI Foundry instead, you need to provision the Azure AI resources, which will incur costs.
125
-
126
-
This project includes infrastructure as code (IaC) to provision Azure OpenAI deployments of "gpt-4.1-mini" and "text-embedding-3-large" via Azure AI Foundry. The IaC is defined in the `infra` directory and uses the Azure Developer CLI to provision the resources.
101
+
This project includes infrastructure as code (IaC) to provision Azure OpenAI deployments of "gpt-5.4" and "text-embedding-3-large" via Microsoft Foundry. The IaC is defined in the `infra` directory and uses the Azure Developer CLI to provision the resources.
127
102
128
103
1. Make sure the [Azure Developer CLI (azd)](https://aka.ms/install-azd) is installed.
129
104
@@ -233,7 +208,7 @@ You can run the examples in this repository by executing the scripts in the `exa
233
208
| [agent_otel_aspire.py](examples/agent_otel_aspire.py) | An agent with OpenTelemetry tracing, metrics, and structured logs exported to the [Aspire Dashboard](https://aspire.dev/dashboard/standalone/). |
234
209
| [agent_otel_appinsights.py](examples/agent_otel_appinsights.py) | An agent with OpenTelemetry tracing, metrics, and structured logs exported to [Azure Application Insights](https://learn.microsoft.com/azure/azure-monitor/app/app-insights-overview). Requires Azure provisioning via `azd provision`. |
235
210
| [agent_evaluation_generate.py](examples/agent_evaluation_generate.py) | Generate synthetic evaluation data for the travel planner agent. |
236
-
| [agent_evaluation.py](examples/agent_evaluation.py) | Evaluate a travel planner agent using [Azure AI Evaluation](https://learn.microsoft.com/azure/ai-foundry/concepts/evaluation-evaluators/agent-evaluators) agent evaluators (IntentResolution, ToolCallAccuracy, TaskAdherence, ResponseCompleteness). Optionally set `AZURE_AI_PROJECT` in `.env` to log results to [Azure AI Foundry](https://learn.microsoft.com/azure/ai-foundry/how-to/develop/agent-evaluate-sdk). |
211
+
| [agent_evaluation.py](examples/agent_evaluation.py) | Evaluate a travel planner agent using [Azure AI Evaluation](https://learn.microsoft.com/azure/ai-foundry/concepts/evaluation-evaluators/agent-evaluators) agent evaluators (IntentResolution, ToolCallAccuracy, TaskAdherence, ResponseCompleteness). Optionally set`AZURE_AI_PROJECT`in`.env` to log results to [Microsoft Foundry](https://learn.microsoft.com/azure/ai-foundry/how-to/develop/agent-evaluate-sdk). |
237
212
| [agent_evaluation_batch.py](examples/agent_evaluation_batch.py) | Batch evaluation of agent responses using Azure AI Evaluation's `evaluate()` function. |
238
213
| [agent_redteam.py](examples/agent_redteam.py) | Red-team a financial advisor agent using [Azure AI Evaluation](https://learn.microsoft.com/azure/ai-foundry/how-to/develop/red-teaming-agent) to test resilience against adversarial attacks across risk categories (Violence, HateUnfairness, Sexual, SelfHarm). Requires `AZURE_AI_PROJECT` in `.env`. |
239
214
@@ -304,7 +279,7 @@ This example requires an `APPLICATIONINSIGHTS_CONNECTION_STRING` environment var
304
279
305
280
**Option A: Automatic via `azd provision`**
306
281
307
-
If you run `azd provision` (see [Using Azure AI Foundry models](#using-azure-ai-foundry-models)), the Application Insights resource is provisioned automatically and the connection string is written to your `.env` file.
282
+
If you run `azd provision` (see [Using Microsoft Foundry models](#using-microsoft-foundry-models)), the Application Insights resource is provisioned automatically and the connection string is written to your `.env` file.
0 commit comments