Metadata-Version: 2.5
Name: llm-harness-lite
Version: 0.1.0a1
Summary: LLM Harness Lite — lightweight universal agent + RAG + MCP for any LLM (local-first, cost-aware)
License: MIT
License-File: LICENSE
Requires-Python: >=3.10
Requires-Dist: anthropic>=0.40.0
Requires-Dist: mcp>=1.0.0
Requires-Dist: openai>=1.30.0
Requires-Dist: pgvector>=0.3.5
Requires-Dist: psycopg[binary]>=3.1
Requires-Dist: python-dotenv>=1.0.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: tiktoken>=0.7.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.4.0; extra == 'dev'
Provides-Extra: full
Requires-Dist: ollama>=0.2.0; extra == 'full'
Requires-Dist: qdrant-client>=1.9.0; extra == 'full'
Provides-Extra: ollama-embed
Requires-Dist: ollama>=0.2.0; extra == 'ollama-embed'
Provides-Extra: qdrant
Requires-Dist: qdrant-client>=1.9.0; extra == 'qdrant'
Description-Content-Type: text/markdown

# LLM Harness Lite — lightweight universal agent + RAG + MCP for any LLM

Local-first, vendor-neutral, cost-aware. Not the next LangChain: ~1k LOC core you can read in an afternoon.

```
config.yaml → llm/factory → agent/loop → tools/registry (+ RAG as tool, MCP tools)
```

## Install
```bash
pip install llm-harness-lite
# or local dev:
# python -m venv .venv && source .venv/bin/activate
# pip install -e ".[dev]"
# docker compose up -d db qdrant
```

## Use (short alias supported)
```python
import llm_harness_lite as harness
llm = harness.create_llm("openai_compat", "qwen3:8b", base_url="http://localhost:11434/v1")
```

See `LOCAL_SETUP.md` + `examples/`:
- `01_basic_chat.py` — normalized `chat()` across providers
- `02_agent_with_tools.py` — agent loop + budget guard
- `03_rag_ingest_search.py` — pgvector RAG
- `04_cost_compare.py` — bang-for-buck across models
- `05_qdrant_mcp_cache.py` — Qdrant + persistent MCP + semantic cache

## Layout (for contributors)
- `src/llm_harness_lite/llm/` — `types.py`, `base.py` (Protocol), `openai_compat.py`, `anthropic_backend.py`, `factory.py`
- `src/llm_harness_lite/agent/loop.py` — framework-agnostic ReAct loop
- `src/llm_harness_lite/tools/registry.py` — `@tool` + JSON Schema from signature
- `src/llm_harness_lite/rag/` — `chunker.py`, `embedder.py`, `store_base.py`, `store_pgvector.py`, `store_qdrant.py`, `retriever.py`
- `src/llm_harness_lite/mcp/client.py` — `MCPClient` + `PersistentMCP` background-loop bridge
- `src/llm_harness_lite/utils/` — `costs.py`, `cache.py` (exact + semantic)
- `src/harness/` — back-compat shim (`import harness` still works)
