Skip to content
Open
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
2 changes: 1 addition & 1 deletion python/packages/core/agent_framework/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,11 +277,11 @@
"USER_AGENT_TELEMETRY_DISABLED_ENV_VAR",
"Agent",
"AgentContext",
"AgentFrameworkException",
"AgentEvalConverter",
"AgentExecutor",
"AgentExecutorRequest",
"AgentExecutorResponse",
"AgentFrameworkException",
"AgentMiddleware",
"AgentMiddlewareLayer",
"AgentMiddlewareTypes",
Expand Down
2 changes: 0 additions & 2 deletions python/packages/core/tests/core/test_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

"""Tests for AgentFrameworkException inner_exception handling."""

import pytest

from agent_framework import AgentFrameworkException


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ async def poem_workflow(topic: str) -> str:
poem = (await writer.run(f"Write a poem about: {topic}")).text
review = (await reviewer.run(f"Review this poem: {poem}")).text
return f"Poem:\n{poem}\n\nReview: {review}"


Comment on lines +40 to +41
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I know that this is done by the formatter, but these empty lines make comments (# </create_workflow>) even more confusing. Could we set a rule or save without auto formatting?

# </create_workflow>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ async def text_workflow(text: str) -> str:
"""Uppercase the text, then reverse it."""
upper = await to_upper_case(text)
return await reverse_text(upper)


# </create_workflow>


Expand Down
2 changes: 1 addition & 1 deletion python/samples/04-hosting/a2a/agent_framework_to_a2a.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
agent = Agent(
client=OpenAIChatClient(),
name="Europe Travel Agent",
instructions="You are a helpful Europe Travel Agent. You can help users search and book flights and hotels across Europe."
instructions="You are a helpful Europe Travel Agent. You can help users search and book flights and hotels across Europe.",
)

request_handler = DefaultRequestHandler(
Expand Down
8 changes: 6 additions & 2 deletions python/samples/04-hosting/azure_functions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,22 @@ All of these samples are set up to run in Azure Functions. Azure Functions has a

### 2. Create and activate a virtual environment

Using [uv](https://docs.astral.sh/uv/) (recommended):

**Windows (PowerShell):**
```powershell
python -m venv .venv
uv venv .venv
.venv\Scripts\Activate.ps1
```

**Linux/macOS:**
```bash
python -m venv .venv
uv venv .venv
source .venv/bin/activate
```

> **Note:** `python -m venv .venv` also works, but can hang indefinitely on Windows with Microsoft Store Python due to a known `ensurepip` issue. Use `uv venv .venv` to avoid this.
### 3. Running the samples

- [Start the Azurite emulator](https://learn.microsoft.com/en-us/azure/storage/common/storage-install-azurite?tabs=npm%2Cblob-storage#run-azurite)
Expand Down
15 changes: 11 additions & 4 deletions python/samples/04-hosting/foundry-hosted-agents/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,25 @@ Read more about Foundry Hosted Agents [here](https://learn.microsoft.com/en-us/a

## Environment setup

1. Navigate to the sample directory you want to run. For example:
1. Navigate to the sample directory you want to run. For example, create and activate a virtual environment using [uv](https://docs.astral.sh/uv/) (recommended):

```bash
python -m venv .venv
uv venv .venv
```

```bash
# Windows (PowerShell)
.venv\Scripts\Activate.ps1

# Windows
.venv\Scripts\Activate
# Windows (Command Prompt)
.venv\Scripts\activate.bat

# macOS/Linux
source .venv/bin/activate
```

> **Note:** `python -m venv .venv` also works, but can hang indefinitely on Windows with Microsoft Store Python due to a known `ensurepip` issue. Use `uv venv .venv` to avoid this.

2. Install dependencies:

```bash
Expand Down
Loading