Skip to content

Codex-Backed LangChain Graph

Source:

This example demonstrates the helper-to-adapter path for LangChain:

  • codex-auth-helper builds a Codex-backed ChatOpenAI
  • langchain.agents.create_agent(...) owns the graph
  • langchain-acp exposes that graph through ACP

Run it:

uv run python -m examples.langchain.codex_graph

Required local state:

~/.codex/auth.json

If you have not logged in yet:

codex login

Install the helper with LangChain support:

uv add "codex-auth-helper[langchain]"
pip install "codex-auth-helper[langchain]"