Metadata-Version: 2.4
Name: nurricai
Version: 0.1.0
Summary: Python client for the ACRA API — Adaptive Contextual Retrieval Architecture
Author-email: NurricAI <hello@nurricai.com>
License: MIT
Project-URL: Homepage, https://nurricai.com
Project-URL: Repository, https://github.com/nurricai/nurricai-python
Keywords: rag,retrieval,llm,acra,nurricai,ai,nlp
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.24.0

# nurricai

Python client for the **ACRA API** — Adaptive Contextual Retrieval Architecture by NurricAI.

ACRA is intelligent RAG-as-a-service. It automatically classifies your query complexity
and adapts retrieval depth — simple questions get fast single-hop retrieval, complex
multi-hop questions get deeper iterative retrieval with Gemma 27B generation.

## Install

```bash
pip install nurricai
```

## Quickstart

```python
from nurricai import ACRA

acra = ACRA(api_key="nacra-your-key-here")

# Index your documents
acra.ingest(["ACRA stands for Adaptive Contextual Retrieval Architecture..."])

# Query
response = acra.query("What does ACRA stand for?")
print(response.answer)
print(f"Credits used: {response.credits_used}")
print(f"Credits left: {response.credits_remaining}")
```

## With metadata and namespaces

```python
acra.ingest(
    texts=["Page 1 content...", "Page 2 content..."],
    metadata=[{"source": "manual.pdf", "page": 1},
              {"source": "manual.pdf", "page": 2}],
    namespace="my-project"
)

response = acra.query("What is on page 2?", namespace="my-project")
for source in response.sources:
    print(source.metadata, source.score)
```

## Error handling

```python
from nurricai import ACRA, OutOfCreditsError, AuthError, ACRAError

try:
    response = acra.query("What is X?")
except OutOfCreditsError as e:
    print(f"Out of credits. Upgrade at {e.upgrade_url}")
except AuthError:
    print("Invalid API key")
except ACRAError as e:
    print(f"Error: {e}")
```

## Plans

| Plan       | Credits       | Price |
|------------|---------------|-------|
| Free       | 100 / day     | $0    |
| Hobby      | 5,000 / month | $10   |
| Team       | 25,000 / month| $50   |
| Business   | 100,000 / month| $100 |
| Enterprise | Unlimited     | $499  |

Get your API key at **[nurricai.com](https://nurricai.com)**
