Registry / azure / agent-framework-foundry

agent-framework-foundry

JSON →
library1.3.0pypypi✓ verified 83d ago

Microsoft Foundry integrations for the Microsoft Agent Framework. Version 1.3.0 supports Python >=3.10. This library provides bindings and utilities to deploy, trace, and manage agents using Azure AI Foundry (formerly Azure AI Studio).

pip install agent-framework-foundry
INSTALL
IMPORT
SIG · AGENT-FRAMEWORK-FO
A
agent-framework-foundry
azurepythonv1.3.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

FoundryAgent
from agent_framework_foundry import FoundryAgent
from agent_framework import FoundryAgent
Library name hyphenated, package uses underscores.
AgentFrameworkClient
from agent_framework_foundry.client import AgentFrameworkClient
from agent_framework import Client
Client class is in the client submodule.

Initialize a Foundry agent and run a simple interaction.

import os from agent_framework_foundry import FoundryAgent from agent_framework_foundry.client import AgentFrameworkClient # Use environment variable for authentication api_key = os.environ.get('FOUNDRY_API_KEY', '') client = AgentFrameworkClient(api_key=api_key) agent = FoundryAgent( name="my-agent", instructions="You are a helpful assistant.", tools=[] ) response = client.run(agent=agent, input="Hello, world!") print(response)
Debug
Known issues
breakingIn version 1.0.0, the 'run' method signature changed: the 'input' parameter is now the second positional argument instead of a keyword-only argument. Update calls to 'client.run(agent, input=...) to 'client.run(agent, input=...)' only if using positional; keyword still works.
fix
Ensure you pass 'input' as a keyword argument or second positional arg.
affects: >=1.0.0
gotchaThe 'tools' parameter in FoundryAgent expects a list of tool definitions, not function references. Many users mistakenly pass Python functions. You must wrap functions with a Tool schema.
fix
Use the provided 'Tool' type from 'agent_framework_foundry.models' to define tools.
affects: all
deprecatedThe 'AgentFrameworkClient' class constructor parameter 'base_url' is deprecated in 1.3.0; use 'endpoint' instead. 'base_url' will be removed in 2.0.0.
fix
Replace 'base_url' with 'endpoint'.
affects: >=1.3.0 <2.0.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'agent_framework'
Trying to import the library with hyphens or as 'agent-framework-foundry' directly.
fix
Use 'from agent_framework_foundry import ...' with underscores.
TypeError: AgentFrameworkClient.__init__() got an unexpected keyword argument 'api_key'
Some versions expect 'credential' parameter instead of 'api_key'. The library uses Azure authentication by default.
fix
Use 'credential' or set environment variables. For API key, use 'from agent_framework_foundry.auth import ApiKeyCredential' and pass 'credential=ApiKeyCredential(api_key)'.
AttributeError: 'FoundryAgent' object has no attribute 'run'
The 'run' method is on the client, not on the agent object.
fix
Call 'client.run(agent=agent, input=...)' instead of 'agent.run(...)'.
Upgrade
Version history
1.3.0latest on PyPI · released May 8, 2026
Audit
Dependencies
openairequiredCore dependency for agent runtime
azure-identityoptionalAuthentication for Azure services
azure-ai-foundryoptionalAzure AI Foundry SDK for deployment
Agent activity
86 hits · last 30 days
node
74
Bingbot
1
OpenAI (training)
1
Resources
agent-framework-foundry — pip install agent-framework-foundry · libregistry