Skip to content

Conversation

@msftairaamane
Copy link
Collaborator

Add Python Claude Agent SDK Sample

Summary

This PR adds a new sample agent implementation using Anthropic's Claude Agent SDK with extended thinking capabilities, providing an alternative AI framework option alongside the existing samples.

  • Claude Agent SDK Integration - Uses claude-sonnet-4-20250514 with extended thinking
  • Built-in Tools - Read, Write, WebSearch, Bash, Grep (no MCP setup yet)
  • Notification Support - Full @mention handling from Outlook, Word, and Teams
  • Observability Support
  • Dual Authentication - Anonymous mode for testing, agentic mode for production
  • Extended Thinking - Transparency into AI reasoning process

Files Added

Core: agent.py, host_agent_server.py, start_with_generic_host.py, agent_interface.py, local_authentication_options.py, observability_helpers.py, token_cache.py

Docs: README.md, AGENT-CODE-WALKTHROUGH.md, PARITY_ANALYSIS.md, NOTIFICATION_IMPLEMENTATION.md

Config: pyproject.toml, .env.template, ToolingManifest.json

Quick Start

npm install -g @anthropic-ai/claude-code && claude login
cp .env.template .env  # Add ANTHROPIC_API_KEY
uv venv && uv pip install -e .
uv run python start_with_generic_host.py

Testing

  • ✅ Server starts on http://localhost:3978
  • ✅ Extended thinking visible in responses
  • ✅ Notifications route correctly (both channels)
  • ✅ Built-in tools work (Read, Write, WebSearch, Bash, Grep)

Breaking Changes

None - new sample addition.

Future Work

  • P0: MCP support for Mail/Calendar/SharePoint tools
  • P1: Auto-instrumentation when SDK supports it
  • P2: Adaptive cards, response streaming

pontemonti and others added 20 commits November 5, 2025 10:19
* Added CODEOWNERS

* Added .gitignore

---------

Co-authored-by: Johan Broberg <johanb@microsoft.com>
Co-authored-by: Johan Broberg <johanb@microsoft.com>
Co-authored-by: Johan Broberg <johanb@microsoft.com>
Co-authored-by: Jesus Terrazas <jterrazas@microsoft.com>
Co-authored-by: Johan Broberg <johanb@microsoft.com>
Co-authored-by: Jesus Terrazas <jterrazas@microsoft.com>
* Adding Python Agent Framework Sample

* update to latest

---------

Co-authored-by: Jesus Terrazas <jterrazas@microsoft.com>
Co-authored-by: Rahul Devikar <radevika@microsoft.com>
* Revise README for Agent 365 Sample Agent

Updated the README to improve clarity and correct typos. Added sections on prerequisites, running the sample, and troubleshooting.

* Update README to remove external sample reference

Removed reference to the semantic-kernel-multiturn sample.
Co-authored-by: Rahul Devikar <radevika@microsoft.com>
* update agents sdk version for langchain

* Accept more recent versions

* remove authority field, this is set by default

---------

Co-authored-by: Jesus Terrazas <jterrazas@microsoft.com>
* Adding Notifications on AF

* Update readme

* PR comments

* small fix

* removed observability

* update manifest

* changes

* setup fix
@msftairaamane msftairaamane requested a review from a team as a code owner November 11, 2025 00:37
@joaoolr1 joaoolr1 self-assigned this Nov 11, 2025
juliomenendez
juliomenendez previously approved these changes Dec 30, 2025
@pontemonti
Copy link
Contributor

Make sure you add a workflow so that this goes through build validation whenever changes are made to the sample folder.

Copy link

@nikhilNava nikhilNava left a comment

Choose a reason for hiding this comment

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

can you please review this section on observability certification?
https://learn.microsoft.com/en-us/microsoft-agent-365/developer/observability?tabs=python#validate-for-store-publishing
Please post the console output for easy verification.
matgupta@microsoft.com (PM)- Requires all the official sample apps to meet the above requirement.

@JoanBency
Copy link
Contributor

can you please review this section on observability certification? https://learn.microsoft.com/en-us/microsoft-agent-365/developer/observability?tabs=python#validate-for-store-publishing Please post the console output for easy verification. matgupta@microsoft.com (PM)- Requires all the official sample apps to meet the above requirement.

Thanks for flagging this and for sharing the link. I agree that the observability certification requirements (including console output for verification and the additional attributes needed for store publishing) are important.

For this PR, we’re keeping the current implementation as-is, since it relies on the existing observability helper and doesn’t yet follow the SDK-based approach or fully meet the store certification requirements. We already anticipate a broader change here — moving to the observability SDK and aligning with all publishing requirements — and that work is planned to be handled in a separate follow-up PR so it can be addressed holistically.

Given that, I’d like to defer these specific certification-related changes to that follow-up work rather than partially addressing them here. Please let me know if that works for you.

@JoanBency JoanBency closed this Dec 31, 2025
@JoanBency JoanBency reopened this Dec 31, 2025
@JoanBency JoanBency requested a review from nikhilNava December 31, 2025 17:22
@JoanBency JoanBency merged commit e6121da into main Jan 2, 2026
6 of 7 checks passed
@JoanBency JoanBency deleted the airaamane/claude-python branch January 2, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants