Skip to main content

Context analytics

Project description

ctxrot

Understand your ReAct agent's context window and fight context rot.

Note: ctxrot currently supports only DSPy>=3.1.3 and may produce mis-aligned output. Please report any issues you encounter — the API may change.

Install

uv add ctxrot

Quick start

import dspy
from ctxrot import CtxRotCallback

callback = CtxRotCallback(db_path="ctxrot.db", store_content=True)

dspy.configure(
    lm=dspy.LM("openai/gpt-5.4-mini"),
    callbacks=[callback],
)

react = dspy.ReAct("question -> answer", tools=[tool_a, tool_b])
result = react(question="What is the capital of France?")

Then open the TUI dashboard:

ctxrot --db ctxrot.db

Learn more

Full Documentation → — concepts, CLI reference, Python API, export formats, deep analysis, and runnable examples.

The site also publishes an llms.txt / llms-full.txt for LLM agents that want to ingest the docs directly.

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

ctxrot-0.1.1.tar.gz (215.0 kB view details)

Uploaded Source

Built Distribution

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

ctxrot-0.1.1-py3-none-any.whl (43.2 kB view details)

Uploaded Python 3

File details

Details for the file ctxrot-0.1.1.tar.gz.

File metadata

  • Download URL: ctxrot-0.1.1.tar.gz
  • Upload date:
  • Size: 215.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for ctxrot-0.1.1.tar.gz
Algorithm Hash digest
SHA256 33e9c59781227b99369891d8d96452be6bd74bdd12e4c1c62ef74267e675c037
MD5 9944d059990c8559812f68e41e3a3002
BLAKE2b-256 a99131d4a31abfde3bfb04eabe16db1df2a10d69445f79b9e3166b513dd2e6af

See more details on using hashes here.

File details

Details for the file ctxrot-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: ctxrot-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 43.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for ctxrot-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ab9df48f148a7e5ac7fca02e931fdead5cfe15d4f3cfa42cd17d8ef1452c068e
MD5 fbe4dd1d7af3368376c4786154dd6877
BLAKE2b-256 100144c06e0874bcdbde8d9b3b79d8b32c9d740cbaa874c7548a88bf0b004983

See more details on using hashes here.

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