Registry / llm-agents / agent-framework-core

agent-framework-core

JSON →
library1.16.0pypypi✓ verified 22d ago

Microsoft Agent Framework Core (version 1.0.1) is the foundational Python package for building, orchestrating, and deploying AI agents and multi-agent workflows. It provides core abstractions and implementations, serving as the stable and production-ready base for the broader Microsoft Agent Framework which also supports .NET. The framework offers enterprise-grade multi-agent orchestration, multi-provider model support, and cross-runtime interoperability. It maintains an active development and release cadence, with version 1.0.0 released in early April 2026 and subsequent patches.

pip install agent-framework
INSTALL
IMPORT
SIG · AGENT-FRAMEWORK-CO
A
agent-framework-core
llm-agentspythonv1.16.0
Install
45.8s avg
Import
653ms
Disk
829MB
Pass rate
3/ 10
Env Coverage3 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.16.0 · 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
musl
glibc
py 3.10
✕ build_error
✓ 50.1s
py 3.11
✕ build_error
✓ 49.7s
py 3.12
✕ build_error
✓ 37.6s
py 3.13
✕ timeout
✕ timeout
py 3.9
✕ build_error
✕ build_error
829MB installed
● package 829MB
Code
Verified usage

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

Agent
from agent_framework import Agent
OpenAIChatClient
from agent_framework.openai import OpenAIChatClient
FoundryChatClient
from agent_framework.foundry import FoundryChatClient
Message
from agent_framework.core.message import Message
Message(text='...')
The `text` parameter in `Message` constructor is deprecated; use `contents=[...]` instead.

This quickstart demonstrates how to create and run a simple agent using the `agent-framework` with an OpenAI chat client. It requires setting the `OPENAI_API_KEY` environment variable. For Azure OpenAI, `AZURE_OPENAI_ENDPOINT` and `AZURE_OPENAI_DEPLOYMENT_NAME` would be needed along with Azure credentials.

import asyncio import os from agent_framework import Agent from agent_framework.openai import OpenAIChatClient async def main(): # Ensure OPENAI_API_KEY environment variable is set # For Azure OpenAI, set AZURE_OPENAI_ENDPOINT and AZURE_OPENAI_DEPLOYMENT_NAME openai_api_key = os.environ.get("OPENAI_API_KEY", "YOUR_OPENAI_API_KEY_HERE") if not openai_api_key or openai_api_key == "YOUR_OPENAI_API_KEY_HERE": print("Please set the OPENAI_API_KEY environment variable or replace the placeholder.") return try: client = OpenAIChatClient(api_key=openai_api_key) agent = Agent( client=client, name="HelloAgent", instructions="You are a friendly assistant that writes haikus about nature." ) print("\n--- Running Agent ---") result = await agent.run("Write a haiku about a blooming spring flower.") print(f"Agent Response: {result}") except Exception as e: print(f"An error occurred: {e}") print("Ensure your API key is valid and required environment variables are set for the chosen client.") if __name__ == "__main__": asyncio.run(main())
Debug
Known issues
breakingWith the 1.0.0 release, OpenAI and Azure-specific implementations and their dependencies were extracted from `agent-framework-core` into dedicated packages (e.g., `agent-framework-openai`, `agent-framework-foundry`). Users migrating from older beta versions must update their `pip install` commands and import paths accordingly.
fix
Run `pip install agent-framework` to get the metapackage, then update imports from `agent_framework.core.openai` to `agent_framework.openai` (or similar for other providers).
affects: <1.0.0
breakingThe `Message` constructor's `text` parameter is deprecated and will be removed. All message content should now be passed via the `contents` parameter.
fix
Replace `Message(text='your message')` with `Message(contents=[{'text': 'your message'}])` or similar structured content.
affects: <1.0.0
breakingDeprecated aliases `BaseContextProvider` and `BaseHistoryProvider` were removed in version 1.0.0.
fix
Update references to the new, non-aliased class names as per official documentation.
affects: <1.0.0
gotchaVersion 1.0.1 introduced a restricted unpickler for checkpoint deserialization as a security hardening. If your application stores custom types in checkpoints, you must explicitly pass their 'module:qualname' identifiers via the `allowed_checkpoint_types` constructor parameter for `FileCheckpointStorage`, otherwise loads will raise `WorkflowCheckpointException`.
fix
For custom types in checkpoints, provide `allowed_checkpoint_types=['your_module:YourCustomClass']` during storage configuration.
affects: >=1.0.1
gotchaThe `AgentSession` type in Agent Framework does not provide a built-in session deletion API. This is because not all AI providers support hosted chat history or thread deletion. If you require session deletion, you must manage and track session IDs yourself and use the specific provider's API if it supports such functionality.
fix
Maintain external tracking of session IDs and use provider-specific methods for deletion, if available.
affects: All versions
gotchaMost agent frameworks, including `agent-framework-core` when used without careful design, can struggle with consistent memory and coordination in multi-worker or parallel multi-agent setups. They often assume a single model session context, leading to inconsistencies if state isn't explicitly shared or managed centrally.
fix
Implement robust memory management strategies like centralized event logs or derived state snapshots, and design explicit coordination mechanisms for multi-agent workflows.
affects: All versions
gotchaNot all AI workflows necessitate a full agent framework. For simpler, linear tasks, direct tool-calling code can be more efficient and easier to debug. Agent frameworks provide the most value for complex scenarios involving loops, parallel specialists, or long-running persistent state.
fix
Evaluate your workflow complexity before committing to a full framework; start with simpler solutions and introduce framework elements only where clear benefits in orchestration, state management, or multi-agent coordination are observed.
affects: All versions
Upgrade
Version history
1.16.0latest on PyPI · released Aug 28, 2026
Audit
Dependencies
pythonrequiredRequired Python version
agent-framework-openaioptionalProvides OpenAI/Azure OpenAI chat client; installed with `agent-framework` metapackage.
agent-framework-foundryoptionalProvides Azure AI Foundry chat client; installed with `agent-framework` metapackage.
Agent activity
63 hits · last 30 days
node
52
Perplexity
1
OpenAI (training)
1
Resources
agent-framework-core — pip install agent-framework-core · libregistry