npm package: @multinex-ai/multinex-sdk
Description: Multinex Platform Secure Agent SDK - Enterprise AI security and governance.
Latest version: 1.0.0

<div align="center">
  <img src="https://multinex.ai/official_multinex_draft.jpeg" alt="Multinex Secure Agent SDK & CLI" width="100%" style="border-radius: 12px; box-shadow: 0 4px 30px rgba(0,0,0,0.5);" />
</div>

<br />

<div align="center">
  <a href="https://multinex.ai"><img src="https://img.shields.io/badge/Multinex-Enterprise%20Ready-gold?style=for-the-badge&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAACiElEQVR4nO2Xv0sCYRzGH+9S0NCgoSgIgoYgaGhIQ0MDoaEhDU1D0NAgDS39A42ChoSGNLQ0NAQNQdDQEDQEQUMQNDS8z/PgeoeHnu9x7x0H3wfmXN/v8Xze53nf9+7pSJJtEzgCjkWzBTz49dGxbQIPwKWIB+A8L20b2L8i1wRulHnI2Tawd4E8AWPFFvAAHNm23kX+4A+4V/iA94wB4Mi2eSPvAr8S31N8gB83x6e2jRv5A/AncYHwHnx4307aNt7IE/AncZXwHvwc2TZ25BvAT+IS4T1o7Y1tU0EegF+Jm4T34N22KSDXwIfEvcIHeLNt9OSn4p7iAzy1bYjIIfAo8aBiALjStgORL/hT7EDhAzy7bEw9+Sm4qPgADy6bw0C+4NPEo4oB4NxlY6jJD8FdxQfob5WbK/IVnypuKz7AU5eNoSQ/BXcVH2DfZWN9It/wyeK+4gM8u2zcJvJdcU/xAZ5dNm4P+YJPFw8VH2DLZaN78lNwX/EBXrpsbI3IN3zCeKj4AM8uG61DvuCzwgPFR3hy2Wg1+Sm4r/gAL102vof8wGeE+4oP8Oyy0bzkCz47PFB8hIeWjZ1Bfgr+Q9hTfIAXlo2XId/waWJP8QGeWTZeBfmCzxYPFB9h37LRLPkp+A9hT/EBXlk2nof8wKeNfcUHeGbZaIXyBZ81Hio+wrZlYyXJT8F/CHuKD/DCsrEQ8gOfOPYVH2DHstG85As+czxUfIRNy4YmP7m0Z2AeeBftrG3xH2bA1w8sAj+ixW1r/02hBnxZwwzwIdrcNofH17zRAr54oAr8iFbXtvk9v57aA75QoA4cRlvYtvsF+K9pS+TzM2wAAAAASUVORK5CYII=" alt="Enterprise Ready"></a>
  <a href="https://multinex.ai/architecture/shield"><img src="https://img.shields.io/badge/Security-AI%20Firewall-cyan?style=for-the-badge" alt="AI Firewall"></a>
  <a href="https://multinex.ai/mars/docs/audit-report"><img src="https://img.shields.io/badge/Compliance-SOC2%20Ready-jade?style=for-the-badge" alt="SOC2 Ready"></a>
  <a href="https://multinex.ai/request-demo"><img src="https://img.shields.io/badge/Demo-Request%20Access-white?style=for-the-badge" alt="Request Demo"></a>
</div>

<br />

# Multinex Secure Agent SDK & CLI (Example Implementation)

This repository provides a concrete example of integrating with the Multinex Platform to secure and govern enterprise AI behavior. It demonstrates the **production-ready SDK and CLI** tailored for high-stakes execution, natively supporting specialized agents like **Salesforge** baselines.

## What Multinex Is

**Multinex is the security and governance layer for enterprise AI.** 

We act as an AI firewall and secure runtime for autonomous agents. Multinex prevents data leaks, enforces strict corporate governance policies, and generates immutable audit trails, allowing organizations to deploy AI safely inside their infrastructure.

---

## What This Example Demonstrates

This repository contains a working integration example of the Multinex edge SDK working hand-in-hand with our local Sovereign CLI. By running this example, you will see how our system handles:

- **Secure agent registration** using the real SDK client.
- **Agent Type Configuration** (e.g., bootstrapping a specialized `salesforge` agent).
- **Policy enforcement behavior** (allowing safe executions and strictly blocking policy violations).
- **Audit log generation** with cryptographically secure metadata structures.
- **Local Policy Testing** driven by the Multinex CLI prior to deployment.

---

## Architecture Overview

1. Your application initializes the `MultinexClient` with your API Key.
2. You register an Agent tied to specific governance policies (e.g., `no-pii-exfiltration`).
3. You dispatch execution requests via the SDK.
4. The Multinex Runtime evaluates the context against your active policies in real-time.
5. The request is either safely forwarded to the underlying model or aggressively denied. 
6. An immutable Audit Log is generated and attached to the response.

*Read the full [Architecture Overview](./architecture.md) for more details.*

---

## Quick Start (Under 5 Minutes)

This example utilizes the real Multinex SDK client wrapper, combined with a mocked network transport layer, to cleanly demonstrate integration behavior without requiring real API keys or exposing proprietary orchestration details.

### Prerequisites
- Node.js (v18+) or Docker

### Running Locally

```bash
# 1. Install dependencies
npm install

# 2. Run the secure agent example
npm start
```

### Running with Docker

```bash
docker-compose up
```

---

## Example Output

When running the example, you will see the system handle two distinct scenarios:

### Allowed Execution (Safe)
```json
{
  "agentId": "agent_ce97ea45",
  "executionId": "exec_276a5f1fc0c3",
  "timestamp": "2026-02-28T21:08:13.008Z",
  "status": "allowed",
  "policyResults": [
    {
      "policy": "no-pii-exfiltration",
      "result": "passed"
    },
    {
      "policy": "audit-all-actions",
      "result": "passed"
    }
  ],
  "metadata": {
    "environment": "production",
    "latencyMs": 28
  }
}
```

### Denied Execution (Policy Violation)
```json
{
  "agentId": "agent_ce97ea45",
  "executionId": "exec_facae8f4d257",
  "timestamp": "2026-02-28T21:08:13.009Z",
  "status": "denied",
  "policyResults": [
    {
      "policy": "no-pii-exfiltration",
      "result": "failed",
      "reason": "Sensitive data detected in prompt."
    },
    {
      "policy": "audit-all-actions",
      "result": "passed"
    }
  ],
  "metadata": {
    "environment": "production",
    "latencyMs": 23
  }
}
```

---

## Security Model Explanation

Multinex operates on a zero-trust model for agentic execution. 
- The SDK represents the **Edge Layer** where enterprise applications interface with the security mesh.
- The **Core Platform Layer** (which handles deep orchestration, real-time threat analysis, containerized isolation, and cryptographical signing) is entirely abstracted behind this SDK.

By separating the edge contract from the execution layer, Multinex guarantees that proprietary data routing and policy enforcement cannot be bypassed by an exploited local application.

---

## Enterprise Demo Link

Ready to deploy this within your own VPC or through our fully managed API?

[Request an Enterprise Demo](https://multinex.ai/request-demo)