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
Original file line number Diff line number Diff line change
@@ -1,30 +1,32 @@
# # ------------------------------------
# # Copyright (c) Microsoft Corporation.
# # Licensed under the MIT License.
# # ------------------------------------

# """
# DESCRIPTION:
# This sample demonstrates how to integrate memory into a prompt agent.
# USAGE:
# python sample_agent_memory.py

# Before running the sample:
# pip install python-dotenv azure-identity azure-ai-projects>=2.0.0b1

# Deploy a chat model (e.g. gpt-4.1) and an embedding model (e.g. text-embedding-3-small).
# Once you have deployed models, set the deployment name in the variables below.

# Set these environment variables with your own values:
# 1) AZURE_AI_PROJECT_ENDPOINT - The Azure AI Project endpoint, as found in the Overview
# page of your Azure AI Foundry portal.
# 2) AZURE_AI_AGENT_MODEL_DEPLOYMENT_NAME - The deployment name of the chat model for the agent, as found under the "Name" column in
# the "Models + endpoints" tab in your Azure AI Foundry project.
# 3) AZURE_AI_CHAT_MODEL_DEPLOYMENT_NAME - The deployment name of the chat model for memory, as found under the "Name" column in
# the "Models + endpoints" tab in your Azure AI Foundry project.
# 4) AZURE_AI_EMBEDDING_MODEL_DEPLOYMENT_NAME - The deployment name of the embedding model for memory, as found under the
# "Name" column in the "Models + endpoints" tab in your Azure AI Foundry project.
# """
# ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------

"""
DESCRIPTION:
This sample demonstrates how to integrate memory into a prompt agent.

USAGE:
python sample_agent_memory.py

Before running the sample:

pip install "azure-ai-projects>=2.0.0b1" azure-identity python-dotenv

Deploy a chat model (e.g. gpt-4.1) and an embedding model (e.g. text-embedding-3-small).
Once you have deployed models, set the deployment name in the variables below.

Set these environment variables with your own values:
1) AZURE_AI_PROJECT_ENDPOINT - The Azure AI Project endpoint, as found in the Overview
page of your Azure AI Foundry portal.
2) AZURE_AI_AGENT_MODEL_DEPLOYMENT_NAME - The deployment name of the chat model for the agent, as found under the "Name" column in
the "Models + endpoints" tab in your Azure AI Foundry project.
3) AZURE_AI_CHAT_MODEL_DEPLOYMENT_NAME - The deployment name of the chat model for memory, as found under the "Name" column in
the "Models + endpoints" tab in your Azure AI Foundry project.
4) AZURE_AI_EMBEDDING_MODEL_DEPLOYMENT_NAME - The deployment name of the embedding model for memory, as found under the
"Name" column in the "Models + endpoints" tab in your Azure AI Foundry project.
"""

# import os
# from dotenv import load_dotenv
Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@
# # ------------------------------------
# # Copyright (c) Microsoft Corporation.
# # Licensed under the MIT License.
# # ------------------------------------

# """
# DESCRIPTION:
# This sample demonstrates how to interact with the memory store to add and retrieve memory.
# USAGE:
# python sample_memory_advanced.py

# Before running the sample:
# pip install python-dotenv azure-identity azure-ai-projects>=2.0.0b1

# Deploy a chat model (e.g. gpt-4.1) and an embedding model (e.g. text-embedding-3-small).
# Once you have deployed models, set the deployment name in the variables below.

# Set these environment variables with your own values:
# 1) AZURE_AI_PROJECT_ENDPOINT - The Azure AI Project endpoint, as found in the Overview
# page of your Azure AI Foundry portal.
# 2) AZURE_AI_CHAT_MODEL_DEPLOYMENT_NAME - The deployment name of the chat model, as found under the "Name" column in
# the "Models + endpoints" tab in your Azure AI Foundry project.
# 3) AZURE_AI_EMBEDDING_MODEL_DEPLOYMENT_NAME - The deployment name of the embedding model, as found under the
# "Name" column in the "Models + endpoints" tab in your Azure AI Foundry project.
# """
# ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------

"""
DESCRIPTION:
This sample demonstrates how to interact with the memory store to add and retrieve memory.

USAGE:
python sample_memory_advanced.py

Before running the sample:

pip install "azure-ai-projects>=2.0.0b1" azure-identity python-dotenv

Deploy a chat model (e.g. gpt-4.1) and an embedding model (e.g. text-embedding-3-small).
Once you have deployed models, set the deployment name in the variables below.

Set these environment variables with your own values:
1) AZURE_AI_PROJECT_ENDPOINT - The Azure AI Project endpoint, as found in the Overview
page of your Azure AI Foundry portal.
2) AZURE_AI_CHAT_MODEL_DEPLOYMENT_NAME - The deployment name of the chat model, as found under the "Name" column in
the "Models + endpoints" tab in your Azure AI Foundry project.
3) AZURE_AI_EMBEDDING_MODEL_DEPLOYMENT_NAME - The deployment name of the embedding model, as found under the
"Name" column in the "Models + endpoints" tab in your Azure AI Foundry project.
"""

# import os
# from dotenv import load_dotenv
Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@
# # ------------------------------------
# # Copyright (c) Microsoft Corporation.
# # Licensed under the MIT License.
# # ------------------------------------

