mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
04aaf0c1fe
* Add support for the Foundry Toolbox in MAF Introduces a Foundry Toolbox integration: FoundryChatClient gains a get_toolbox() helper plus select_toolbox_tools(), normalize_tools in the core package flattens tool-collection wrappers (ToolboxVersionObject and generic iterables, while leaving Pydantic BaseModel instances alone), and the new agent_framework.foundry namespace re-exports the toolbox helpers. Ships with unit tests, a sample, and a design doc. azure-ai-projects is pinned to the public >=2.0.0,<3.0 range and the lockfile resolves from public PyPI. The toolbox test module skips when Toolbox* types are unavailable so CI stays green until the public 2.1.0 SDK lands. OMC tooling directories (.omc/, .omx/) are gitignored. * Update to latest azure ai projects package * Improve sample * Rename ADR to 0025 * Update ADR * Apply suggestion from @alliscode Co-authored-by: Ben Thomas <ben.thomas@microsoft.com> * Improve samples * Update test --------- Co-authored-by: Ben Thomas <ben.thomas@microsoft.com>
2.9 KiB
2.9 KiB
Foundry Provider Samples
This folder contains Azure AI Foundry and Foundry Local samples for Agent Framework.
FoundryAgent Samples
| File | Description |
|---|---|
foundry_agent_basic.py |
Foundry Agent basic example |
foundry_agent_custom_client.py |
Foundry Agent custom client configuration |
foundry_agent_hosted.py |
Foundry Agent for hosted agents |
foundry_agent_with_function_tools.py |
Foundry Agent with local function tools |
FoundryChatClient Samples
| File | Description |
|---|---|
foundry_chat_client.py |
Foundry Chat Client with project endpoint example |
foundry_chat_client_basic.py |
Foundry Chat Client basic example |
foundry_chat_client_code_interpreter_files.py |
Foundry Chat Client with code interpreter and files |
foundry_chat_client_image_analysis.py |
Foundry Chat Client with image analysis |
foundry_chat_client_with_code_interpreter.py |
Foundry Chat Client with code interpreter |
foundry_chat_client_with_explicit_settings.py |
Foundry Chat Client with explicit settings |
foundry_chat_client_with_file_search.py |
Foundry Chat Client with file search |
foundry_chat_client_with_function_tools.py |
Foundry Chat Client with function tools |
foundry_chat_client_with_hosted_mcp.py |
Foundry Chat Client with hosted MCP |
foundry_chat_client_with_local_mcp.py |
Foundry Chat Client with local MCP |
foundry_chat_client_with_session.py |
Foundry Chat Client with session management |
foundry_chat_client_with_toolbox.py |
Foundry Chat Client with Foundry toolbox loading and multi-toolbox composition |
foundry_chat_client_with_toolbox_mcp.py |
Foundry Chat Client connected to a toolbox via its MCP endpoint using MCPStreamableHTTPTool |
FoundryLocalClient Samples
Prerequisites
-
Install Foundry Local and required local runtime components.
-
Install the connector package:
pip install agent-framework-foundry-local --pre
| File | Description |
|---|---|
foundry_local_agent.py |
Basic Foundry Local agent usage with streaming and non-streaming responses, plus function tool calling. |
Environment Variables
FOUNDRY_LOCAL_MODEL: Optional model alias/ID to use by default whenmodelis not passed toFoundryLocalClient.