| English | 中文版 |
Spec Number: NPS-0
Status: Draft
Version: 0.2
Date: 2026-04-12
Authors: Ori Lynn / INNO LOTUS PTY LTD
License: Apache 2.0
NPS (Neural Protocol Suite) is a complete set of internet base protocols designed for AI agents and models. It comprises five sub-protocols covering AI communication, Web access, identity, node discovery, and multi-agent orchestration. NPS is designed from scratch for the AI era, eliminating the fundamental inefficiencies of existing Web protocols when accessed by AI. Through the Schema anchoring mechanism, it cuts token consumption by 30–60% and establishes a unified agent identity system at the protocol layer.
Existing Web protocols (HTTP, REST, GraphQL) were designed for human browsers. When AI agents access them, three fundamental problems emerge:
| Human Internet | NPS Counterpart | Responsibility |
|---|---|---|
| Wire Format / Framing | NCP | AI-to-AI frame format, encoding tiers, semantic compression |
| HTTP | NWP | AI access to Web nodes |
| TLS / PKI | NIP | Agent identity certificates and trust chain |
| DNS | NDP | Global discovery of nodes and agents |
| SMTP / Message Bus | NOP | Multi-agent task orchestration |
Not a retrofit of existing protocols. Response structure directly matches LLM attention mechanisms; fields carry semantic type annotations so that models can reason directly.
Three mechanisms minimize wasted tokens: frame-level Schema anchoring (AnchorFrame), incremental transmission (DiffFrame), and standardized NPS Token accounting.
Each protocol layer is independently deployable. The minimum configuration is NCP + NWP; NIP / NDP / NOP are introduced only when needed.
Frame format, addressing, and manifest protocol are designed toward W3C / IETF standardization, with formal RFC as the long-term goal.
application/nwp-* formats.The core specification and reference implementations are fully open source (LabAcacia). Commercialization is via the NPS Cloud managed service without closing the protocol.
┌─────────────────────────────────────────────────────────┐
│ Human Web Layer │
│ HTTP · HTML · CSS · JavaScript │
├─────────────────────────────────────────────────────────┤
│ NOP Neural Orchestration Protocol │
│ Multi-agent orchestration · AlignStream · DAG │
├─────────────────────────────────────────────────────────┤
│ NDP Neural Discovery Protocol │
│ Global node/agent discovery · resolution · graph │
├─────────────────────────────────────────────────────────┤
│ NIP Neural Identity Protocol │
│ Agent identity · NID certificates · trust · revoke │
├─────────────────────────────────────────────────────────┤
│ NWP Neural Web Protocol │
│ Memory Node · Action Node · Complex Node │
├─────────────────────────────────────────────────────────┤
│ NCP Neural Communication Protocol │
│ Framing · Schema anchoring · diff coding · stream │
├─────────────────────────────────────────────────────────┤
│ Transport Layer │
│ HTTP mode: HTTP/1.1 · HTTP/2 · HTTPS │
│ Native mode: TCP · QUIC · WebSocket │
│ Unified port :17433 │
└─────────────────────────────────────────────────────────┘
NOP depends on NCP + NWP + NIP
NDP depends on NCP + NIP
NIP depends on NCP
NWP depends on NCP
NCP no deps
NPS supports two transport modes (see NPS-1-NCP.md §2.2):
| Mode | Carrier | Use cases |
|---|---|---|
| HTTP mode | NCP frames in HTTP body paired with NWP headers | Overlay deployment, firewall-friendly, recommended for Phase 1 |
| Native mode | Direct TCP/QUIC, NCP frame is the on-the-wire format | High performance, low latency, Phase 2+ |
The whole protocol suite shares port 17433 by default, with routing based on the frame-type byte. Implementations MAY assign independent ports to individual protocols for isolated deployments.
| Protocol | Frame range | Default port | Optional dedicated port |
|---|---|---|---|
| NCP | 0x01–0x0F | 17433 | — |
| NWP | 0x10–0x1F | 17433 | 17434 |
| NIP | 0x20–0x2F | 17433 | 17435 |
| NDP | 0x30–0x3F | 17433 | 17436 |
| NOP | 0x40–0x4F | 17433 | 17437 |
All NPS protocol communication is carried in frames. The default frame has a 4-byte fixed header (1 B frame type + 1 B flags + 2 B payload length) plus a variable-length payload. Extended mode (EXT flag) uses an 8-byte header and supports up to 4 GB payloads. See NPS-1-NCP.md §3.
A Node publishes an AnchorFrame containing the full Schema definition and a SHA-256 anchor_id. Once an Agent caches the AnchorFrame locally, all subsequent requests and responses carry only the anchor_id reference, eliminating repeated Schema transmission. Typical savings within a single session are 30–60% of tokens.
NPS introduces the NPS Token (NPT) as a standardized cross-model token accounting unit. An Agent declares its maximum NPT consumption per request via the X-NWP-Budget header. The Node determines the calculation method through the tokenizer resolution chain and truncates the response or rejects the request accordingly. See token-budget.md.
| Type | Responsibility | Core frames |
|---|---|---|
| Memory Node | Data storage and retrieval | QueryFrame |
| Action Node | Operations and side effects | ActionFrame |
| Complex Node | Mix of data and operations, may contain sub-node references | QueryFrame + ActionFrame |
Each AI agent holds an NID (Neural Identity Descriptor) in the form urn:nps:agent:{issuer}:{id}, issued by a NIP CA. The NID carries capability claims and an access scope, which the node enforces at the protocol layer.
nwp://<host>[:<port>]/<node-path>
# Examples (default port 17433)
nwp://api.myapp.com/products Memory Node
nwp://api.myapp.com/orders/actions Action Node
nwp://api.myapp.com/ecommerce Complex Node
urn:nps:<entity-type>:<issuer-domain>:<identifier>
entity-type: agent | node | org
# Examples
urn:nps:agent:ca.innolotus.com:550e8400-e29b-41d4
urn:nps:node:api.myapp.com:products
urn:nps:org:mycompany.com
NPS/0.2 Suite version
NCP/0.3 Sub-protocol version
All NPS frames share a single byte namespace, partitioned by protocol. See frame-registry.yaml for the full definition.
| Range | Protocol | Frames |
|---|---|---|
| 0x01–0x0F | NCP | AnchorFrame(0x01), DiffFrame(0x02), StreamFrame(0x03), CapsFrame(0x04), AlignFrame(0x05)† |
| 0x10–0x1F | NWP | QueryFrame(0x10), ActionFrame(0x11) |
| 0x20–0x2F | NIP | IdentFrame(0x20), TrustFrame(0x21), RevokeFrame(0x22) |
| 0x30–0x3F | NDP | AnnounceFrame(0x30), ResolveFrame(0x31), GraphFrame(0x32) |
| 0x40–0x4F | NOP | TaskFrame(0x40), DelegateFrame(0x41), SyncFrame(0x42), AlignStream(0x43) |
| 0xF0–0xFF | System | ErrorFrame(0xFE); others reserved |
† AlignFrame(0x05) was marked Deprecated in NCP v0.2 and is replaced by NOP AlignStream(0x43).
Every frame type supports the following encoding tiers, selected via the Flags field of the frame header:
| Tier | Format | Flag | Use cases |
|---|---|---|---|
| Tier-1 | JSON | 0x00 | Development, debugging, compatibility mode |
| Tier-2 | MsgPack (binary) | 0x01 | Production, ~60% size reduction |
| — | Reserved | 0x02 | Reserved for future high-performance encoding |
| — | Reserved | 0x03 | Reserved |
Defaults: Tier-2 for production, Tier-1 for development.
All NPS communication requires TLS 1.3 by default. The Agent authentication flow:
1. Agent → NDP ResolveFrame: resolve target node's physical address
2. Agent → GET /.nwm: read the node manifest's trusted_issuers
3. Agent → Node: send IdentFrame as the connection handshake
4. Node → NIP CA: verify the IdentFrame signature (OCSP or CRL)
5. Node: validate that the Agent's scope covers this node's path
6. Once validated: the Agent issues formal QueryFrame / ActionFrame
The detailed security model appears in each sub-protocol’s Security Considerations chapter.
| Version | Meaning |
|---|---|
v0.x-draft |
Internal draft; breaking changes allowed |
v0.x-alpha |
Public preview; APIs not yet stable |
v0.x-beta |
Feature-complete; external testing welcome |
v1.0 |
Spec frozen; production-ready |
Breaking changes are defined as: frame-format changes, field-semantics changes, or addressing changes. Such changes MUST ship a new Minor or Major version and include a migration guide in CHANGELOG.md.
| Protocol | Position | Relationship to NPS |
|---|---|---|
| REST / GraphQL | Human APIs | NWP is the AI-native replacement |
| MCP | Tool-invocation layer | NPS fills the Web-node network layer MCP does not cover; an MCP adapter is provided |
| A2A | Agent collaboration | NOP covers similar scenarios; an A2A adapter is provided |
NPS does not replace MCP — it adds an efficiency layer on top. MCP answers “how does an AI invoke a tool”; NPS answers “how does an AI plug into the Internet”.
| Phase | Timeline | Goals |
|---|---|---|
| Phase 0 | 2026 Q2 | Unified spec skeleton; public repo release |
| Phase 1 | 2026 Q3 | Core NCP + NWP + NIP implementations; NIP CA Server OSS v0.1 |
| Phase 2 | 2026 Q4 | Complete NDP + NOP; MCP/A2A adapters; TypeScript SDK |
| Phase 3 | 2027 Q1–Q2 | Ecosystem validation; NPS Cloud CA v1.0; industry PoCs |
| Phase 4 | 2027 Q3+ | W3C / IETF standardization; NPS 1.0 freeze |
Full roadmap: NPS-Roadmap.md.
| Purpose | Port |
|---|---|
| NPS unified port (whole suite) | 17433 |
| NIP CA Server API | 17440 |
| NIP CA Admin UI | 8080 |
Optional dedicated per-protocol ports: NWP 17434, NIP 17435, NDP 17436, NOP 17437.
| Scenario | Content-Type |
|---|---|
| NWP standard response | application/nwp-capsule |
| NWP frame data | application/nwp-frame |
| NWM manifest | application/nwp-manifest+json |
| Header | Direction | Description |
|---|---|---|
X-NWP-Agent |
Request | Agent NID |
X-NWP-Budget |
Request | NPT budget ceiling |
X-NWP-Tokenizer |
Request | Tokenizer identifier the Agent uses |
X-NWP-Depth |
Request | Node-graph traversal depth (default 1, max 5) |
X-NWP-Schema |
Response | anchor_id of the Schema used |
X-NWP-Tokens |
Response | Actual NPT consumed |
X-NWP-Tokens-Native |
Response | Native-token consumption (if tokenizer is known) |
X-NWP-Tokenizer-Used |
Response | Tokenizer actually applied |
X-NWP-Cached |
Response | Whether the cache was hit |
| Document | Description |
|---|---|
| status-codes.md | NPS native status codes and HTTP mapping |
| token-budget.md | NPS Token Budget specification |
| error-codes.md | Unified error-code namespace |
| frame-registry.yaml | Machine-readable frame registry |
| Term | Definition |
|---|---|
| NPS | Neural Protocol Suite; umbrella name for this protocol family |
| NCP | Neural Communication Protocol; framing and communication base layer |
| NWP | Neural Web Protocol; AI Web-access layer |
| NIP | Neural Identity Protocol; Agent identity layer |
| NDP | Neural Discovery Protocol; node discovery layer |
| NOP | Neural Orchestration Protocol; multi-agent orchestration layer |
| NID | Neural Identity Descriptor; unique identity for agents/nodes |
| NWM | Neural Web Manifest; machine-readable node manifest |
| NPT | NPS Token; standardized cross-model token unit |
| AnchorFrame | NCP frame type published by a Node for Schema anchoring |
| ErrorFrame | The unified NPS error frame (0xFE), shared by all protocol layers |
| AlignStream | NOP sub-specification; a directed task stream; replaces NCP AlignFrame |
| Token Budget | The maximum NPT consumption the Agent declares for a single request |
| Trust Federation | Mechanism for establishing trust chains across organizational CAs |
| Memory Node | An NWP node type for data storage and retrieval |
| Action Node | An NWP node type for operations and services |
| Complex Node | An NWP node combining data and operations; may contain sub-node references |
| Version | Date | Changes |
|---|---|---|
| 0.2 | 2026-04-12 | Unified port (17433); dual transport modes (HTTP / native); AnchorFrame ownership clarified as Node-published; NPS Token (NPT) accounting; NPS status-code system; ErrorFrame (0xFE); encoding Tier-3 marked Reserved; configurable frame size |
| 0.1-draft | 2026-04-10 | Initial draft, integrating the NCP v0.2 design document |
Copyright: LabAcacia / INNO LOTUS PTY LTD · Apache 2.0