Skip to content

Repository files navigation

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

importdspyfromctxrotimportCtxRotCallbackcallback=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

Documentation

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

License

MIT

About

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

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Contributors

Languages