Skip to main content

Observability tooling for agent harness sessions, imports, and reports.

Project description

Harness Observability Layer

Minimal MVP for instrumenting an agent harness and generating observability metrics from canonical events.

Security And Privacy

HOL is a local-first analysis tool.

  • hol import, hol analyze, hol report, hol list, hol portfolio, and hol failures operate on local files.
  • HOL does not upload imported conversations, prompts, tool outputs, or reports by default.
  • HOL stores imported raw sessions and derived artifacts only in local paths you control.
  • Some metrics such as total_lines and read coverage are optional local enrichments derived from the current filesystem state.

Privacy controls available now:

  • --no-raw-copy
  • --no-resolve-files
  • --redact-sensitive

Additional review docs:

Install

pip install -e .

For release validation and packaging tooling during development:

pip install -e .[dev]

This exposes the unified CLI:

hol --help

What exists

  • canonical event model
  • append-only JSONL logger
  • observable file and shell adapters
  • minimal harness runner
  • offline analyzer
  • mocked session example
  • Codex session importer
  • Claude Code session importer
  • Codex runtime wrapper for codex exec --json

Quick start

PYTHONPATH=src .venv/bin/python examples/mock_session.py

This writes events to a per-session file like /tmp/harness_observability_layer/sess_xxxx.events.jsonl and prints a derived metrics summary.

By default the example writes runtime data to /tmp/harness_observability_layer/events.jsonl so it can run cleanly in sandboxed environments.

Import an existing Codex session

hol import session ~/.codex/archived_sessions/rollout-YYYY-MM-DDTHH-MM-SS-....jsonl

Privacy-oriented variant:

hol import session ~/.codex/archived_sessions/rollout-YYYY-MM-DDTHH-MM-SS-....jsonl --no-raw-copy --no-resolve-files

This now creates a session artifact folder inside the project:

  • artifacts/sessions/<session-name>/raw.codex.jsonl
  • artifacts/sessions/<session-name>/normalized.events.jsonl
  • artifacts/sessions/<session-name>/summary.json
  • artifacts/sessions/<session-name>/report.html
  • artifacts/sessions/<session-name>/report.css

It also refreshes:

  • artifacts/sessions/index.html

Import the latest archived Codex session

hol import latest

This picks the most recently modified rollout-*.jsonl from ~/.codex/archived_sessions and imports it into the project.

Import a Claude Code session

hol import claude-session ~/.claude/projects/<project>/<session>.jsonl

This imports a Claude Code JSONL session into canonical events and stores it under:

  • artifacts/sessions/claude-<session-name>/raw.claude.jsonl
  • artifacts/sessions/claude-<session-name>/normalized.events.jsonl
  • artifacts/sessions/claude-<session-name>/summary.json
  • artifacts/sessions/claude-<session-name>/report.html

To import the latest Claude session from the default archive tree:

hol import claude-latest

Import all archived Codex sessions

hol import all

This imports every rollout-*.jsonl from ~/.codex/archived_sessions.

By default:

  • existing imported session folders are skipped

To force reimport:

hol import all --reimport

Summarize and compare imported sessions

hol list --limit 5
hol analyze latest --format markdown
hol analyze compare <session-a> <session-b>
hol report markdown <session-id>
hol report markdown <session-id> --redact-sensitive

Run Codex with observability capture

PYTHONPATH=src .venv/bin/python scripts/run_codex_observed.py \
  "Say only OK" \
  --cwd /path/to/project

This wrapper:

  • runs codex exec --json
  • saves the raw Codex JSONL stream
  • normalizes it into canonical events
  • writes summary.json
  • writes a styled report.html
  • prints a metrics summary

By default, live runs are saved under artifacts/live_runs/run_###/.

Open the HTML report

After an import or live run, open the generated report.html file from the corresponding artifact folder. The page is static and does not require a server.

To browse imported sessions, open:

  • artifacts/sessions/index.html

In restricted environments, running Codex itself may still require broader filesystem or network access than the parser/importer.

The legacy scripts remain available, but the package/CLI surface is now the recommended interface.

Citation

If you use this project in research, documentation, or derivative tooling, please cite it using CITATION.cff.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

harness_observability_layer-0.1.0.tar.gz (50.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

harness_observability_layer-0.1.0-py3-none-any.whl (57.9 kB view details)

Uploaded Python 3

File details

Details for the file harness_observability_layer-0.1.0.tar.gz.

File metadata

File hashes

Hashes for harness_observability_layer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d9cb9e1ef6e1bc0542a29b75a24ea1da2786fffcb9aeecda288dbbc2a5577ae3
MD5 d62f9f93ea6eb6621387170846e8e7be
BLAKE2b-256 504129f569bcc3a5529ff7ecdb57b5610e55b05af9ed06e97bb83e449ed3a478

See more details on using hashes here.

Provenance

The following attestation bundles were made for harness_observability_layer-0.1.0.tar.gz:

Publisher: release.yml on alexandrelira99/harness_observability_layer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file harness_observability_layer-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for harness_observability_layer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0fb4efa5f902f9b85fb1361074bebb3ae810f31cca067b2a448188d678e1fe0c
MD5 7f6344e915bd66594b85dc68e075117c
BLAKE2b-256 ed70766fa5ff3b9f8501c698d9819ac9852d10d67acc68d166346cf1211895cb

See more details on using hashes here.

Provenance

The following attestation bundles were made for harness_observability_layer-0.1.0-py3-none-any.whl:

Publisher: release.yml on alexandrelira99/harness_observability_layer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page