Metadata-Version: 2.5
Name: narna
Version: 0.2.7
Summary: NARNA — Open-source AI Agent with ADQA decision quality. Social gateway for Telegram, WhatsApp, X, Discord, and more.
Project-URL: Homepage, https://narna.org
Project-URL: Documentation, https://narna.org/docs
Project-URL: Repository, https://github.com/hanyangkai/narna
Project-URL: Download, https://narna.org/download
Author: NARNA Contributors
License: MIT
License-File: LICENSE
Keywords: agentic-ai,ai-agent,ai-agents,decision-intelligence,governance,mcp,narna,openclaw,telegram-bot,trust,uap,ugs,whatsapp-bot
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.11
Requires-Dist: cryptography>=42.0.0
Requires-Dist: jsonschema>=4.23.0
Requires-Dist: pyyaml>=6.0.1
Provides-Extra: cloud
Requires-Dist: fastapi>=0.115.0; extra == 'cloud'
Requires-Dist: httpx>=0.27.0; extra == 'cloud'
Requires-Dist: pydantic>=2.10.0; extra == 'cloud'
Requires-Dist: python-multipart>=0.0.12; extra == 'cloud'
Requires-Dist: pyyaml>=6.0.1; extra == 'cloud'
Requires-Dist: sqlalchemy>=2.0.36; extra == 'cloud'
Requires-Dist: uvicorn[standard]>=0.32.0; extra == 'cloud'
Provides-Extra: desktop
Requires-Dist: fastapi>=0.115.0; extra == 'desktop'
Requires-Dist: httpx>=0.27.0; extra == 'desktop'
Requires-Dist: pydantic>=2.10.0; extra == 'desktop'
Requires-Dist: uvicorn[standard]>=0.32.0; extra == 'desktop'
Provides-Extra: dev
Requires-Dist: build>=1.0.0; extra == 'dev'
Requires-Dist: jsonschema>=4.23.0; extra == 'dev'
Provides-Extra: tui
Requires-Dist: textual>=0.80.0; extra == 'tui'
Description-Content-Type: text/markdown

# NARNA

**Open-source AI Agent with Decision Quality built in.**

> Run on Telegram, WhatsApp, X, Discord, and more.  
> Every action scored by **ADQA** before it executes.

