Skip to main content

Discover and inspect local AI coding agent sessions

Project description

agent-sessions

Discover and inspect local AI coding agent sessions (Claude Code, Codex, Pi).

Looking for a ready-made solution for supervising your agents? Check out Tether.

from agent_sessions import discover_sessions, get_session_detail, RunnerType

# Find all recent sessions
sessions = discover_sessions()
for s in sessions:
    print(f"{s.runner_type.value}: {s.directory} ({s.message_count} messages)")

# Filter by agent type
claude_sessions = discover_sessions(runner_type=RunnerType.CLAUDE_CODE)

# Filter by project directory
project_sessions = discover_sessions(directory="/home/user/my-project")

# Load full message history
detail = get_session_detail(sessions[0].id, sessions[0].runner_type)
for msg in detail.messages:
    print(f"[{msg.role}] {msg.content[:80]}")

What it discovers

Agent Session location Format
Claude Code ~/.claude/projects/ JSONL per session
Codex ~/.codex/sessions/ JSONL rollout files
Pi ~/.pi/agent/sessions/ JSONL per session

Each provider also detects whether sessions are currently running by inspecting the process table.

Install

pip install agent-sessions

License

MIT

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

agent_sessions-0.1.0.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

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

agent_sessions-0.1.0-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for agent_sessions-0.1.0.tar.gz
Algorithm Hash digest
SHA256 dcb435ec46398604c5fc204f6ac8820e9e89b12df1dbeed821a89014a48c9e76
MD5 2e6e4c18f14f23da486b6cc5a2efc96a
BLAKE2b-256 2d78280008f9e9f33b159b52da876ec3ea4df64bcdea10baeedef4080eff04e4

See more details on using hashes here.

Provenance

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

Publisher: publish.yml on larsderidder/agent-sessions

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

File details

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

File metadata

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

File hashes

Hashes for agent_sessions-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a7e3ba2442a0056fe3b1e51baf8df07b049d2239623f2e93ad67daaba9e50af1
MD5 1d9b17b892c9dbbf75cbab4f885d911f
BLAKE2b-256 a1878b463d7e02cdef146a9ebff63678279b622e21ad4700c1e4a4ac9725ad7f

See more details on using hashes here.

Provenance

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

Publisher: publish.yml on larsderidder/agent-sessions

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