Skip to main content

Ghost Reason

Trace your AI agent's reasoning, not just its tool calls.

Ghost Reason is a local-first Python package that logs the full reasoning timeline of an AI agent: the prompt, the thought process, the tool call, and the result. It writes everything to a SQLite database and gives you a clean CLI to view the chain of decisions.

Why use it?

Ghost Tracer shows you what the agent did. Ghost Reason shows you why.

When an agent drifts, loops, or hallucinates, the tool-call log tells you which tool failed. The reasoning log tells you why the agent chose that tool in the first place.

Installation

pip install ghost-reason

Usage

  1. Wrap your agent's reasoning:

from ghost_reason import ReasonTracer tracer = ReasonTracer() tracer.log("prompt", user_input) tracer.log("thought", model_response.content) tracer.log("tool_call", f"{tool_name}({tool_args})") tracer.log("tool_result", str(result))

  1. View the timeline:

ghost-reason view

License

MIT

Metadata

Release files for ghost-reason 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ghost-reason 0.1.0
File Size Uploaded Provenance Actions
ghost_reason-0.1.0.tar.gz 3.0 kB Without provenance Details for ghost_reason-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ghost-reason 0.1.0
File Interpreter ABI Platform Actions
ghost_reason-0.1.0-py3-none-any.whl Python 3 none any Details for ghost_reason-0.1.0-py3-none-any.whl

Total release size: 6.7 kB

Release files / ghost_reason-0.1.0.tar.gz

Download URL ghost_reason-0.1.0.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
1f290f46e18b6ad821e23b57e1c9fde120ab28efbaa708c4371ebfbf74d05233
BLAKE2b-256 checksum
How to use checksums
271a35a27c182536ca61d4289ccb0cb7f60a07f4bc5045caf8e0d4621acf53c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Release files / ghost_reason-0.1.0-py3-none-any.whl

Download URL ghost_reason-0.1.0-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
185b4ffd539c94492b5883cc37b237c5d62d61a8d738e5f5de145e3d22065fd3
BLAKE2b-256 checksum
How to use checksums
235276a041ca1ba04ea74ad66a95de73bb07f8513271bc1d4f181de656b48fe0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Security for ghost-reason 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page