Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Python: restructure: Python samples into progressive 01-05 layout#3862

Merged
eavanvalkenburg merged 9 commits into
microsoft:mainfrom
eavanvalkenburg:restructure/python-samples
Feb 12, 2026
Merged

Python: restructure: Python samples into progressive 01-05 layout#3862
eavanvalkenburg merged 9 commits into
microsoft:mainfrom
eavanvalkenburg:restructure/python-samples

Conversation

@eavanvalkenburg

Copy link
Copy Markdown
Member

Summary

Restructures Python samples into a progressive learning layout:

Folder Purpose Samples
01-get-started/ Linear tutorial (hello → hosting) 6 new files
02-agents/ Deep-dive by concept (tools, middleware, providers, etc.) All existing concept samples
03-workflows/ Workflow patterns (preserved as-is from upstream) All existing workflow samples
04-hosting/ Deployment (Azure Functions, Durable Tasks, A2A) Moved from getting_started
05-end-to-end/ Full applications + evaluation Moved from demos

Design Decisions

  • Progressive complexity: 01→05 builds from hello-world to production
  • One concept per file in sections 01-03
  • Default provider: OpenAI Responses via OpenAIResponsesClient
  • Workflows preserved: All existing workflow samples moved with original names/structure
  • Old files in _to_delete/ for reviewer reference — not deleted yet
  • AGENTS.md documents structure for AI/human maintainers

Not in scope

  • .NET samples (separate PR)
  • Workflow restructuring (will be separate)
  • Docs updates (separate PR in docs repo)

Related: docs PR MicrosoftDocs/semantic-kernel-pr#858

Copilot AI review requested due to automatic review settings February 11, 2026 19:09
@eavanvalkenburg eavanvalkenburg requested a review from a team as a code owner February 11, 2026 19:09
@markwallace-microsoft markwallace-microsoft added documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs python Usage: [Issues, PRs], Target: Python labels Feb 11, 2026
@github-actions github-actions Bot changed the title restructure: Python samples into progressive 01-05 layout Python: restructure: Python samples into progressive 01-05 layout Feb 11, 2026

Copilot AI left a comment

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.

Pull request overview

Restructures the Python samples into a progressive “01–05” learning layout and adds/relocates observability and workflow examples to match the new organization.

Changes:

  • Added a new progressive “01-get-started” track with 6 introductory samples and a README.
  • Added/relocated multiple “02-agents/observability” samples covering environment-based, parameter-based, zero-code, and Azure/Foundry tracing setups.
  • Added a workflow telemetry/observability sample under “02-agents”.

Reviewed changes

Copilot reviewed 15 out of 977 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
python/samples/02-agents/workflow_observability.py New workflow sample demonstrating OpenTelemetry spans and trace correlation.
python/samples/02-agents/observability/configure_otel_providers_with_parameters.py New sample configuring OTEL providers via parameters and custom exporters.
python/samples/02-agents/observability/configure_otel_providers_with_env_var.py New sample configuring OTEL providers via environment variables.
python/samples/02-agents/observability/azure_ai_agent_observability.py New Azure AI Project-based observability setup sample.
python/samples/02-agents/observability/agent_with_foundry_tracing.py New Foundry/App Insights tracing sample with PEP 723 header.
python/samples/02-agents/observability/agent_observability.py New agent observability quickstart sample.
python/samples/02-agents/observability/advanced_zero_code.py New “zero code” OpenTelemetry auto-instrumentation sample.
python/samples/02-agents/observability/advanced_manual_setup_console_output.py New manual OpenTelemetry SDK setup sample (console exporters).
python/samples/01-get-started/README.md New index README describing the progressive get-started sequence.
python/samples/01-get-started/06_host_your_agent.py New minimal A2A hosting stub sample.
python/samples/01-get-started/05_first_workflow.py New first workflow sample chaining executors.
python/samples/01-get-started/04_memory.py New context provider “memory” sample.
python/samples/01-get-started/03_multi_turn.py New multi-turn thread sample.
python/samples/01-get-started/02_add_tools.py New tools sample using @tool.
python/samples/01-get-started/01_hello_agent.py New hello-world agent sample (streaming + non-streaming).

