Registry / llm-agents / agent-framework-openai

agent-framework-openai

JSON →
library1.3.0pypypiunverified

Provides OpenAI model integrations for the Microsoft Agent Framework. Current version 1.3.0, weekly releases on PyPI. Requires Python >=3.10.

pip install agent-framework-openai
INSTALL
IMPORT
SIG · AGENT-FRAMEWORK-OP
A
agent-framework-openai
llm-agentspythonv1.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.

OpenAIAgent
from agent_framework_openai import OpenAIAgent
from agent_framework_openai.agents import OpenAIAgent
Before v1.0.0 the correct import was from a submodule. Now it's directly from the top-level package.
OpenAIToolSet
from agent_framework_openai import OpenAIToolSet

Create an OpenAI-powered agent using the default GPT-4o model.

import os from agent_framework_openai import OpenAIAgent agent = OpenAIAgent( api_key=os.environ.get('OPENAI_API_KEY', ''), model='gpt-4o' ) response = agent.run("Hello") print(response)
Debug
Known issues
breakingBreaking change: In v1.0.0 the OpenAIAgent constructor changed from accepting `openai_api_key` to `api_key`. Existing code using the old parameter name will fail.
fix
Replace `openai_api_key=...` with `api_key=...` when initializing OpenAIAgent.
affects: <1.0.0
deprecatedDeprecated: `agent_framework_openai.tools` submodule is deprecated; use `agent_framework_openai.ToolSet` directly.
fix
Replace `from agent_framework_openai.tools import ToolSet` with `from agent_framework_openai import ToolSet`.
affects: >=1.2.0,<2.0.0
gotchaThe library only supports OpenAI models; attempting to pass a non-OpenAI model will raise a ValueError. Common mistake: using model names like 'gpt-3.5-turbo-instruct' which are not supported by the ChatCompletion endpoint.
fix
Use models from the Chat Completions API (e.g., gpt-4, gpt-4o, gpt-3.5-turbo).
affects: all
Upgrade
Version history
1.3.0latest on PyPI · released May 8, 2026
Audit
Dependencies
openairequiredRequired for OpenAI API calls
agent-framework-corerequiredCore library providing base classes (Agent, Tool, etc.)
Agent activity
48 hits · last 30 days
node
40
OpenAI (training)
1
Resources
agent-framework-openai — pip install agent-framework-openai · libregistry