Add sample for running a Prompt Agent with WebIQ preview tool - #48935
Add sample for running a Prompt Agent with WebIQ preview tool#48935Howie Leung (howieleung) wants to merge 3 commits into
Conversation
|
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. |
There was a problem hiding this comment.
🟡 Changes recommended
The new sample is auto-discovered by existing sample tests but introduces new required env vars (and an interactive input() fallback) that are not currently provisioned by the test harness, so CI sample execution is likely to fail/hang.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds a new azure-ai-projects sample demonstrating how to run a Prompt Agent using the WebIQ preview tool via the synchronous client APIs.
Changes:
- Introduces a new agent sample
sample_agent_web_iq.pyundersamples/agents/tools/showingWebIQPreviewToolusage. - Uses
AIProjectClient(..., allow_preview=True)andget_openai_client(...).responses.create(...)to execute the agent with the WebIQ tool enabled.
File summaries
| File | Description |
|---|---|
| sdk/ai/azure-ai-projects/samples/agents/tools/sample_agent_web_iq.py | New sample demonstrating Prompt Agent + WebIQ preview tool execution with a sync client |
Review details
Suppressed comments (1)
sdk/ai/azure-ai-projects/samples/agents/tools/sample_agent_web_iq.py:62
- Using input() as a fallback can hang automated executions (including sample test runs) when WEB_IQ_USER_INPUT isn't set; prefer a deterministic default prompt instead of interactive input.
user_input = os.environ.get("WEB_IQ_USER_INPUT") or input("Enter your question:\n")
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
[Pilot] PR Pipeline Failure AnalysisWhat failedAzure Pipeline build 6800209 (public, result: Test failure consistent across every platform/artifact reported (macos311, ubuntu2404_310, ubuntu2404_310_coverage, Ubuntu2404_313, Ubuntu2404_314; both sdist and whl):
Relevant pipeline outputThis PR adds a new sample ( Recommended next steps
|
There was a problem hiding this comment.
🟢 Approval recommended
The changes are additive, consistent with existing sample patterns, and appear correctly integrated with the existing sample test env-var mapping.
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 0 new
- Review effort level: Lite
There was a problem hiding this comment.
🟢 Approval recommended
The new sample matches existing sample/test patterns in the package, and the supporting env/test/version/changelog updates are consistent and complete.
Review details
- Files reviewed: 6/6 changed files
- Comments generated: 0 new
- Review effort level: Lite
Description
Please add an informative description that covers that changes made by the pull request and link all relevant issues.
If an SDK is being regenerated based on a new API spec, a link to the pull request containing these API spec changes should be included above.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines