Metadata-Version: 2.1
Name: marl-middleware
Version: 1.0.0
Summary: MARL — Model-Agnostic Runtime Middleware for LLMs
Home-page: https://github.com/vidraft/marl
Author: VIDRAFT
Author-email: VIDRAFT <contact@vidraft.net>
License: Apache-2.0
Project-URL: Homepage, https://vidraft.net
Project-URL: Repository, https://github.com/vidraft/marl
Keywords: llm,middleware,reasoning,hallucination,multi-agent
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests >=2.28.0
Provides-Extra: anthropic
Requires-Dist: anthropic >=0.20 ; extra == 'anthropic'
Provides-Extra: openai
Requires-Dist: openai >=1.0 ; extra == 'openai'
Provides-Extra: server
Requires-Dist: gradio >=6.0 ; extra == 'server'

# MARL — Model-Agnostic Runtime Middleware for LLMs

5-stage multi-agent reasoning pipeline that reduces LLM hallucination by 70%+.

## Quick Start

```python
from marl import Marl

# OpenAI
ml = Marl.from_openai("sk-...")
result = ml.run("Your complex question")
print(result.answer)

# Any OpenAI-compatible API
ml = Marl.from_openai_compatible("https://api.x.ai/v1", "key", "grok-3")
```

## 9 Emergence Modes

```python
from marl import Marl, MarlConfig

ml = Marl.from_openai("sk-...", config=MarlConfig(
    mode="emergence",
    emergence_type="create"  # invent|create|recipe|pharma|genomics|chemistry|ecology|law|document
))
```

## As Proxy Server (1-line integration)

```python
ml = Marl.from_openai("sk-...")
ml.serve(port=8080)
# Now use base_url="http://localhost:8080/v1" in any app
```

## Pipeline

```
S1 Hypothesis → S2 Solver → S3 Auditor → S4 Verifier → S5 Synthesizer
```

## Links

- **Demo**: [HuggingFace Space](https://huggingface.co/spaces/VIDraft/marl)
- **FINAL Bench**: MA=0.694 vs ER=0.302 (70%+ improvement)
- **License**: Apache 2.0
- **Author**: [VIDRAFT.net](https://vidraft.net)