Comment thread python/samples/01-get-started/04_memory.py
Comment thread python/samples/02-agents/observability/agent_with_foundry_tracing.py Outdated
Comment thread python/samples/02-agents/observability/advanced_zero_code.py Outdated
Comment thread python/samples/02-agents/observability/advanced_zero_code.py Outdated
Comment thread python/samples/02-agents/observability/configure_otel_providers_with_env_var.py Outdated
Comment thread python/samples/02-agents/observability/azure_ai_agent_observability.py Outdated
Comment thread python/samples/02-agents/observability/agent_observability.py
Comment thread python/samples/02-agents/observability/agent_observability.py
Comment thread python/samples/02-agents/workflow_observability.py Outdated
Comment thread python/samples/02-agents/workflow_observability.py Outdated
@markwallace-microsoft

markwallace-microsoft commented Feb 11, 2026

Copy link
Copy Markdown
Contributor

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
TOTAL21258327784% 
report-only-changed-files is enabled. No files were changed during this commit :)

Python Unit Test Overview

Tests Skipped Failures Errors Time
4101 225 💤 0 ❌ 0 🔥 1m 12s ⏱️

@moonbox3 moonbox3 left a comment

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.

I fixed samples, clients and bugs in #3873. We'll need to get those changes in, and then we can pull into this.

@moonbox3 moonbox3 disabled auto-merge February 12, 2026 07:14
@eavanvalkenburg eavanvalkenburg force-pushed the restructure/python-samples branch from 06931c7 to dc6a8a5 Compare February 12, 2026 12:51
- 01-get-started/: 6 numbered steps (hello agent → hosting)
- 02-agents/: all agent concept samples (tools, middleware, providers, etc.)
- 03-workflows/: ALL existing workflow samples preserved as-is
- 04-hosting/: azure-functions, durabletask, a2a
- 05-end-to-end/: demos, evaluation, hosted agents
- Old files moved to _to_delete/ for review
- Added AGENTS.md with structure documentation
- autogen-migration/ and semantic-kernel-migration/ preserved at root
- Switch all 01-get-started samples to AzureOpenAIResponsesClient with
  Azure AI Foundry project endpoint (AZURE_AI_PROJECT_ENDPOINT +
  AZURE_OPENAI_RESPONSES_DEPLOYMENT_NAME + AzureCliCredential)
- Add _to_delete/ and 05-end-to-end/ to pyrightconfig.samples.json excludes
- Fix test paths in packages/ that referenced old getting_started/ dirs:
  durabletask conftest + streaming test, azurefunctions conftest,
  devui conftest + capture_messages + openai_sdk_integration
- Fix workflow_as_agent_human_in_the_loop.py import (sibling import)
- Update hosting READMEs and tool comment paths
- Replace root README.md with new structure overview
- Update AGENTS.md to document Azure OpenAI Foundry as default provider
All files in _to_delete/ were either:
- Exact duplicates of files in the new structure (240 files)
- Same file with only comment path updates (100 files)
- One import-fix diff (workflow_as_agent_human_in_the_loop.py)
- One superseded minimal_sample.py

Resource files (sample.pdf, countries.json, employees.pdf, weather.json)
copied to 02-agents/sample_assets/ and 02-agents/resources/ since active
samples reference them.
…plicates

- Fix type annotation in 04_memory.py (string union -> proper types)
- Fix old sample paths in observability files
- Fix grammar/spelling in observability samples
- Move sample_assets/ and resources/ to shared/ folder
- Remove 8 duplicate observability files from 02-agents root
- Update resource path references in multimodal_input and provider samples
- Update relative paths in READMEs: getting_started/ → 01-get-started/,
  02-agents/, 03-workflows/, 04-hosting/, 05-end-to-end/
- Fix absolute GitHub URLs in package READMEs
- Fix broken link in ollama package README
Absolute URLs to python/samples/ on main branch 404 until PR merges.
Converted to relative paths that linkspector can verify locally.
@eavanvalkenburg eavanvalkenburg force-pushed the restructure/python-samples branch from dc6a8a5 to 31f023a Compare February 12, 2026 15:50
@eavanvalkenburg eavanvalkenburg added this pull request to the merge queue Feb 12, 2026
Merged via the queue into microsoft:main with commit a2856d3 Feb 12, 2026
28 of 29 checks passed
@eavanvalkenburg eavanvalkenburg deleted the restructure/python-samples branch June 30, 2026 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs python Usage: [Issues, PRs], Target: Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants