Skip to content

[azure-ai-projects] Add basic Agent Insights sample - #48889

Open
seangayler-msft wants to merge 1 commit into
mainfrom
sean/agent-insights-samples
Open

[azure-ai-projects] Add basic Agent Insights sample#48889
seangayler-msft wants to merge 1 commit into
mainfrom
sean/agent-insights-samples

Conversation

@seangayler-msft

@seangayler-msft seangayler-msft commented Sep 3, 2026

Copy link
Copy Markdown
Member

Description

Adds one basic synchronous Agent Insights sample for the azure-ai-projects 2.6.0 preview API.

The required Agent Insights SDK changes are available on main through #48870.

Sample behavior

  • Deletes an existing monitor for the selected test agent so an interrupted earlier run does not block the sample.
  • Creates a monitor with scheduled generation disabled.
  • Retrieves and lists the monitor.
  • Deletes the created monitor in a finally block.
  • Warns that deleting a monitor also deletes its runs, insights, and state.

No additional SDK patch is needed. The existing beta operation patch adds the Agent Insights preview feature header.

Validation

  • Black formatting check
  • Mypy check for the new sample
  • Pylint checks for the sample and test wiring
  • Sample lifecycle exercised with a fake client
  • GPT-5.6 Sol review with no actionable findings

Test note

The sample folder is registered with the sample test framework and its LLM validation mapping. Recorded execution is explicitly skipped until an HTTP recording is available.

@seangayler-msft seangayler-msft self-assigned this Sep 3, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
11 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 965d2b3b-7439-4050-b224-cd487bcbb2bc
@seangayler-msft
seangayler-msft force-pushed the sean/agent-insights-samples branch from a6a5773 to 2c62b9c Compare September 3, 2026 20:02
@seangayler-msft
seangayler-msft marked this pull request as draft September 3, 2026 20:03

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.

🟢 Approval recommended

The reviewed changes have no unresolved issues blocking approval.

Pull request overview

Adds a synchronous Agent Insights sample demonstrating a safe monitor lifecycle.

Changes:

  • Demonstrates monitor creation, retrieval, listing, and cleanup.
  • Registers sample testing and LLM validation.
  • Documents the sample in the changelog.
File summaries
File Description
sdk/ai/azure-ai-projects/tests/samples/test_samples.py Registers the sample, pending an HTTP recording.
sdk/ai/azure-ai-projects/tests/samples/llm_instructions.py Adds Agent Insights output validation mapping.
sdk/ai/azure-ai-projects/samples/agent_insights/sample_agent_insights_basic.py Implements the monitor lifecycle sample.
sdk/ai/azure-ai-projects/CHANGELOG.md Announces the new sample.
Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 0
  • Review effort level: Balanced

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@seangayler-msft
seangayler-msft marked this pull request as ready for review September 3, 2026 20:44
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
10 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants