Skip to content

Automated sync from private repo (2026-06-24)#789

Merged
foundry-samples-repo-sync[bot] merged 4 commits into
mainfrom
sync/private-to-public-20260624-071851
Jun 24, 2026
Merged

Automated sync from private repo (2026-06-24)#789
foundry-samples-repo-sync[bot] merged 4 commits into
mainfrom
sync/private-to-public-20260624-071851

Conversation

@foundry-samples-repo-sync

Copy link
Copy Markdown
Contributor

Automated sync from private repo.

Synced commits: 4
Authors: Hui Miao,Linda Li Mohit Pavan Kumar Gadamsetty

Validation gate: mode=none; tracked=47; blocked=11.

Rollback point: ae60814c3ef01078f43619c27249e914d5de5fb6 — to revert, force-push this SHA to main and clear the sync-marks cache.

Triggered by: schedule
Run: https://github.com/microsoft-foundry/foundry-samples-pr/actions/runs/28082022768

lindazqli and others added 4 commits June 23, 2026 20:43
…esponses) (#570)

* samples(python/hosted-agents): add Foundry IQ knowledge base agent (Responses)

Add an Agent Framework hosted-agent sample that answers questions from a
Foundry IQ knowledge base (Azure AI Search agentic retrieval), reached
through a Foundry Toolbox using the agent's managed identity (Agentic
Identity) for keyless Entra ID auth.

- provision_kb.py: creates the search index, knowledge source, and knowledge
  base (answer synthesis via a keyless Azure OpenAI model) and prints the KB
  MCP endpoint.
- main.py: FoundryChatClient + MCPStreamableHTTPTool over the toolbox; injects
  a fresh bearer token and the Toolboxes=V1Preview feature header.
- agent.manifest.yaml: RemoteTool connection (AgenticIdentity) + toolbox
  exposing the knowledge_base_retrieve MCP tool.
- README with azd and VS Code (Foundry Toolkit) quick starts and RBAC table.

Validated end-to-end on a Foundry project: deploy -> grant Search Index Data
Reader -> grounded, cited answers from the knowledge base.

* samples(python/foundry-iq): use TOOLBOX_ENDPOINT env var instead of TOOLBOX_NAME

Align with the sibling 04-foundry-toolbox sample: the agent reads the full
toolbox MCP endpoint from TOOLBOX_ENDPOINT, falling back to building it from
FOUNDRY_PROJECT_ENDPOINT + TOOLBOX_NAME. Update main.py, agent.manifest.yaml,
agent.yaml, .env.example, and the README accordingly.

* samples(python/foundry-iq): create connection + toolbox via azd ai CLI

Match the sibling 04-foundry-toolbox pattern instead of declaring the
connection/toolbox as manifest resources (the manifest's AgenticIdentity
connection block hits the azd Bicep authType mapping). The manifest now only
declares the model resource; a new toolbox.yaml defines the KB MCP tool, and
the README walks through 'azd ai connection create' + 'azd ai toolbox create'.

* samples(python/foundry-iq): drop dead TOOLBOX_NAME fallback

TOOLBOX_ENDPOINT is now the single source for the toolbox MCP endpoint; the
sample never sets TOOLBOX_NAME, and the old URL-deriving fallback produced the
version number as the tool name for versioned endpoints. Require TOOLBOX_ENDPOINT
and use a stable 'knowledge_base' tool name.

* samples(python/foundry-iq): one-command provisioning via azd postprovision hook

Add hooks/postprovision.{sh,ps1} that run provision_kb.py, create the
knowledge-base-mcp connection and knowledge-base toolbox, and set
TOOLBOX_ENDPOINT, so a single azd provision does all the manual steps.
provision_kb.py now stores the KB MCP endpoint as KB_MCP_ENDPOINT in the azd
env (best-effort). README documents wiring the hook into azure.yaml, with the
manual flow kept as a fallback.

* samples(python/foundry-iq): add server_url to toolbox MCP tool

The MCP tool needs server_url pointing at the knowledge base's MCP endpoint
alongside project_connection_id (which supplies Agentic Identity auth), matching
the connection+server_url pattern used by the other toolbox samples. toolbox.yaml
uses a \ placeholder that the postprovision hook substitutes
before azd ai toolbox create.

* Fix Foundry IQ KB postprovision hooks: idempotent, self-locating, .yaml temp file

* Exclude foundry-iq-knowledge-base from cloud e2e (requires external provisioning)

The sample's postprovision hook provisions an Azure AI Search KB and creates the knowledge-base toolbox/TOOLBOX_ENDPOINT. The generic Cloud E2E harness never runs the hook, leaving TOOLBOX_ENDPOINT empty so main.py raises ValueError on startup and every invoke returns HTTP 500. Add .ci-skip per the documented requires-external-credentials opt-out.

* Rename foundry-iq sample to 17-foundry-iq-toolbox so cloud e2e injects a real toolbox endpoint

The Cloud E2E harness only injects a pre-provisioned TOOLBOX_ENDPOINT (from TOOLBOX_ENDPOINT_NCUS) into samples it classifies as toolbox samples, which it detects by the substring 'toolbox' in the path. The previous name left TOOLBOX_ENDPOINT empty so main.py raised ValueError and every invoke returned HTTP 500. Renaming to include 'toolbox' opts the sample into the toolbox-endpoint matrix expansion (same path as the passing 04-foundry-toolbox sibling); drop the .ci-skip and fix the README init path.

* Update README azd init path to 17-foundry-iq-toolbox

The rename commit moved README.md but a failed multi-pathspec git add dropped the in-file path edit, so line 66 still referenced the old 17-foundry-iq-knowledge-base directory. Point it at 17-foundry-iq-toolbox.

* Fall back to FOUNDRY_PROJECT_ENDPOINT/TOOLBOX_NAME when TOOLBOX_ENDPOINT is unset

* Use narrow agent-framework-foundry subpackages; keep strict TOOLBOX_ENDPOINT (e2e provides it)

* Cloud E2E: pin 17-foundry-iq-toolbox to the foundry-iq-kb knowledge toolbox

* ci(hosted-agents): scope foundry-iq-kb toolbox to sample 17 only
…ostprovision hook (#576)

Add a postprovision hook (.ps1/.sh) that creates the Foundry Memory Store and wires MEMORY_STORE_NAME so a single 'azd provision' is enough. The hook also patches the init'd agent.yaml so the resolved store name reaches the deployed container (azd ai agent init resolves \ to empty at init time). Pin mcp<2 (agent-framework-foundry-hosting imports McpError, renamed in mcp 2.x). Document the project-scope Cognitive Services OpenAI User role needed for the embedding call. Exclude hooks/ from container/azd packaging.
* Adding BYO agent.

* Prompt updates.

* remove.

* Some changes.

* Fixing form filler prompt to base prompt.

* PR coomments and a bug fix.
@foundry-samples-repo-sync foundry-samples-repo-sync Bot merged commit d268ead into main Jun 24, 2026
7 checks passed
@foundry-samples-repo-sync foundry-samples-repo-sync Bot deleted the sync/private-to-public-20260624-071851 branch June 24, 2026 07:22
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.

3 participants