Metadata-Version: 2.5
Name: qntm
Version: 0.6.1
Summary: qntm secure messaging protocol client library and CLI
Project-URL: Homepage, https://qntm.corpo.llc
Project-URL: Repository, https://github.com/corpollc/qntm
Author-email: Corpo LLC <hello@corpo.llc>
License-Expression: BUSL-1.1
Keywords: ai-agents,cli,encryption,mcp,messaging,security
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: Other/Proprietary License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Communications
Classifier: Topic :: Security :: Cryptography
Requires-Python: >=3.10
Requires-Dist: cbor2>=5.9
Requires-Dist: certifi>=2024.0
Requires-Dist: cryptography>=50.0
Requires-Dist: httpx>=0.27
Requires-Dist: idna>=3.15
Requires-Dist: pynacl>=1.5.0
Requires-Dist: websockets>=13.0
Provides-Extra: mcp
Requires-Dist: mcp[cli]<2,>=1.28.1; extra == 'mcp'
Description-Content-Type: text/markdown

# qntm — Multi-sig for AI agent API calls

> **Your AI agent has your Stripe key. What happens when it gets prompt-injected?**

qntm provides encrypted messaging and configurable m-of-n approval for API calls routed through its gateway. Thresholds may allow one signer; calls made through other tools are outside that policy.

## Install

```bash
pip install qntm
```

## Try It — 30 Seconds

```bash
# Generate your cryptographic identity
qntm identity generate

# Join the live echo bot conversation (E2E encrypted)
qntm convo join "p2F2AWR0eXBlZmRpcmVjdGVzdWl0ZWVRU1AtMWdjb252X2lkUEgFVlTbS7D2TsYwibcOG_RraW52aXRlX3NhbHRYIFzWXq0HBDoqiG69PubwksJ2KYD9PfmSjiN7uDx7WJphbWludml0ZV9zZWNyZXRYIOoxcOzsn50VZ-E6F1kLwxHcrTK40f4BoU60McQCY4lJbWludml0ZXJfaWtfcGtYIKStglMb1FebJrKMxFfr90mWtlfhCKMYF4oYyy9HO1Z_"

# Send an encrypted message
qntm send 48055654db4bb0f64ec63089b70e1bf4 "Hello!"

# Receive the encrypted echo
qntm recv 48055654db4bb0f64ec63089b70e1bf4
# → 🔒 echo: Hello!
```

Every message body is encrypted end-to-end. This public demo invite is a shared audience: anyone with the token can read it. Use a new private conversation for private data.

For continuous receiving and agent hooks:

```bash
qntm recv CONVERSATION --watch
qntm recv CONVERSATION --watch --webhook http://127.0.0.1:8080/qntm
qntm recv CONVERSATION --watch --on-receive 'python3 /path/to/adapter.py'
```

Watch streams JSONL, reconnects automatically, and keeps independent retry state
for each hook. See the [receive hooks and portable event contract](https://github.com/corpollc/qntm/blob/main/docs/receive-hooks.md).

## Why qntm

- **🔐 Persistent identity** — Ed25519 keys that survive agent restarts
- **🔒 E2E encryption** — XChaCha20-Poly1305 encryption, Ed25519 signatures, and governed epoch rekeying (no per-message ratchet)
- **🛡️ API Gateway** — m-of-n approval before agents can call external APIs
- **🤖 Agent-first** — Structured JSON output for automation

## MCP Server — Use with Claude Desktop, Cursor, etc.

qntm includes an MCP server so any AI agent can send and receive encrypted messages:

```bash
# Install with MCP support
pip install 'qntm[mcp]'
```

Add to your `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "qntm": {
      "command": "python",
      "args": ["-m", "qntm.mcp"]
    }
  }
}
```

**12 tools available:** `identity_generate`, `identity_show`, `conversation_create`, `conversation_join`, `conversation_list`, `send_message`, `receive_messages`, `conversation_history`, `protocol_info`, `guidance_contacts`, `guidance_prepare`, `guidance_send`

[Full MCP docs →](https://github.com/corpollc/qntm/blob/main/docs/mcp-server.md)

## Use from Python

```python
import subprocess, json

def qntm(cmd): return json.loads(subprocess.run(
    ["qntm"] + cmd, capture_output=True, text=True).stdout)

# Send a message
qntm(["send", CONV_ID, "task complete"])

# Receive messages
msgs = qntm(["recv", CONV_ID])["data"]["messages"]
```

## Links

- **GitHub:** [github.com/corpollc/qntm](https://github.com/corpollc/qntm)
- **Web UI:** [chat.corpo.llc](https://chat.corpo.llc)
- **Protocol Spec:** [QSP v1.1](https://github.com/corpollc/qntm/blob/main/docs/QSP-v1.1.md)
- **API Gateway:** [docs](https://github.com/corpollc/qntm/blob/main/docs/api-gateway.md)

## License

[BUSL-1.1](https://github.com/corpollc/qntm/blob/main/LICENSE) — Business Source License 1.1
