With Private AI Proxy
- Install Private AI Proxy, choose a Phala profile, sign in, and turn on Protected.
- On the Agents screen, connect Codex and pick a model from the verified catalog.
- Start
codex.
~/.codex/config.toml that points at its local API with an
agent-scoped token, and restores the file when you disconnect or stop Protected.
From the CLI, the same connection is:
Without the Proxy
Create a key under Private AI → API Keys in the Phala dashboard. Add Phala as a custom provider in the user-level configuration; Codex ignoresmodel_provider
and model_providers in a project-local .codex/config.toml.
~/.codex/config.toml
GET /v1/models; choose one that declares tools.
This path does not verify attestation locally; use Private AI Proxy or the TypeScript ACI Verifier. Every model on this endpoint runs in a TEE.
Check the Connection
Startcodex and run one bounded tool task. With the Proxy, the provider in config.toml points
at http://127.0.0.1:4180/v1; without it, at https://inference.phala.com/v1.

