pycodex
A Python implementation of the Codex coding agent with a built-in browser workspace, live HTML Canvas, multi-provider support, and a full CLI & Python SDK.
Quick start
python3 -m pip install --upgrade pycodex-ws
pycodex-ws
Open http://127.0.0.1:6007 and click Create workspace — everything else happens
in the browser.
- Already using Codex CLI? Zero setup required.
pycodex-wsautomatically inherits~/.codex/config.toml,~/.codex/.env,AGENTS.md, skills, and~/.codex/sessions. - First time without Codex? Add
~/.codex/config.tomlwithmodel = "gpt-5.4"and setOPENAI_API_KEY(in your shell or~/.codex/.env), or ask any coding agent to follow config_examples/ with your endpoint and key. - Terminal-only? Run
pycodexin your project directory (or install justpython-codexfor Python 3.6.2+ CLI & API without the web UI).
Highlights
- Drop-in Codex compatibility — shares
~/.codexconfig,AGENTS.md, skills, and saved sessions; supports mid-turn steering,/queue, sub-agents, and auto-compaction. - Multi-provider & multi-harness — works with OpenAI Responses, Chat Completions
(StepFun, vLLM, gateways), Claude Messages, and Gemini API, plus the
pyagy(Antigravity CLI wire-compatible) harness; switch profiles per session in the browser without restarting. - Live HTML Canvas & code/diff viewers — agents render interactive HTML reports,
charts, and dashboards alongside chat; inspect files, Markdown, images, and Git diffs,
quote code back with Insert into chat, or use embedded VS Code (
--password). - Self-customizing UI (
Customize Agent) — open Settings → Customize Agent to install optional frontend features (e.g.@/$skill completion, file uploads, voice input) or tailor CSS/JS through conversation, with safe?builtin=1fallback. - Multi-device Router & Peer Profiles — connect multiple machines into one
pycodex-routerdirectory, share workspaces by password, run tools locally while borrowing another verified node's model profiles (API keys never leave the peer), and upgrade running nodes in place via Settings → Update & reboot. - External Call, Feishu & Portable config — bridge a remote client terminal into a
Web session (External Call), chat from Feishu cards (
/link), or transfer encrypted config and skills across machines (pycodex --put/--call).
Let the agent handle advanced setup
Instead of manually editing config files or memorizing flags, open a browser session and ask the agent:
- Add another model / provider (Claude, Gemini, StepFun,
pyagy, vLLM):Follow
config_examples/README.mdto add a new profile using my endpoint and API key, then verify it withpycodex doctor. - Customize the web UI: Click Settings → Customize Agent, browse the built-in feature catalog, and tell the agent what to enable or change.
- Set up multi-device router, sharing, External Call, or Feishu:
Follow
packages/pycodex-ws/README.mdto configurepycodex-router/ Feishu/link/ workspace sharing for me.
CLI & Python API
pycodex # interactive terminal session
pycodex "Summarize this repo." # single task
pycodex doctor # check config and connectivity
Minimal Python API example
from contextlib import closing
from pycodex import AgentsManager, CodexConfig
from pycodex.bootstrap import build_model
from pycodex.utils.async_bridge import run_async
async def main():
config = CodexConfig.from_env()
with closing(build_model(config.provider)) as model:
runtime = AgentsManager(
model.client, config.context,
).create_root_runtime()
try:
await runtime.start()
receipt = await runtime.submit_input("Summarize this repository.")
print((await receipt.future).output_text)
finally:
await runtime.close()
run_async(main())
Packages & docs
| Package | Includes | Python |
|---|---|---|
pycodex-ws |
Browser workspace, router, optional Feishu, plus matching python-codex & pyagy (guide) |
3.7+ |
pyagy |
Core plus Antigravity CLI (agy) wire-compatible harness (guide) |
3.7+ |
python-codex |
Core CLI, Python API, and Responses compatibility server | 3.6.2+ |
- Setup & usage: config templates · configuration & profiles · Responses compat server · Portable transfer
- Architecture & development: upstream alignment · runtime contracts · workspace API · AGENTS.md · tests
env -u VIRTUAL_ENV uv sync --dev
env -u VIRTUAL_ENV uv run --dev pytest
Metadata
Release files for python-codex 0.7.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| python_codex-0.7.5.tar.gz | 368.9 kB | With provenance | Details for python_codex-0.7.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| python_codex-0.7.5-py3-none-any.whl | Python 3 | none | any | Details for python_codex-0.7.5-py3-none-any.whl |
Total release size: 777.8 kB
Release files / python_codex-0.7.5.tar.gz
| Download URL | python_codex-0.7.5.tar.gz |
|---|---|
| Size | 368.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5f604fd0fe9ae1eb41b4eacb80a6cc442b1a968678092f8afbcb7bf2bb973811
|
|
BLAKE2b-256 checksum How to use checksums |
15dca1dd87e5ee2ceb44f57db5d0ed55de4498d32ea118e3ee0f02a14e1daf90
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logRelease files / python_codex-0.7.5-py3-none-any.whl
| Download URL | python_codex-0.7.5-py3-none-any.whl |
|---|---|
| Size | 408.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0695d70dc5278a3fc106fb16b67868bf124c890d16e24b9ef6e58c4647a9b2e8
|
|
BLAKE2b-256 checksum How to use checksums |
af9efa1686e3da9d90ee02c09ee9837f9d5dbdae5f7cedb529b36ab726297b37
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logSecurity for python-codex 0.7.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for python_codex-0.7.5.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.