Metadata-Version: 2.5
Name: neuforge-llamaindex
Version: 1.0.1
Summary: NeuForge x402 Token Metering for LlamaIndex
Project-URL: Homepage, https://github.com/sophieamoure2026-ui/neuforge-llamaindex
Requires-Python: >=3.10
Requires-Dist: llama-index-core>=0.10.0
Description-Content-Type: text/markdown

# NeuForge Pay for LlamaIndex (`neuforge-llamaindex`)

A LlamaIndex Token Counter that enforces the x402 Bounded Overshoot Protocol natively.

> **⚠️ Pricing & Metering Disclosure**
> This SDK requires an active API key from [neuforge.app](https://neuforge.app). 
> It acts as a cloud-metered gateway that tracks your LLM token usage and synchronizes it synchronously with the NeuForge backend via HTTP. 
> 
> **Important:** If your NeuForge account balance drops below zero or your budget is exceeded, this SDK will intentionally halt your execution by throwing an `HTTP 402 Payment Required` exception. You must manage your billing on neuforge.app to ensure uninterrupted service.

## Usage

```python
from neuforge_llamaindex import NeuForgeTokenCounter
from llama_index.core import Settings
from llama_index.core.callbacks import CallbackManager

# Initialize with your API Key
meter = NeuForgeTokenCounter(api_key="nf_live_your_api_key_here")
Settings.callback_manager = CallbackManager([meter])

# Indexing and querying will sync with NeuForge Cloud.
# Hits HTTP 402 if budget is exceeded.
index = VectorStoreIndex.from_documents(docs)
```
