Skip to main content

Real-time ingestion daemon for AI coding agent sessions

Project description

sessionlog

CI PyPI License: Apache-2.0 Python 3.11+

See exactly what your AI coding agent did — every tool call, error, and decision, ingested in real time.

The problem

Claude Code and similar agents generate rich session logs, but those logs are raw JSONL blobs buried in ~/.claude/projects/. There's no way to query your sessions, spot error patterns, or understand where the agent stumbled. You're flying blind on what your agent actually did.

Quick start

pip install sessionlog
sessionlog ingest        # one-shot: parse all sessions into SQLite
sessionlog start         # daemon: watch for new sessions in real time

Your sessions are now in ~/.sessionlog/data.sqlite — query with any SQLite client.

Install

pip install sessionlog

From source:

git clone https://github.com/npow/agenttrace.git
cd agenttrace
make dev-install
source .venv/bin/activate

Usage

One-shot ingestion

Parse all existing Claude Code sessions:

sessionlog ingest
# Done. 42/42 files ingested, 18,302 raw entries, 5,841 progress entries
# (0 skipped, 0 failed). DB totals: 18302 entries, 127 sessions, 12 projects.

Real-time daemon

Watch ~/.claude/projects/ and ingest new entries as sessions run:

sessionlog start
# Watching ~/.claude/projects → ~/.sessionlog/data.sqlite

Re-ingest from scratch

sessionlog ingest --force

Custom paths

sessionlog start \
  --db /path/to/my.sqlite \
  --sources-dir /path/to/sessions

How it works

sessionlog watches ~/.claude/projects/ for JSONL session files using watchdog. When a file changes, it runs an incremental parse: only new lines are read, tool calls and errors are classified, and everything is written to SQLite with WAL mode for concurrent access. A 30-second debounce prevents redundant ingestion when many files change at once.

Development

git clone https://github.com/npow/agenttrace.git
cd agenttrace
make test

License

Apache-2.0 — see LICENSE.

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

sessionlog-0.1.5.tar.gz (22.3 kB view details)

Uploaded Source

Built Distribution

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

sessionlog-0.1.5-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

Details for the file sessionlog-0.1.5.tar.gz.

File metadata

  • Download URL: sessionlog-0.1.5.tar.gz
  • Upload date:
  • Size: 22.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sessionlog-0.1.5.tar.gz
Algorithm Hash digest
SHA256 7f36ad4e066b2066448ca07a496d0b52a78c02bad539f6f65c9c464d850f50a7
MD5 0efc6f9a828bdefd4cefaca65b42c36f
BLAKE2b-256 dfb92954af6ac8968979aebbca85739ee70df53f46e7fb07df8b2e305d93a7f1

See more details on using hashes here.

Provenance

The following attestation bundles were made for sessionlog-0.1.5.tar.gz:

Publisher: publish.yml on npow/sessionlog

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

File details

Details for the file sessionlog-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: sessionlog-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sessionlog-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 c0ee8ae78f5eac76715268d9e6d1cbebb7f5be0339397c341aa3877b91fd46fb
MD5 e4155e69b13cc067741d570e13ef8a9e
BLAKE2b-256 381b57395f7ae762ce9f039010cb64672ea65feedd69fe45060dd13a9099ad10

See more details on using hashes here.

Provenance

The following attestation bundles were made for sessionlog-0.1.5-py3-none-any.whl:

Publisher: publish.yml on npow/sessionlog

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