Skip to main content
Codex support is experimental. The integration works but may have rough edges.

Codex Integration

Codex is OpenAI’s CLI for coding with GPT models. AgentLogs provides automatic transcript capture through an MCP server integration.

Features

  • Automatic capture - Transcripts are uploaded after each agent response
  • Background service - Watches sessions and handles uploads automatically

Installation

1. Authentication

Run the following command in the terminal:
npx agentlogs login agentlogs.ai

2. Configure MCP Server

Run the following command to add the AgentLogs MCP server:
codex mcp add agentlogs -- npx -y agentlogs mcp
Alternatively, add the following to your Codex config file (~/.codex/config.toml):
[mcp_servers.agentlogs]
command = "npx"
args = ["-y", "agentlogs", "mcp"]

How It Works

The MCP server is spawned by Codex and connects to a background service that watches ~/.codex/sessions for changes. When an agent response completes, the transcript is uploaded. The MCP server doesn’t expose any tools or prompts—it exists purely for lifecycle management. The background service shuts down automatically after all Codex sessions close.

Manual Upload

You can manually upload transcripts using the CLI:
# Interactive picker to browse and upload any transcript
npx agentlogs upload

# Filter to only Codex transcripts
npx agentlogs upload --source codex

# Upload a specific transcript file
npx agentlogs codex upload ~/.codex/sessions/2025/01/25/session-abc123.jsonl
The interactive upload command discovers transcripts from all agents and lets you pick one to upload.