{"id":27576,"library":"agent-framework-foundry","title":"Microsoft Agent Framework Foundry","description":"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).","status":"active","version":"1.3.0","language":"python","source_language":"en","source_url":"https://github.com/microsoft/agent-framework-foundry","tags":["microsoft","agent-framework","foundry","azure","ai"],"install":[{"cmd":"pip install agent-framework-foundry","lang":"bash","label":"PyPI install"}],"dependencies":[{"reason":"Core dependency for agent runtime","package":"openai","optional":false},{"reason":"Authentication for Azure services","package":"azure-identity","optional":true},{"reason":"Azure AI Foundry SDK for deployment","package":"azure-ai-foundry","optional":true}],"imports":[{"note":"Library name hyphenated, package uses underscores.","wrong":"from agent_framework import FoundryAgent","symbol":"FoundryAgent","correct":"from agent_framework_foundry import FoundryAgent"},{"note":"Client class is in the client submodule.","wrong":"from agent_framework import Client","symbol":"AgentFrameworkClient","correct":"from agent_framework_foundry.client import AgentFrameworkClient"}],"quickstart":{"code":"import os\nfrom agent_framework_foundry import FoundryAgent\nfrom agent_framework_foundry.client import AgentFrameworkClient\n\n# Use environment variable for authentication\napi_key = os.environ.get('FOUNDRY_API_KEY', '')\nclient = AgentFrameworkClient(api_key=api_key)\n\nagent = FoundryAgent(\n    name=\"my-agent\",\n    instructions=\"You are a helpful assistant.\",\n    tools=[]\n)\n\nresponse = client.run(agent=agent, input=\"Hello, world!\")\nprint(response)","lang":"python","description":"Initialize a Foundry agent and run a simple interaction."},"warnings":[{"fix":"Ensure you pass 'input' as a keyword argument or second positional arg.","message":"In 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.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Use the provided 'Tool' type from 'agent_framework_foundry.models' to define tools.","message":"The '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.","severity":"gotcha","affected_versions":"all"},{"fix":"Replace 'base_url' with 'endpoint'.","message":"The 'AgentFrameworkClient' class constructor parameter 'base_url' is deprecated in 1.3.0; use 'endpoint' instead. 'base_url' will be removed in 2.0.0.","severity":"deprecated","affected_versions":">=1.3.0 <2.0.0"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Use 'from agent_framework_foundry import ...' with underscores.","cause":"Trying to import the library with hyphens or as 'agent-framework-foundry' directly.","error":"ModuleNotFoundError: No module named 'agent_framework'"},{"fix":"Use 'credential' or set environment variables. For API key, use 'from agent_framework_foundry.auth import ApiKeyCredential' and pass 'credential=ApiKeyCredential(api_key)'.","cause":"Some versions expect 'credential' parameter instead of 'api_key'. The library uses Azure authentication by default.","error":"TypeError: AgentFrameworkClient.__init__() got an unexpected keyword argument 'api_key'"},{"fix":"Call 'client.run(agent=agent, input=...)' instead of 'agent.run(...)'.","cause":"The 'run' method is on the client, not on the agent object.","error":"AttributeError: 'FoundryAgent' object has no attribute 'run'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}