Agent Log Server
A FastAPI server with a fastcore.xml-generated UI for AI agent orchestration and conversation management. The primary feature is the Codex Agent UI — a web-based interface for interacting with OpenAI's codex-app-server CLI.
Device Litmus (Symlink-Resolved CWD)
- Date:
2026-02-26 - Logical CWD (
pwd):/data/data/com.termux/files/home/mrselect6/worktrees/agent_log_server - Physical CWD (
pwd -P/readlink -f .):/data/data/com.termux/files/home/agent_log_server
This repo is confirmed to run from a symlinked worktree path on this device. Any new IPC/transport features should treat path identity canonically (resolved path) when deriving socket paths, locks, and process-group keys.
Codex Agent UI (/)
The main feature is a rich conversational interface mounted at /. It acts as a bridge and UI layer between the codex-app-server binary and a web frontend.
- Canonical app UI:
/ - Legacy agent log page:
/agent-log - Compatibility redirect:
/codex-agent→/
Architecture
┌─────────────────────────────────────────────────────────────────────┐
│ Web Browser (Frontend) │
│ - Dumb renderer (displays what backend tells it) │
│ - WebSocket client for real-time updates │
│ - REST client for actions (send message, approve, etc.) │
└──────────────────────────────┬──────────────────────────────────────┘
│ WebSocket (events) + REST (actions)
▼
┌─────────────────────────────────────────────────────────────────────┐
│ Python Server (`agent_log_server/server.py`) │
│ - Translates codex events → frontend-friendly format │
│ - Manages conversation state (SSOT sidecar) │
│ - Stores internal transcript (richer than rollout) │
│ - Handles approvals, settings, conversation switching │
└──────────────────────────────┬──────────────────────────────────────┘
│ stdin/stdout (JSON-RPC)
▼
┌─────────────────────────────────────────────────────────────────────┐
│ codex-app-server (Rust binary) │
│ - Manages conversations with OpenAI API │
│ - Executes tools (shell commands, file edits) │
│ - Emits events via stdout (JSON-RPC notifications) │
│ - Writes rollout logs to ~/.codex/sessions/ │
└─────────────────────────────────────────────────────────────────────┘
Key Features
- Streaming responses with markdown rendering
- Approval workflow for file changes and shell commands
- Conversation management with persistence
- File mentions via
@autocomplete (Tribute.js) - Direct shell execution with
!prefix - Model/effort selection with dynamic dropdowns
- Context window tracking with token usage display
- Rollout loading — resume conversations from
~/.codex/sessions/rollout logs - PWA support — installable as a standalone app
Progressive Web App (PWA)
The Codex Agent UI is a full PWA with:
- Web App Manifest (
/manifest.json) — enables "Add to Home Screen" on mobile and desktop - Service Worker (
/sw.js) — caches static assets for offline access - Standalone display — runs in its own window without browser chrome when installed
- Theme color — dark theme (#0d0f13) for native app feel
To install: visit / in Chrome/Edge/Safari and use the browser's "Install" or "Add to Home Screen" option.
Transcript Entry Types
The server maintains a richer transcript than raw rollout logs:
| Role | Description |
|---|---|
user |
User messages |
assistant |
Agent responses |
reasoning |
Agent thinking/reasoning |
diff |
File change diffs |
command |
Shell command execution with output |
approval |
Approval decisions (accepted/declined) |
plan |
Agent task plans with step status |
shell_input / shell_output |
Direct shell commands |
token_usage |
Context window statistics |
debug_trace |
Internal-only structured debug rows tagged with internal: true |
Normal transcript replay/range reads ignore internal: true rows so UI history stays clean; inspect the raw transcript.jsonl or use include_internal=true on the transcript range endpoint when you need them.
For detailed documentation, see CODEX_APP_SERVER_EXTENSION.md and AGENT_EXTENSION_INTEGRATION.md.
Agent Chat Log API
The server also provides a simple REST + HTML "chat log" for coordinating multiple agents.
- Port: 12356
- Log format: JSON Lines (one JSON object per line)
- Write payload: JSON with
whoandmessagefields - Read:
GET /api/messagesreturns stored entries (includes server-addedts)
Curl Examples
Post a message:
curl -sS -X POST http://127.0.0.1:12356/api/messages \
-H 'Content-Type: application/json' \
-d '{"who":"agent-alpha","message":"starting task 3"}'
Read all messages:
curl -sS http://127.0.0.1:12356/api/messages
Tail the last N:
curl -sS "http://127.0.0.1:12356/api/messages?limit=100"
Install From Git
pip install "git+<repo-url>"
codex-agent --log agent_chat.log.jsonl --port 12356
Run From Repo
python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt
python -m agent_log_server --log agent_chat.log.jsonl --port 12356
Open the Codex Agent UI: http://127.0.0.1:12356/
Framework Shells Integration
The server uses Framework Shells for process orchestration. You can also launch via the FWS CLI:
python -m framework_shells.cli.main up agent_log_server/shellspec/agent_log.yaml
Roadmap (WIP)
- IDE Chat Extension — run Codex Agent UI as an embedded chat panel in your IDE
- Sideband Terminal — use the IDE terminal alongside Codex Agent for hybrid workflows
Stay tuned for updates.
License
GPL-3.0 (see LICENSE).
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agent_log_server-0.2.122-py3-none-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: agent_log_server-0.2.122-py3-none-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 11.4 MB
- Tags: Python 3, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e43950ef00f7dc8611a7d0efaad760170946fd5b43090d34f1421cfd6c303a03
|
|
| MD5 |
134ad05d232c5870904dc8e7338f0ada
|
|
| BLAKE2b-256 |
552b42bfa0cbae2e408fb86aa3f627cee2075a0bf66052838769a014cf8ebb15
|
File details
Details for the file agent_log_server-0.2.122-py3-none-android_24_arm64_v8a.whl.
File metadata
- Download URL: agent_log_server-0.2.122-py3-none-android_24_arm64_v8a.whl
- Upload date:
- Size: 9.3 MB
- Tags: Android API level 24+ ARM64 v8a, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
82d70d25e249d6f57b050c43a74bb7dc9dd9e6e005412ef5d09c6b59e93c323b
|
|
| MD5 |
563effd7ad81fbc5f585c3f4dcd31040
|
|
| BLAKE2b-256 |
e29fd2a951afc58eb1193ebf324a8d2fe48fe75bd204aa26b957205b17f9dd47
|