{"id":4869,"library":"agent-framework-core","title":"Microsoft Agent Framework Core","description":"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.","status":"active","version":"1.0.1","language":"en","source_language":"en","source_url":"https://github.com/microsoft/agent-framework","tags":["ai-agents","microsoft","agent-framework","orchestration","llm","multi-agent","python"],"install":[{"cmd":"pip install agent-framework","lang":"bash","label":"Recommended installation (includes core and common providers)"}],"dependencies":[{"reason":"Required Python version","package":"python","version":">=3.10"},{"reason":"Provides OpenAI/Azure OpenAI chat client; installed with `agent-framework` metapackage.","package":"agent-framework-openai","optional":true},{"reason":"Provides Azure AI Foundry chat client; installed with `agent-framework` metapackage.","package":"agent-framework-foundry","optional":true}],"imports":[{"symbol":"Agent","correct":"from agent_framework import Agent"},{"symbol":"OpenAIChatClient","correct":"from agent_framework.openai import OpenAIChatClient"},{"symbol":"FoundryChatClient","correct":"from agent_framework.foundry import FoundryChatClient"},{"note":"The `text` parameter in `Message` constructor is deprecated; use `contents=[...]` instead.","wrong":"Message(text='...')","symbol":"Message","correct":"from agent_framework.core.message import Message"}],"quickstart":{"code":"import asyncio\nimport os\nfrom agent_framework import Agent\nfrom agent_framework.openai import OpenAIChatClient\n\nasync def main():\n    # Ensure OPENAI_API_KEY environment variable is set\n    # For Azure OpenAI, set AZURE_OPENAI_ENDPOINT and AZURE_OPENAI_DEPLOYMENT_NAME\n    openai_api_key = os.environ.get(\"OPENAI_API_KEY\", \"YOUR_OPENAI_API_KEY_HERE\")\n\n    if not openai_api_key or openai_api_key == \"YOUR_OPENAI_API_KEY_HERE\":\n        print(\"Please set the OPENAI_API_KEY environment variable or replace the placeholder.\")\n        return\n\n    try:\n        client = OpenAIChatClient(api_key=openai_api_key)\n        agent = Agent(\n            client=client,\n            name=\"HelloAgent\",\n            instructions=\"You are a friendly assistant that writes haikus about nature.\"\n        )\n        print(\"\\n--- Running Agent ---\")\n        result = await agent.run(\"Write a haiku about a blooming spring flower.\")\n        print(f\"Agent Response: {result}\")\n\n    except Exception as e:\n        print(f\"An error occurred: {e}\")\n        print(\"Ensure your API key is valid and required environment variables are set for the chosen client.\")\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n","lang":"python","description":"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."},"warnings":[{"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).","message":"With 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.","severity":"breaking","affected_versions":"<1.0.0"},{"fix":"Replace `Message(text='your message')` with `Message(contents=[{'text': 'your message'}])` or similar structured content.","message":"The `Message` constructor's `text` parameter is deprecated and will be removed. All message content should now be passed via the `contents` parameter.","severity":"breaking","affected_versions":"<1.0.0"},{"fix":"Update references to the new, non-aliased class names as per official documentation.","message":"Deprecated aliases `BaseContextProvider` and `BaseHistoryProvider` were removed in version 1.0.0.","severity":"breaking","affected_versions":"<1.0.0"},{"fix":"For custom types in checkpoints, provide `allowed_checkpoint_types=['your_module:YourCustomClass']` during storage configuration.","message":"Version 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`.","severity":"gotcha","affected_versions":">=1.0.1"},{"fix":"Maintain external tracking of session IDs and use provider-specific methods for deletion, if available.","message":"The `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.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Implement robust memory management strategies like centralized event logs or derived state snapshots, and design explicit coordination mechanisms for multi-agent workflows.","message":"Most 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.","severity":"gotcha","affected_versions":"All versions"},{"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.","message":"Not 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.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-12T00:00:00.000Z","next_check":"2026-07-11T00:00:00.000Z"}