"""
A modular tracing and explainability toolkit for LangChain agents. Capture step-by-step tool usage, visualize the reasoning process, and analyze how your agent chains behave.
- 🔍 Traces agent steps (inputs, tool used, outputs)
- 📊 Visualizes tool usage and outcomes
- 🧪 Includes dashboards for Streamlit + Matplotlib
- 🧠 Supports RAG, search chains, math pipelines, and multi-tool agents
pip install .Create a .env file:
OPENAI_API_KEY=your-key-hereRun one of the provided pipelines:
python examples/use_with_langchain_agent.py
python examples/math_chain_example.py
python examples/multi_agent_chain_example.py
python examples/rag_pipeline_example.pypython examples/create_db.pyIt loads data/solar_energy_notes.txt and builds db/ for retrieval.
streamlit run examples/trace_dashboard.pypython examples/visualize_trace.py{
"step_1": {
"input": "What's 15% tip for $80 dinner, and add it to the bill?",
"tool_used": "Tip Calculator",
"output": "Tip is $12.0"
},
"step_2": {
"input": "Add 80 + 12.0",
"tool_used": "Total Calculator",
"output": "The total bill including tip is $92.0"
}
}cognitive_tracer/— the Python moduleexamples/— usage scriptstraces/— generated trace filesdata/— text input for vector DB
langchain
langchain-openai
langchain-community
openai
streamlit
matplotlib
dotenv
MIT © Nisaharan Genhatharan """