Install & Compatibility
Where this runs
tested against v1.0.0b251024 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
832MB installed
● package 832MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Agent
✓ from agent_framework.core import Agent
Common core agent class
Message
✓ from agent_framework import Message
For creating messages in conversations
OpenAIChatClient
✓ from agent_framework.openai import OpenAIChatClient
Example of an LLM client, requires `agent-framework-openai` package
some_lab_module
✓ from agent_framework.lab import some_lab_module
Example import for an experimental module from the `lab` sub-package. Specific modules will vary.
This quickstart demonstrates creating a basic agent using the core Microsoft Agent Framework and an OpenAI chat client. Modules from `agent-framework-lab` would typically extend or be integrated into such agents and workflows, for example, by providing specialized tools, evaluation components, or experimental agent behaviors.
import os
from agent_framework import Message
from agent_framework.openai import OpenAIChatClient
from agent_framework.core import Agent
# Ensure your OpenAI API key is set as an environment variable
# Or, if using Azure OpenAI, set AZURE_OPENAI_ENDPOINT, AZURE_OPENAI_API_KEY, etc.
# Agent Framework does not automatically load .env files; use `load_dotenv()` if needed.
OPENAI_API_KEY = os.environ.get('OPENAI_API_KEY', '')
if not OPENAI_API_KEY:
print("Warning: OPENAI_API_KEY environment variable not set. This example may fail.")
async def main():
client = OpenAIChatClient(api_key=OPENAI_API_KEY)
# Create a simple agent
agent = Agent(
name="MyFirstAgent",
instructions="You are a helpful assistant.",
client=client
)
# Send a message to the agent
response = await agent.run(
messages=[Message("user", "Hello, how are you?")]
)
print(f"Agent: {response.content[0].text}")
if __name__ == "__main__":
import asyncio
asyncio.run(main())
Debug
Known issues
breakingThe 1.0.0 release of Microsoft Agent Framework introduced significant architectural changes, particularly around provider-leading client design, the extraction of OpenAI code from core, and standardized naming. Previous beta versions are not directly compatible.fixConsult the official migration guides (e.g., from Semantic Kernel or AutoGen) and update code to use the new API patterns, especially for `agent-framework-core`, `agent-framework-openai`, and `agent-framework-foundry`.
affects: <1.0.0
gotcha`agent-framework-lab` contains experimental modules. Features and APIs within this sub-package are subject to rapid change, may be unstable, and are not guaranteed for long-term support.fixUse these modules with caution in production environments. Pin exact versions of `agent-framework-lab` and be prepared for API changes in future updates. Monitor the GitHub repository for updates to the 'Labs directory'.
affects: All beta versions
gotchaThe Agent Framework does not automatically load environment variables from `.env` files. API keys and other configurations must be explicitly loaded or set in the environment.fixManually load `.env` files at the start of your application using `dotenv.load_dotenv()` or set environment variables directly in your shell/IDE before running your application.
affects: All versions
breakingPrior to 1.0.0, there were deprecated kwargs compatibility paths, core dependencies were heavier, and OpenAI provider implementation was bundled. These have been removed or refactored.fixReview the `agent-framework` changelog and upgrade guides. Ensure `agent-framework-core` and provider packages like `agent-framework-openai` are updated to 1.0.0 or later and adapt your code to the new, leaner core and separate provider packages.
affects: <1.0.0
Upgrade
Version history
1.0.0b251024latest on PyPI · released Oct 24, 2025
Audit
Dependencies
pythonrequiredRequired Python version
agent-framework-corerequiredCore components of the Microsoft Agent Framework