Files
Eduard van Valkenburg 62e02da698 Python: update FoundryAgent for hosted agent sessions (#5447)
* fixes to FoundryAgent to connect to new hosted agents

Co-authored-by: Copilot <copilot@github.com>

* fix mypy

Co-authored-by: Copilot <copilot@github.com>

* Python: remove Foundry service session helpers

Remove the public hosted-agent service session CRUD helpers from FoundryAgent and drop the related feature-stage inventory entry.

Update the hosted-agent sample to create and delete service sessions directly through the preview AIProjectClient APIs, and tighten a few test harnesses surfaced by full workspace validation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix from merge

* fix hosted env detection

Co-authored-by: Copilot <copilot@github.com>

* reverted sample update

* fix tests and code

Co-authored-by: Copilot <copilot@github.com>

* remove aenter

* skipping some tests

Co-authored-by: Copilot <copilot@github.com>

---------

Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
62e02da698 ยท 2026-04-24 09:25:03 +00:00
History
..

Hosting agents with Foundry Hosting and the responses API

This folder contains a list of samples that show how to host agents using the responses API and deploy them to Foundry Hosting.

Sample Description
01_basic A basic example of hosting an agent with the responses API and carrying on a multi-turn conversation.
02_local_tools An example of hosting an agent with the responses API and local tools including a function tool and a local shell tool.
03_remote_mcp An example of hosting an agent with the responses API and remote MCPs, including a GitHub MCP server and a Foundry Toolbox.
04_workflows An example of hosting a workflow with the responses API.
using_deployed_agent.py Connect to the deployed basic Foundry agent with FoundryAgent, allow_preview=True, and version v2.