Metadata-Version: 2.4
Name: loupe-ai
Version: 0.0.72
Summary: A magnifying glass for your AI agent — open-source forensics + interpretability for LLM agents.
Project-URL: Homepage, https://loupe.dev
Project-URL: Repository, https://github.com/loupe-ai/loupe
Project-URL: Issues, https://github.com/loupe-ai/loupe/issues
Author-email: Yashwanth Kamireddi <yashwanthkamireddi@users.noreply.github.com>
License: MIT License
        
        Copyright (c) 2026 Yashwanth Kamireddi
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: agents,evaluation,interpretability,llm,mechanistic-interpretability,observability
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.11
Requires-Dist: anyio>=4.0.0
Requires-Dist: duckdb>=1.0.0
Requires-Dist: fastapi>=0.110.0
Requires-Dist: httpx>=0.27.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: rich>=13.0.0
Requires-Dist: typer>=0.12.0
Requires-Dist: uvicorn>=0.30.0
Provides-Extra: anthropic
Requires-Dist: anthropic>=0.40.0; extra == 'anthropic'
Provides-Extra: autogen
Requires-Dist: pyautogen>=0.2.0; extra == 'autogen'
Provides-Extra: crewai
Requires-Dist: crewai>=0.30.0; extra == 'crewai'
Provides-Extra: dev
Requires-Dist: httpx>=0.27.0; extra == 'dev'
Requires-Dist: hypothesis>=6.0.0; extra == 'dev'
Requires-Dist: jsonschema>=4.0.0; extra == 'dev'
Requires-Dist: mypy>=1.10.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: ruff>=0.5.0; extra == 'dev'
Provides-Extra: dspy
Requires-Dist: dspy-ai>=2.4.0; extra == 'dspy'
Provides-Extra: interp
Requires-Dist: sae-lens>=4.0.0; extra == 'interp'
Requires-Dist: transformer-lens>=2.0.0; extra == 'interp'
Provides-Extra: langgraph
Requires-Dist: langgraph>=0.2.0; extra == 'langgraph'
Provides-Extra: llama-index
Requires-Dist: llama-index>=0.10.0; extra == 'llama-index'
Provides-Extra: openai
Requires-Dist: openai>=1.50.0; extra == 'openai'
Provides-Extra: openhands
Requires-Dist: openhands-ai>=0.10.0; extra == 'openhands'
Provides-Extra: pydantic-ai
Requires-Dist: pydantic-ai>=0.0.20; extra == 'pydantic-ai'
Description-Content-Type: text/markdown

# `loupe` — Python SDK

Forensic observability + circuit attribution for Python LLM agents.

## Install

```bash
pip install -e '.[ui]'           # from this repo (canonical install today)
pip install -e '.[interp]'       # adds the real SAE attribution backend
pip install -e '.[ui,interp,langgraph,anthropic,openai,universal]'
```

## Quickstart

```python
from loupe import trace, record_step
from loupe.integrations import patch_all

patch_all()                                  # auto-capture any installed LLM SDK

@trace(framework="anthropic")
async def my_agent(query: str):
    record_step("plan", "compose request")
    # ...your real agent code; LLM calls captured automatically
    return result

await my_agent("refactor auth.py")
# trace saved to ~/.loupe/traces/{run_id}.jsonl
```

View traces locally:

```bash
loupe ui              # opens http://localhost:7860 — live SSE dashboard
loupe list            # terminal table of every run
loupe attribute <id>  # SAE circuit attribution per llm-call step
loupe cluster         # find features that recur across tagged failures
loupe replay <id>     # re-invoke a captured run for reproducibility testing
```

See [SPEC.md](../../docs/SPEC.md) for the wire format and
[ARCHITECTURE.md](../../docs/ARCHITECTURE.md) for the layering.
