Set up Respan
Set up Respan
- Sign up — Create an account at platform.respan.ai
- Create an API key — Generate one on the API keys page
- Add credits or a provider key — Add credits on the Credits page or connect your own provider key on the Integrations page
Use AI
Use AI
Add the Docs MCP to your AI coding tool to get help building with Respan. No API key needed.
What is Codex CLI?
Codex CLI is OpenAI’s open-source coding agent that runs in the terminal. It can reason about your codebase, make file edits, execute shell commands, and handle multi-step coding tasks autonomously.Setup
Prerequisite: Codex CLI must be installed before integrating with Respan.
Use Codex CLI normally
View your traces
Open the Traces page to see your Codex CLI conversations with full hierarchy — reasoning, tool calls, and responses.
Configuration
Customize the integration with flags:| Flag | Env var | Default | Description |
|---|---|---|---|
--global | — | Both | Write user-level global config (~/.codex/config.toml). |
--local | — | Both | Write per-project config (.codex/respan.json). |
--customer-id | RESPAN_CUSTOMER_ID | — | Customer/user identifier for traces. |
--project-id | RESPAN_PROJECT_ID | — | Respan project ID. |
--span-name | — | codex-cli | Root span name. |
--workflow-name | — | codex-cli | Workflow name for traces. |
--attrs | — | — | Custom attributes JSON (e.g. '{"env":"prod"}'). |
--base-url | RESPAN_BASE_URL | https://api.respan.ai/api | Respan API base URL. |
--dry-run | — | — | Preview changes without writing files. |
Captured Data
| Data | Description |
|---|---|
| User prompt | The user’s input text |
| Assistant response | Codex CLI’s final response |
| Thinking blocks | Reasoning content |
| Tool calls | Tool name, input, and output (file operations, shell commands, etc.) |
| Token usage | Input, output, and cache tokens (when available) |
| Timing | Start time, end time, latency |
| Model | Model name used (e.g. codex-mini, o4-mini) |
Span Types
| Span | log_type | Description |
|---|---|---|
| Root | agent | The complete conversation turn |
| Thinking | generation | Reasoning blocks |
| Tool | tool | Tool invocations (file reads, writes, shell commands, etc.) |