Metadata-Version: 2.4
Name: langchain-lyrenth
Version: 0.1.0
Summary: LangChain document loader for Lyrenth: read URLs as clean AIDocuments.
Project-URL: Homepage, https://lyrenth.com
Project-URL: Documentation, https://lyrenth.com/docs/integrations
Author: Lyrenth
License-Expression: MIT
Keywords: aidocument,document-loader,langchain,llm,lyrenth,rag,web
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.9
Requires-Dist: langchain-core>=0.2
Requires-Dist: lyrenth>=0.1
Description-Content-Type: text/markdown

# langchain-lyrenth

A [LangChain](https://python.langchain.com) document loader backed by
[Lyrenth](https://lyrenth.com). Reads any URL as a clean **AIDocument**: cleaned
Markdown plus title, description, and structure, with navigation and boilerplate
stripped, through Lyrenth's cached index.

## Install

```sh
pip install langchain-lyrenth
```

Get a free API key at <https://lyrenth.com/signup> and set it as
`LYRENTH_API_KEY`.

## Usage

```python
from langchain_lyrenth import LyrenthLoader

loader = LyrenthLoader(
    ["https://example.com/a", "https://example.com/b"]
)
docs = loader.load()        # list[langchain_core.documents.Document]
# docs[0].page_content -> cleaned Markdown
# docs[0].metadata      -> {"source", "title", "description", "word_count"}
```

`lazy_load()` streams one Document per URL. Pass `fresh=True` to force a live
re-fetch instead of the cached copy, or `client=` to reuse a configured
`lyrenth.Lyrenth`.

## Why

- **Cleaner, cheaper** input for RAG: one stable shape per URL, far fewer tokens
  than raw HTML.
- **Cached across callers**, so repeat URLs are fast and origin-friendly.

The AIDocument format is an open contract; see
<https://lyrenth.com/llms-full.txt>. MIT licensed.