# """
# DESCRIPTION:
# This sample demonstrates how to interact with the memory store to add and retrieve memory.
# USAGE:
# python sample_memory_basic.py

# Before running the sample:
# pip install python-dotenv azure-identity azure-ai-projects>=2.0.0b1

# Deploy a chat model (e.g. gpt-4.1) and an embedding model (e.g. text-embedding-3-small).
# Once you have deployed models, set the deployment name in the variables below.

# Set these environment variables with your own values:
# 1) AZURE_AI_PROJECT_ENDPOINT - The Azure AI Project endpoint, as found in the Overview
# page of your Azure AI Foundry portal.
# 2) AZURE_AI_CHAT_MODEL_DEPLOYMENT_NAME - The deployment name of the chat model, as found under the "Name" column in
# the "Models + endpoints" tab in your Azure AI Foundry project.
# 3) AZURE_AI_EMBEDDING_MODEL_DEPLOYMENT_NAME - The deployment name of the embedding model, as found under the
# "Name" column in the "Models + endpoints" tab in your Azure AI Foundry project.
# """
# ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------

"""
DESCRIPTION:
This sample demonstrates how to interact with the memory store to add and retrieve memory.

USAGE:
python sample_memory_basic.py

Before running the sample:

pip install "azure-ai-projects>=2.0.0b1" azure-identity python-dotenv

Deploy a chat model (e.g. gpt-4.1) and an embedding model (e.g. text-embedding-3-small).
Once you have deployed models, set the deployment name in the variables below.

Set these environment variables with your own values:
1) AZURE_AI_PROJECT_ENDPOINT - The Azure AI Project endpoint, as found in the Overview
page of your Azure AI Foundry portal.
2) AZURE_AI_CHAT_MODEL_DEPLOYMENT_NAME - The deployment name of the chat model, as found under the "Name" column in
the "Models + endpoints" tab in your Azure AI Foundry project.
3) AZURE_AI_EMBEDDING_MODEL_DEPLOYMENT_NAME - The deployment name of the embedding model, as found under the
"Name" column in the "Models + endpoints" tab in your Azure AI Foundry project.
"""

# import os
# from dotenv import load_dotenv
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
# # ------------------------------------
# # Copyright (c) Microsoft Corporation.
# # Licensed under the MIT License.
# # ------------------------------------

# """
# DESCRIPTION:
# This sample demonstrates how to perform CRUD operations on a memory store using the Azure AI Projects SDK.
# USAGE:
# python sample_memory_crud.py

# Before running the sample:
# pip install python-dotenv azure-identity azure-ai-projects>=2.0.0b1

# Set these environment variables with your own values:
# 1) AZURE_AI_PROJECT_ENDPOINT - The Azure AI Project endpoint, as found in the Overview
# page of your Azure AI Foundry portal.
# 2) AZURE_AI_CHAT_MODEL_DEPLOYMENT_NAME - The deployment name of the chat model, as found under the "Name" column in
# the "Models + endpoints" tab in your Azure AI Foundry project.
# 3) AZURE_AI_EMBEDDING_MODEL_DEPLOYMENT_NAME - The deployment name of the embedding model, as found under the
# "Name" column in the "Models + endpoints" tab in your Azure AI Foundry project.
# """
# ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------

"""
DESCRIPTION:
This sample demonstrates how to perform CRUD operations on a memory store using the Azure AI Projects SDK.

USAGE:
python sample_memory_crud.py

Before running the sample:

pip install "azure-ai-projects>=2.0.0b1" azure-identity python-dotenv

Set these environment variables with your own values:
1) AZURE_AI_PROJECT_ENDPOINT - The Azure AI Project endpoint, as found in the Overview
page of your Azure AI Foundry portal.
2) AZURE_AI_CHAT_MODEL_DEPLOYMENT_NAME - The deployment name of the chat model, as found under the "Name" column in
the "Models + endpoints" tab in your Azure AI Foundry project.
3) AZURE_AI_EMBEDDING_MODEL_DEPLOYMENT_NAME - The deployment name of the embedding model, as found under the
"Name" column in the "Models + endpoints" tab in your Azure AI Foundry project.
"""

# import os
# from dotenv import load_dotenv
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,19 @@
"""
DESCRIPTION:
This sample demonstrates how to interact with the Foundry Project MCP tool.

USAGE:
python sample_mcp_tool.py
python sample_mcp_tool_async.py

Before running the sample:
pip install python-dotenv azure-identity azure-ai-projects>=2.0.0b1 mcp

Set these environment variables with your own values:
1) AZURE_AI_PROJECT_ENDPOINT - The Azure AI Project endpoint, as found in the Overview
page of your Azure AI Foundry portal.
2) IMAGE_GEN_DEPLOYMENT_NAME - The deployment name of the image generation model, as found under the "Name" column in
the "Models + endpoints" tab in your Azure AI Foundry project.
pip install "azure-ai-projects>=2.0.0b1" azure-identity python-dotenv mcp

Set these environment variables with your own values:
1) AZURE_AI_PROJECT_ENDPOINT - The Azure AI Project endpoint, as found in the Overview
page of your Azure AI Foundry portal.
2) IMAGE_GEN_DEPLOYMENT_NAME - The deployment name of the image generation model, as found under the "Name" column in
the "Models + endpoints" tab in your Azure AI Foundry project.
"""

import asyncio
Expand Down
Loading