Compare commits

..
Author SHA1 Message Date
Laveesh RohraandGitHub be56177cc7 Address comments (#2160) 2025-11-12 17:44:45 -08:00
Laveesh RohraandGitHub 3829e1cabc Merge branch 'main' into feature-azure-functions 2025-11-12 16:29:46 -08:00
Chris GillumandGitHub 46035af4bf Address PR feedback from westey-m (#2150)
- Adds a link from the /dotnet/samples/README.md to /dotnet/samples/AzureFunctions
- Make DurableAgentThread deserialization internal for future-proofing
- Update JSON serialization logic to address recently discovered issues with source generator serialization
2025-11-12 13:42:14 -08:00
Laveesh Rohra 513a971f57 Fix imports 2025-11-12 13:32:35 -08:00
Laveesh RohraandGitHub de0f804d1a Merge branch 'main' into feature-azure-functions 2025-11-12 12:26:49 -08:00
8345b00bc6 Update python/packages/azurefunctions/agent_framework_azurefunctions/__init__.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-12 12:26:31 -08:00
3fc355e1fb Update python/packages/azurefunctions/pyproject.toml
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-12 12:26:23 -08:00
f3bf488735 Python: Move azurefunctions to azure for import (#2141)
* Move import to Azure

* fix mypy

* Update python/packages/azurefunctions/README.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Add missing types

* Address comments

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-12 12:13:25 -08:00
Chris GillumandGitHub 601b75a418 .NET: Remove IsPackable=false in preparation for nuget release (#2142) 2025-11-12 11:49:34 -08:00
Laveesh RohraandGitHub ff28066c9c Python: Fix Http Schema (#2112)
* Rename to threadid

* Respond in plain text

* Make snake-case

* Add http prefix

* rename to wait-for-response

* Add query param check

* address comments
2025-11-12 09:56:19 -08:00
ebab25b196 Python: Fix AzureFunctions Integration Tests (#2116)
* Add Identity Auth to samples

* Update python/samples/getting_started/azure_functions/README.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update python/samples/getting_started/azure_functions/01_single_agent/function_app.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update python/samples/getting_started/azure_functions/02_multi_agent/function_app.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update python/samples/getting_started/azure_functions/06_multi_agent_orchestration_conditionals/README.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-12 09:13:23 -08:00
Chris GillumandGitHub 2329bd4841 .NET: [Feature Branch] Update HTTP API to be consistent across languages (#2118) 2025-11-12 08:55:53 -08:00
Chris GillumandGitHub 586238c1c3 Merge branch 'main' into feature-azure-functions 2025-11-12 07:26:19 -08:00
Chris GillumandGitHub cc13e1f575 Fix or remove broken markdown file links (#2115) 2025-11-11 23:01:58 -08:00
46df859b2a Python: Add README for Azure Functions samples setup (#2100)
* Add README for Azure Functions samples setup

Added setup instructions for Azure Functions samples, including environment setup, virtual environment creation, and running samples.

* Update python/samples/getting_started/azure_functions/README.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Laveesh Rohra <larohra@microsoft.com>
2025-11-11 21:51:50 -08:00
Chris Gillum 3ddbf06320 Fix uv.lock after merge 2025-11-11 21:22:40 -08:00
Chris Gillum 66f2dd6a67 Merge branch 'main' into feature-azure-functions 2025-11-11 21:02:55 -08:00
3eda97aac6 .NET: [Feature Branch] Introduce Azure OpenAI config for .NET pipeline (#2106)
Also fixes an issue where we were trying to start docker containers for integration tests on Windows, which doesn't work.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-11 17:30:55 -08:00
Chris GillumandGitHub 246bf07419 Fix DTS startup issue and improve logging (#2103) 2025-11-11 15:08:51 -08:00
17f6cc344c .NET: [Feature Branch] Update dotnet-build-and-test.yml to support integration tests (#2070)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-11 14:23:03 -08:00
4eb31f120b Python: Add Integration tests for AzureFunctions (#2020)
* Add Integration tests

* Remove DTS extension

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Add pyi file for type safety

* Add samples in readme

* Updated all readme instructions

* Address comments

* Update readmes

* Fix requirements

* Address comments

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-10 21:27:17 -08:00
Chris GillumandGitHub 916b51fe1a .NET: [Feature Branch] Update OpenAI config for integration tests (#2063) 2025-11-10 15:56:42 -08:00
Chris GillumandGitHub 304b809655 .NET: [Feature Branch] Durable Task extension integration tests (#2017) 2025-11-10 10:25:58 -08:00
Laveesh RohraandGitHub 0aa8d30d7f Python: Add more samples for Azure Functions (#1980)
* Move all samples

* fix comments

* remove dead lines

* Make samples simpler
2025-11-07 10:37:03 -08:00
Chris GillumandGitHub 40b6deff96 .NET: [Feature Branch] Migrate state schema updates and support for agents as MCP tools (#1979) 2025-11-07 09:42:11 -08:00
Laveesh RohraandGitHub 754491cdd3 Python: Add Unit tests for Azurefunctions package (#1976)
* Add Unit tests for Azurefunctions

* remove duplicate import
2025-11-07 08:29:43 -08:00
Chris GillumandGitHub 90742ba48e Azure Functions .NET samples (#1939) 2025-11-05 18:08:38 -08:00
1762cda5f7 Python: Add Durable Agent Wrapper code (#1913)
* add initial changes

* Move code and add single sample

* Update logger

* Remove unused code

* address PR comments

* cleanup code and address comments

---------

Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com>
2025-11-05 16:21:57 -08:00
Chris GillumandGitHub 5686a009fb .NET: Durable extension: initial src and unit tests (#1900) 2025-11-05 10:54:29 -08:00
Dmytro StrukandGitHub 1d5677be11 Merge branch 'main' into feature-azure-functions 2025-11-04 16:48:40 -08:00
Dmytro Struk 0808fd2b7a Merge branch 'main' into feature-azure-functions 2025-11-04 16:44:58 -08:00
Laveesh RohraandGitHub e7e68fe5c5 Python: Add Scaffolding for Durable AzureFunctions package to Agent Framework (#1823)
* Add scafolding

* update readme

* add code owners and label

* update owners
2025-11-03 08:33:34 -08:00
17 changed files with 3491 additions and 3498 deletions
+3 -3
View File
@@ -2,9 +2,9 @@
<PropertyGroup>
<!-- Central version prefix - applies to all nuget packages. -->
<VersionPrefix>1.0.0</VersionPrefix>
<PackageVersion Condition="'$(VersionSuffix)' != ''">$(VersionPrefix)-$(VersionSuffix).251112.1</PackageVersion>
<PackageVersion Condition="'$(VersionSuffix)' == ''">$(VersionPrefix)-preview.251112.1</PackageVersion>
<GitTag>1.0.0-preview.251112.1</GitTag>
<PackageVersion Condition="'$(VersionSuffix)' != ''">$(VersionPrefix)-$(VersionSuffix).251110.2</PackageVersion>
<PackageVersion Condition="'$(VersionSuffix)' == ''">$(VersionPrefix)-preview.251110.2</PackageVersion>
<GitTag>1.0.0-preview.251110.2</GitTag>
<Configurations>Debug;Release;Publish</Configurations>
<IsPackable>true</IsPackable>
+1 -8
View File
@@ -7,12 +7,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [1.0.0b251112.post1] - 2025-11-12
### Added
- **agent-framework-azurefunctions**: Merge Azure Functions feature branch (#1916)
## [1.0.0b251112] - 2025-11-12
### Added
@@ -225,8 +219,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
For more information, see the [announcement blog post](https://devblogs.microsoft.com/foundry/introducing-microsoft-agent-framework-the-open-source-engine-for-agentic-ai-apps/).
[Unreleased]: https://github.com/microsoft/agent-framework/compare/python-1.0.0b251112.post1...HEAD
[1.0.0b251112.post1]: https://github.com/microsoft/agent-framework/compare/python-1.0.0b251112...python-1.0.0b251112.post1
[Unreleased]: https://github.com/microsoft/agent-framework/compare/python-1.0.0b251112...HEAD
[1.0.0b251112]: https://github.com/microsoft/agent-framework/compare/python-1.0.0b251111...python-1.0.0b251112
[1.0.0b251111]: https://github.com/microsoft/agent-framework/compare/python-1.0.0b251108...python-1.0.0b251111
[1.0.0b251108]: https://github.com/microsoft/agent-framework/compare/python-1.0.0b251106.post1...python-1.0.0b251108
+1 -1
View File
@@ -4,7 +4,7 @@ description = "A2A integration for Microsoft Agent Framework."
authors = [{ name = "Microsoft", email = "af-support@microsoft.com"}]
readme = "README.md"
requires-python = ">=3.10"
version = "1.0.0b251112.post1"
version = "1.0.0b251112"
license-files = ["LICENSE"]
urls.homepage = "https://aka.ms/agent-framework"
urls.source = "https://github.com/microsoft/agent-framework/tree/main/python"
+1 -1
View File
@@ -4,7 +4,7 @@ description = "Anthropic integration for Microsoft Agent Framework."
authors = [{ name = "Microsoft", email = "af-support@microsoft.com"}]
readme = "README.md"
requires-python = ">=3.10"
version = "1.0.0b251112.post1"
version = "1.0.0b251112"
license-files = ["LICENSE"]
urls.homepage = "https://aka.ms/agent-framework"
urls.source = "https://github.com/microsoft/agent-framework/tree/main/python"
+1 -1
View File
@@ -4,7 +4,7 @@ description = "Azure AI Foundry integration for Microsoft Agent Framework."
authors = [{ name = "Microsoft", email = "af-support@microsoft.com"}]
readme = "README.md"
requires-python = ">=3.10"
version = "1.0.0b251112.post1"
version = "1.0.0b251112"
license-files = ["LICENSE"]
urls.homepage = "https://aka.ms/agent-framework"
urls.source = "https://github.com/microsoft/agent-framework/tree/main/python"
@@ -4,7 +4,7 @@ description = "Azure Functions integration for Microsoft Agent Framework."
authors = [{ name = "Microsoft", email = "af-support@microsoft.com"}]
readme = "README.md"
requires-python = ">=3.10"
version = "1.0.0b251112.post1"
version = "1.0.0b251112"
license-files = ["LICENSE"]
urls.homepage = "https://aka.ms/agent-framework"
urls.source = "https://github.com/microsoft/agent-framework/tree/main/python"
+1 -1
View File
@@ -4,7 +4,7 @@ description = "OpenAI ChatKit integration for Microsoft Agent Framework."
authors = [{ name = "Microsoft", email = "af-support@microsoft.com"}]
readme = "README.md"
requires-python = ">=3.10"
version = "1.0.0b251112.post1"
version = "1.0.0b251112"
license-files = ["LICENSE"]
urls.homepage = "https://aka.ms/agent-framework"
urls.source = "https://github.com/microsoft/agent-framework/tree/main/python"
+1 -1
View File
@@ -4,7 +4,7 @@ description = "Copilot Studio integration for Microsoft Agent Framework."
authors = [{ name = "Microsoft", email = "af-support@microsoft.com"}]
readme = "README.md"
requires-python = ">=3.10"
version = "1.0.0b251112.post1"
version = "1.0.0b251112"
license-files = ["LICENSE"]
urls.homepage = "https://aka.ms/agent-framework"
urls.source = "https://github.com/microsoft/agent-framework/tree/main/python"
+1 -1
View File
@@ -4,7 +4,7 @@ description = "Microsoft Agent Framework for building AI Agents with Python. Thi
authors = [{ name = "Microsoft", email = "af-support@microsoft.com"}]
readme = "README.md"
requires-python = ">=3.10"
version = "1.0.0b251112.post1"
version = "1.0.0b251112"
license-files = ["LICENSE"]
urls.homepage = "https://aka.ms/agent-framework"
urls.source = "https://github.com/microsoft/agent-framework/tree/main/python"
+1 -1
View File
@@ -4,7 +4,7 @@ description = "Debug UI for Microsoft Agent Framework with OpenAI-compatible API
authors = [{ name = "Microsoft", email = "af-support@microsoft.com"}]
readme = "README.md"
requires-python = ">=3.10"
version = "1.0.0b251112.post1"
version = "1.0.0b251112"
license-files = ["LICENSE"]
urls.homepage = "https://github.com/microsoft/agent-framework"
urls.source = "https://github.com/microsoft/agent-framework/tree/main/python"
+1 -1
View File
@@ -4,7 +4,7 @@ description = "Experimental modules for Microsoft Agent Framework"
authors = [{ name = "Microsoft", email = "af-support@microsoft.com"}]
readme = "README.md"
requires-python = ">=3.10"
version = "1.0.0b251112.post1"
version = "1.0.0b251112"
license-files = ["LICENSE"]
urls.homepage = "https://aka.ms/agent-framework"
urls.source = "https://github.com/microsoft/agent-framework/tree/main/python"
+1 -1
View File
@@ -4,7 +4,7 @@ description = "Mem0 integration for Microsoft Agent Framework."
authors = [{ name = "Microsoft", email = "af-support@microsoft.com"}]
readme = "README.md"
requires-python = ">=3.10"
version = "1.0.0b251112.post1"
version = "1.0.0b251112"
license-files = ["LICENSE"]
urls.homepage = "https://aka.ms/agent-framework"
urls.source = "https://github.com/microsoft/agent-framework/tree/main/python"
+1 -1
View File
@@ -4,7 +4,7 @@ description = "Microsoft Purview (Graph dataSecurityAndGovernance) integration f
authors = [{ name = "Microsoft", email = "af-support@microsoft.com"}]
readme = "README.md"
requires-python = ">=3.10"
version = "1.0.0b251112.post1"
version = "1.0.0b251112"
license-files = ["LICENSE"]
urls.homepage = "https://github.com/microsoft/agent-framework"
urls.source = "https://github.com/microsoft/agent-framework/tree/main/python"
+1 -1
View File
@@ -4,7 +4,7 @@ description = "Redis integration for Microsoft Agent Framework."
authors = [{ name = "Microsoft", email = "af-support@microsoft.com"}]
readme = "README.md"
requires-python = ">=3.10"
version = "1.0.0b251112.post1"
version = "1.0.0b251112"
license-files = ["LICENSE"]
urls.homepage = "https://aka.ms/agent-framework"
urls.source = "https://github.com/microsoft/agent-framework/tree/main/python"
+1 -1
View File
@@ -4,7 +4,7 @@ description = "Microsoft Agent Framework for building AI Agents with Python. Thi
authors = [{ name = "Microsoft", email = "af-support@microsoft.com"}]
readme = "README.md"
requires-python = ">=3.10"
version = "1.0.0b251112.post1"
version = "1.0.0b251112"
license-files = ["LICENSE"]
urls.homepage = "https://aka.ms/agent-framework"
urls.source = "https://github.com/microsoft/agent-framework/tree/main/python"
@@ -3,7 +3,7 @@
import logging
import os
from collections.abc import AsyncIterable, Awaitable, Callable
from collections.abc import Awaitable, Callable
from typing import Annotated
from agent_framework import (
@@ -11,10 +11,8 @@ from agent_framework import (
ChatContext,
ChatMessage,
ChatResponse,
ChatResponseUpdate,
FunctionInvocationContext,
Role,
TextContent,
chat_middleware,
function_middleware,
ai_function
@@ -39,42 +37,28 @@ async def security_filter_middleware(
next: Callable[[ChatContext], Awaitable[None]],
) -> None:
"""Chat middleware that blocks requests containing sensitive information."""
# Block requests with sensitive information
blocked_terms = ["password", "secret", "api_key", "token"]
# Check only the last message (most recent user input)
last_message = context.messages[-1] if context.messages else None
if last_message and last_message.role == Role.USER and last_message.text:
message_lower = last_message.text.lower()
for term in blocked_terms:
if term in message_lower:
error_message = (
"I cannot process requests containing sensitive information. "
"Please rephrase your question without including passwords, secrets, "
"or other sensitive data."
)
if context.is_streaming:
# Streaming mode: return async generator
async def blocked_stream() -> AsyncIterable[ChatResponseUpdate]:
yield ChatResponseUpdate(
contents=[TextContent(text=error_message)],
role=Role.ASSISTANT,
)
context.result = blocked_stream()
else:
# Non-streaming mode: return complete response
for message in context.messages:
if message.text:
message_lower = message.text.lower()
for term in blocked_terms:
if term in message_lower:
# Override the response without calling the LLM
context.result = ChatResponse(
messages=[
ChatMessage(
role=Role.ASSISTANT,
text=error_message,
text=(
"I cannot process requests containing sensitive information. "
"Please rephrase your question without including passwords, secrets, "
"or other sensitive data."
),
)
]
)
context.terminate = True
return
return
await next(context)
+3460 -3444
View File
File diff suppressed because it is too large Load Diff