Python: add Xquik function tool sample#5890
Open
kriptoburak wants to merge 1 commit into
Open
Conversation
76e5bb9 to
9d785bd
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new Python sample demonstrating how to expose API-key backed external research calls as Agent Framework async function tools, with an offline fallback so sample validation doesn’t require secrets.
Changes:
- Added a new
xquik_function_tools.pysample implementing read-only Xquik function tools (search posts, user lookup, user posts, trends). - Implemented a “no API key” path that returns deterministic local sample data.
- Added a
tools/README.mdindexing tool samples and documenting the Xquik sample setup.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| python/samples/02-agents/tools/xquik_function_tools.py | New sample implementing Xquik-backed async @tool functions with offline sample-data fallback and a runnable main(). |
| python/samples/02-agents/tools/README.md | New README enumerating function tool samples and documenting the Xquik sample prerequisites. |
a2e9428 to
620d63a
Compare
620d63a to
45067bc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
Fixes #5792.
This adds a concrete Python function-tool sample for API-key backed external research tools. It keeps Xquik write actions out of scope and uses local sample data when
XQUIK_API_KEYis not set, so normal sample validation does not need new Xquik secrets.Description
xquik_function_tools.pyunderpython/samples/02-agents/tools/.@toolfunctions for Xquik read endpoints: post search, user lookup, user posts, and trends.FoundryChatClientwithAzureCliCredential, matching the current default sample guidance.Focused validation run locally:
poe syntaxsample check passed.xquik_function_tools.pypassed.XQUIK_API_KEYempty and verified the Xquik tools returnsample_data.04-hosting/foundry-hosted-agentsimports foragent_framework_foundry_hostingandazure.ai.agentserver.invocations; the new sample passes targeted Pyright.Contribution Checklist