[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](./LICENSE)
[![Website](https://img.shields.io/badge/narna.org-live-0a7ea4)](https://narna.org)
[![PyPI](https://img.shields.io/badge/PyPI-narna-0a7ea4)](https://pypi.org/project/narna/)
[![Spec](https://img.shields.io/badge/UGS-open%20standard-111)](./specs/README.md)

**NARNA is a standalone AI project** — not part of 99X or any exchange codebase.  
See [`docs/ABOUT.md`](./docs/ABOUT.md).

---

## What NARNA is

| Layer | What it does |
|-------|----------------|
| **NARNA Agent** | BYOK agent runtime — tools, browser, memory, skills, desktop, gateway |
| **NARNA ADQA** | Decision Quality Assurance — evidence, policy, risk, confidence |
| **UGS** | Open governance standard — portable packages, audit, prove |

**Unique vs Hermes / OpenClaw:** they optimize *how agents act*. NARNA adds *whether the decision is good enough to act* — then learns from outcomes.

```
User → NARNA Agent → proposed action → ADQA score → ACT / REVIEW / REJECT → Decision Memory
```

Compatible with **OpenClaw**, **Hermes**, LangGraph, CrewAI, MCP — plug in ADQA without replacing your stack.

---

## Quick start

```bash
pip install "narna[desktop]"
narna desktop          # local agent UI
narna gateway status   # social channel readiness
narna ask "Summarize Q3 risks"
```

**Cloud:** [narna.org](https://narna.org) · API health: `https://api.narna.org/v1/health`

### OpenClaw + NARNA ADQA

```json
"mcp": {
  "servers": {
    "narna": {
      "url": "https://api.narna.org/mcp",
      "headers": { "Authorization": "Bearer uap_live_…" }
    }
  }
}
```

Skill: [`plugins/narna-openclaw/`](./plugins/narna-openclaw/)

---

## Social channels (agent everywhere)

| Channel | Mode | Env |
|---------|------|-----|
| Telegram | poll / webhook | `UAP_TELEGRAM_BOT_TOKEN` |
| WhatsApp | webhook (Twilio) | `UAP_TWILIO_*` |
| Discord | poll / webhook | `UAP_DISCORD_BOT_TOKEN` |
| Slack | events webhook | `UAP_SLACK_BOT_TOKEN` |
| **X (Twitter)** | webhook | `UAP_X_BEARER_TOKEN` |
| **Facebook** | webhook | `UAP_FB_PAGE_ACCESS_TOKEN` |
| **YouTube** | poll comments | `UAP_YOUTUBE_*` |
| Instagram | webhook (beta) | `UAP_IG_PAGE_ACCESS_TOKEN` |
| TikTok | webhook (planned) | `UAP_TIKTOK_*` |
| Signal / Email | webhook | see [`docs/SOCIAL-CHANNELS.md`](./docs/SOCIAL-CHANNELS.md) |

```bash
narna gateway run    # long-poll Telegram + Discord + Slack + YouTube
narna gateway channels
```

Full setup: [`docs/SOCIAL-CHANNELS.md`](./docs/SOCIAL-CHANNELS.md)

---

## Agent capabilities

- **44+ tools** — shell, browser (Playwright), code, search, skills, cron, voice
- **BYOK** — OpenAI, Anthropic, Gemini, DeepSeek, Qwen, local models
- **Memory** — FTS5 + MEMORY.md / USER.md + Decision Memory
- **Skills** — SKILL.md hub, zip export/import, OpenClaw-compatible
- **Subagents** — `execute_code` RPC, delegate tasks
- **Desktop** — Windows / Mac / Linux ([download](https://narna.org/download))
- **MCP** — `narna evaluate`, `narna_agent_ask` for any agent

Hermes/OpenClaw parity tracker: [`docs/PARITY-ROADMAP.md`](./docs/PARITY-ROADMAP.md)

---

## Governance (enterprise)

```python
from narna import wrap

agent = wrap(my_langgraph_app, vap=True, mode="enforce")
agent.run("approve vendor contract")
```

```bash
narna decision evaluate --action contract.sign --question "Should we sign?"
```

| Concept | Role |
|---------|------|
| **VAP** | Verify · Audit · Prove |
| **GU** | Cloud metering unit |
| **Governance Package** | EU AI Act, HIPAA, GDPR… portable YAML |
| **Decision OS** | Evidence · risk · approval · audit trail |

Docs: [`docs/DECISION-OS.md`](./docs/DECISION-OS.md) · [`docs/DIFFERENTIATION.md`](./docs/DIFFERENTIATION.md)

---

## Links

| | |
|--|--|
| Site | https://narna.org |
| GitHub | https://github.com/hanyangkai/narna |
| API | https://api.narna.org/v1/health |
| MCP | https://api.narna.org/mcp |
| MVP status | [`docs/MVP-CHECKLIST.md`](./docs/MVP-CHECKLIST.md) |
| Social setup | [`docs/SOCIAL-CHANNELS.md`](./docs/SOCIAL-CHANNELS.md) |
| Hermes compare | [`docs/HERMES-COMPARE.md`](./docs/HERMES-COMPARE.md) |
| Ship log | [`docs/SHIP-LOG.md`](./docs/SHIP-LOG.md) |
| Install | [`docs/INSTALL.md`](./docs/INSTALL.md) |

## Compatibility

OpenAI · Anthropic · Google · MCP · OpenTelemetry · LangGraph · CrewAI · OpenClaw · Hermes · Docker

## License

MIT
