$npx skillfedfor your agent

openai-codex

Python SDK for Codex

Worth itPyPI Python ModulesReleased Jul 2026236.4K downloads / moApache-2.0Pure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — openai_codex-0.144.4-py3-none-any.whl
v0.144.4 · released 2026-07-17 · Python >=3.10 · 2 runtime deps: pydantic, openai-codex-cli-bin

Yes. The package is actively maintained, has low install friction, carries no known vulnerabilities, and is licensed permissively under Apache-2.0. Install it if you need to programmatically interact with OpenAI Codex from Python; the context-managed API and built-in authentication handling make it straightforward to integrate into applications.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.10 or later; existing Codex authentication must be available or you must authenticate via ChatGPT login, device code, or API key before running turns.
  • Low install friction with only two runtime dependencies (pydantic and openai-codex-cli-bin).
  • Active maintenance with a recent release 28 days ago and ongoing repository activity.

License · maintenance · safety

Apache-2.0 (permissive) — Licensed under Apache-2.0 (permissive), allowing commercial and private use with minimal restrictions; you may use, modify, and distribute the package freely as long as you include the license notice.

last release 2026-07-17 (28 days) · last repo commit 2026-08-14 · 105,971 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 236,449 downloads/mo, #8,984 on PyPI

Verify before relying

pip install openai-codex

from openai_codex import Codex

with Codex() as codex:
    thread = codex.thread_start()
    result = thread.run("Explain this repository in three bullets.")
    print(result.final_response)
  • Whether openai-codex-cli-bin is a system binary dependency or a Python package that must be installed separately.
  • What 'workspace access control' concretely enables—whether it restricts file/directory scope, user permissions, or something else.
  • Whether the SDK supports streaming responses in real time or only returns final results.
Same gist for agents: .md · .json

What it is and what it does

OpenAI Codex Python SDK is a client library for building applications that interact with Codex, OpenAI's code generation and understanding model. It provides a context-managed interface to start threads, execute turns (prompts), and retrieve results including final responses and token usage. The SDK handles authentication automatically when credentials are already available, and supports explicit login flows via ChatGPT browser login, device-code flow, or API key.

The package is designed for developers building AI-assisted tools and agents that need to run Codex operations programmatically. It depends on pydantic for data validation and openai-codex-cli-bin for underlying binary support. The SDK is actively maintained, recently released, and carries no known vulnerabilities.

Use it for

  • Build an automated code review tool that uses Codex to analyze and explain repository structure and code patterns.
  • Create an AI agent that generates or refactors code by running Codex turns in response to user prompts.
  • Integrate Codex into a development IDE or editor plugin to provide inline code explanations and suggestions.
  • Batch-process multiple code repositories to extract summaries, documentation, or architectural insights.
  • Implement multi-turn conversations with Codex where each turn builds on previous context and results.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

The package is actively maintained, has low install friction, carries no known vulnerabilities, and is licensed permissively under Apache-2.0. Install it if you need to programmatically interact with OpenAI Codex from Python; the context-managed API and built-in authentication handling make it straightforward to integrate into applications.

Install

openai-codex on PyPI

Before you install

Low install friction with only two runtime dependencies (pydantic and openai-codex-cli-bin). Active maintenance with a recent release 28 days ago and ongoing repository activity.

Requires Python 3.10 or later; existing Codex authentication must be available or you must authenticate via ChatGPT login, device code, or API key before running turns.

License in practice

Licensed under Apache-2.0 (permissive), allowing commercial and private use with minimal restrictions; you may use, modify, and distribute the package freely as long as you include the license notice.

Quickstart

pip install openai-codex

from openai_codex import Codex

with Codex() as codex:
    thread = codex.thread_start()
    result = thread.run("Explain this repository in three bullets.")
    print(result.final_response)

Verify before relying

  • Whether openai-codex-cli-bin is a system binary dependency or a Python package that must be installed separately.
  • What 'workspace access control' concretely enables—whether it restricts file/directory scope, user permissions, or something else.
  • Whether the SDK supports streaming responses in real time or only returns final results.

Package facts

LicenseApache-2.0 permissive
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
2 packages
pydanticopenai-codex-cli-bin
MaintenanceActively maintained 28 days since the last release
Last repo commit
First released
Downloads236,449 / month, #8,984 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableIntended Audience :: DevelopersTopic :: Software Development :: Libraries :: Python Modules

Evidence: openai_codex-0.144.4-py3-none-any.whl

Tags

Capabilities
openai codex python sdkcodex thread managementllm agent framework pythoncodex authentication sdkai workspace control library
Topics
llm-sdkcode-generationai-agents
PyPI keywords
codexsdkllmaiagents

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “openai codex python sdk”

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also openai-codex-cli-bin · openhands-workspace · openai-agents · openhands-sdk · openhands-tools · opentelemetry-instrumentation-openai-agents · portkey-ai · llama-index-llms-openai · composio-openai-agents · langgraph-sdk