| English | 中文版 |
A complete internet infrastructure protocol suite for the AI era
NPS is a complete web infrastructure protocol suite designed for AI Agents and models. It consists of five sub-protocols covering AI communication, web access, identity, node discovery, and multi-agent orchestration.
Current release line:
v1.0.0-alpha.16. Source and spec repos are synced; .NET package artifacts are attached to the GitHub Release and published to the Nexus feed.
┌──────────────────────────────────────────────────────────────┐
│ NOP Neural Orchestration Protocol Multi-Agent Orchestration │
├──────────────────────────────────────────────────────────────┤
│ NDP Neural Discovery Protocol Node Discovery │
├──────────────────────────────────────────────────────────────┤
│ NIP Neural Identity Protocol Agent Identity │
├──────────────────────────────────────────────────────────────┤
│ NWP Neural Web Protocol Node Request/Response │
├──────────────────────────────────────────────────────────────┤
│ NCP Neural Communication Protocol AI-to-AI Communication │
└──────────────────────────────────────────────────────────────┘
| Protocol | Analogy | Spec Version | Implementation Status | Port (default / standalone) |
|---|---|---|---|---|
| NCP Neural Communication Protocol | Wire Format | v0.9 | ✅ Reference impl complete; native-mode connection preamble and Tier-3 BinaryVector v1 (binary_vector.v1) landed |
17433 / — |
| NWP Neural Web Protocol | Node request/response | v0.17 | ✅ Memory / Action / Complex / Anchor / Bridge Node — Anchor renamed from Gateway and Bridge introduced by NPS-CR-0001; Bridge Node includes outbound HTTP/HTTPS, gRPC JSON unary, MCP JSON-RPC, and A2A JSON-RPC dispatchers plus inbound MCP/A2A server adapters; Memory / Action Nodes can also serve native-mode NWP over NCP sessions; llm.complete now has official Action/Caps/Stream DTO and payload codec contracts; model-serving Action/Complex Nodes advertise the new NWM profiles.llm LLM/Thinking Profile; HTTP overlay binding rejections now have canonical NWP error codes; Anchor Node gained topology.snapshot / topology.stream reserved query types (NPS-CR-0002); NWM gained optional stability / sla / billing fields for marketplace discovery (issue #36); CR-0002 Phase 2 spec gaps closed — DiffFrame cgn_est per-event budget field, anchor_state sub-type enum, split topology read/subscribe capability gate, mid-stream auth/reputation rejection (issue #41) |
17433 / 17434 |
| NIP Neural Identity Protocol | TLS / PKI | v0.11 | ✅ CA + identity verifier; assurance levels (NPS-RFC-0003) + reputation log entry (NPS-RFC-0004) reference types landed; standard llm:* capability strings registered for NWP LLM/Thinking Profile discovery and authorization |
17433 / 17435 |
| NDP Neural Discovery Protocol | DNS | v0.9 | ✅ Registry + announce validator; AnnounceFrame gained activation_mode + node_roles/cluster_anchor/bridge_protocols (NPS-CR-0001; legacy node_kind is parse-time alias only); v0.7 adds registry security profiles (local-dev / org-private / public-federated) + anti-poisoning + graph_seq rollback defense (issue #33) |
17433 / 17436 |
| NOP Neural Orchestration Protocol | SMTP / MQ | v0.7 | ✅ Orchestration engine + security hardening implemented; saga compensation semantics added | 17433 / 17437 |
Run a loopback stack with npsd + a development NIP CA:
docker compose -f deploy/dev-stack/docker-compose.yml up --build -d npsd nip-ca
For a one-shot MCP/A2A/gRPC smoke test against an NWP echo action:
docker compose -f deploy/dev-stack/docker-compose.yml --profile smoke run --rm ingress-echo
See docs/dev-stack.md.
NPS in production runs as six resident services across three layers —
see docs/daemons/architecture.md for
the full design, tools/daemons/ for the binaries.
| Layer | Daemon | Port | Status (alpha.16 release) |
|---|---|---|---|
| 1 (host-local) | npsd |
17433 | L1 minimum plus loopback dev-stack support |
| 1 (host-local) | nps-runner |
— | L3 task-claim / lease semantics aligned to NPS-CR-0007 |
| 2 (network entry) | nps-ingress |
8080 | Native-mode TLS/mTLS ingress boundary aligned to RFC-0006 |
| 2 (network entry) | nps-registry |
17436 | NDP registry with liveness / staleness semantics |
| 3 (trust anchor) | nps-cloud-ca |
17435 | Deferral skeleton (points at tools/nip-ca-server) |
| 3 (trust anchor) | nps-ledger |
17440 | In-memory NPS-RFC-0004 reputation log |
Existing web protocols were designed for human browsers. When AI Agents access them, three fundamental problems arise:
NPS is designed from the ground up to address these problems through AnchorFrame schema anchoring, Cognon (CGN) standardized metering, and the NID identity system — rebuilding the AI internet infrastructure layer.
Token Economy First
Five Neural Node Roles
Memory Node: Data storage and retrieval (RDS / NoSQL / files / vector databases)Action Node: Operation and service invocationComplex Node: Combined data and processing with node-graph traversal (Depth control)Anchor Node: Cluster entry point and NOP routing control planeBridge Node: NPS-to-external dispatch and external-to-NPS server ingress (HTTP/gRPC/MCP/A2A; MCP/A2A inbound first)AI-Native Identity
Every Agent holds a NID (Neural Identity Descriptor) in the form urn:nps:agent:{issuer}:{id}, issued by a NIP CA. The NID carries capability declarations and access scopes enforced at the protocol layer.
Unified Port & Dual Transport Mode
nps/
├── spec/ # Language-agnostic specification (SSoT)
│ ├── NPS-0-Overview.md # Suite overview v0.4
│ ├── NPS-1-NCP.md # NCP spec v0.9
│ ├── NPS-2-NWP.md # NWP spec v0.17
│ ├── NPS-3-NIP.md # NIP spec v0.11
│ ├── NPS-4-NDP.md # NDP spec v0.9
│ ├── NPS-5-NOP.md # NOP spec v0.7
│ ├── frame-registry.yaml # Machine-readable frame registry v0.13
│ ├── version-matrix.yaml # Machine-readable suite/spec version oracle
│ ├── error-codes.md # Unified error code namespace
│ ├── status-codes.md # NPS native status codes + HTTP mapping
│ ├── token-budget.md # CGN metering spec
│ ├── conformance/ # Shared wire vectors and conformance fixtures
│ ├── services/
│ │ └── NPS-AaaS-Profile.md # AaaS compliance profile v0.2
│ └── rfcs/ # RFC process + 4 drafts (NCP preamble, X.509/ACME NID, assurance levels, reputation log)
├── impl/
│ ├── dotnet/ # C# / .NET 10 reference implementation (includes samples/ + benchmarks/)
│ ├── python/ # Python SDK v1.0.0-alpha.16 release line synced
│ ├── typescript/ # TypeScript SDK v1.0.0-alpha.16 release line synced
│ ├── java/ # Java SDK v1.0.0-alpha.16 release line synced
│ ├── rust/ # Rust SDK v1.0.0-alpha.16 release line synced
│ └── go/ # Go SDK v1.0.0-alpha.16 release line synced
├── tools/
│ ├── daemons/ # Six resident services. 4 OSS published as labacacia/nps-daemons bundle (npsd / nps-runner / nps-ingress / nps-registry); 2 cloud daemons published as private innolotus/nps-cloud-ca + innolotus/nps-ledger
│ ├── nip-ca-server/ # NIP CA Server — C# / ASP.NET Core; published standalone at labacacia/nip-ca-server (subdir example/ holds 5 frozen reference ports)
│ ├── release/ # Release sync scripts (dev → standalone publish repos)
│ └── mirror-to-gitee/ # Gitee mirror sync script (GitHub → Gitee with labacacia URL rewrite)
├── compat/
│ ├── mcp-ingress/ # MCP Ingress v1.0.0-alpha.16 (LabAcacia.McpIngress)
│ ├── a2a-ingress/ # A2A Ingress v1.0.0-alpha.16 (LabAcacia.A2aIngress)
│ └── grpc-ingress/ # gRPC Ingress v1.0.0-alpha.16 (LabAcacia.GrpcIngress)
└── demos/ # Also published standalone at github.com/labacacia/NPS-examples
├── nps-demo/ # End-to-end business demo — NIP identity → AnchorFrame → NOP → DiffFrame
├── nwp-graph-walk/ # NWP Complex Node §11 — depth-scoped fanout + X-NWP-Trace cycle detection
├── ingress-playground/ # One NWP Action Node fronted simultaneously by MCP + A2A + gRPC
└── cross-sdk-interop/ # Four language clients (dotnet/python/node/go) diffed against one Memory Node
Standalone showcase. The three Tier-1 demos (
nwp-graph-walk,ingress-playground,cross-sdk-interop) are also published as a curated repo atlabacacia/NPS-examples(Gitee mirror). The source of truth stays here; the standalone repo exists for discoverability and has per-demo READMEs with principle / purpose / what-it-demonstrates / captured results structure.
The table below describes the current source tree. The 1.0.0-alpha.16
release artifacts have been produced; the .NET package bundle is attached to
the GitHub Release and published to Nexus.
impl/dotnet/)| Component | Version | Status | Contents |
|---|---|---|---|
NPS.Core |
1.0.0-alpha.16 | ✅ Available | Frame codec (MsgPack/JSON), dual-header mode (4B/8B), frame registry, Anchor cache |
NPS.NWP |
1.0.0-alpha.16 | ✅ Available | Memory / Action / Complex / Anchor / Bridge Node middleware; native-mode NWP serving over NCP sessions; /.nwm·/.schema·/actions·/invoke·/query·/system.task.*; graph traversal + X-NWP-Depth + cycle detection; SSRF + idempotency + priority + async task lifecycle |
NPS.NIP |
1.0.0-alpha.16 | ✅ Available | CA library (key generation, certificate issuance/revocation, typed remote CA client, OCSP, CRL), NipIdentVerifier 6-step identity verification |
NPS.NDP |
1.0.0-alpha.16 | ✅ Available | NDP frame types (Announce/Resolve/Graph), in-memory registry (TTL eviction), announce signature validator |
NPS.NOP |
1.0.0-alpha.16 | ✅ Available | DAG orchestration engine (condition eval, input mapping, K-of-N sync, retry/backoff) + §8.2 delegation chain depth limit + §8.4 callback SSRF guard and exponential backoff retry |
NPS.Conformance |
1.0.0-alpha.16 | ✅ Available | Node L1/L2 conformance case catalog, run manifest model, and CI validation helpers |
tools/nip-ca-server |
1.0.0-alpha.16 | ✅ Available | NIP CA Server — C# / ASP.NET Core 10, PostgreSQL, Docker. Published standalone at labacacia/nip-ca-server (the only release-tracked impl); 5 reference ports (Python / TypeScript / Java / Rust / Go) frozen at 1.0.0-alpha.11 under tools/nip-ca-server/example/. |
| Compat ingresses | 1.0.0-alpha.16 | ✅ Available | MCP Ingress (JSON-RPC 2.0, MCP 2024-11-05), A2A Ingress (Google A2A v0.2), gRPC Ingress (HTTP/2, 4 unary RPCs); renamed from *-bridge by NPS-CR-0001 — see docs/compat/index.en.md |
| Daemons | 1.0.0-alpha.16 | ✅ Available | Six resident services: npsd (L1 minimum), nps-runner, nps-ingress, nps-registry, nps-cloud-ca, nps-ledger (RFC-0004 in-memory log); see docs/daemons/architecture.md |
| Samples | — | ✅ Available | samples/NPS.Samples.NopDag — 3-node NOP DAG end-to-end over real HTTP; demos/nps-demo — 4-scene business demo (NIP → AnchorFrame → NOP → DiffFrame) |
| Benchmarks | — | ✅ Available | benchmarks/NPS.Benchmarks.TokenSavings → 45.0% token saving vs REST (exceeds Phase 1 ≥30% exit criterion); benchmarks/NPS.Benchmarks.WireSize → 63.6% MsgPack vs JSON (exceeds Phase 2 ≤50% exit criterion) |
.NET SDK test gate: 696 tests across NPS.Core / NWP / NIP (incl. AssuranceLevel, Reputation, X.509/ACME, revocation, storage, remote CA client) / NDP / NOP / Anchor / Bridge / native NCP / native NWP / conformance / samples / benchmarks; plus 48 ingress tests (15 mcp + 18 a2a + 15 grpc).
impl/python/)| Component | Version | Status | Contents |
|---|---|---|---|
nps-lib |
1.0.0-alpha.16 | ✅ Available | Full NCP + NWP + NIP + NDP + NOP implementation, asyncio + httpx, Ed25519 signing, 162 tests, 97% coverage. Python import module remains nps_sdk. |
impl/typescript/)| Component | Version | Status | Contents |
|---|---|---|---|
@labacacia/nps-sdk |
1.0.0-alpha.16 | ✅ Available | Full NCP + NWP + NIP + NDP + NOP implementation, Node.js 22+, MsgPack + JSON dual encoding, Ed25519 signing, 271 tests. The earlier npm 1.0.0-alpha.11 tarball omitted dist/ and was deprecated; 1.0.0-alpha.16 ships dist/ and the alpha dist-tag now resolves to it. |
impl/java/)| Component | Version | Status | Contents |
|---|---|---|---|
nps-java |
1.0.0-alpha.16 | ✅ Available | Full NCP + NWP + NIP + NDP + NOP implementation, Java 21, MsgPack + JSON dual encoding, Ed25519 built-in signing, AES-256-GCM key encryption, 87 tests |
impl/rust/)| Component | Version | Status | Contents |
|---|---|---|---|
nps-rs |
1.0.0-alpha.16 | ✅ Available | Full NCP + NWP + NIP + NDP + NOP implementation, Rust stable, MsgPack + JSON dual encoding, Ed25519 signing, AES-256-GCM key encryption, Tokio async, 88 tests |
impl/go/)| Component | Version | Status | Contents |
|---|---|---|---|
github.com/labacacia/NPS-sdk-go |
1.0.0-alpha.16 | ✅ Available | Full NCP + NWP + NIP + NDP + NOP implementation, Go 1.25+, MsgPack + JSON dual encoding, Ed25519 built-in signing, AES-256-GCM key encryption, 75 tests |
services.AddNpsCore(opt => {
opt.DefaultTier = EncodingTier.MsgPack;
});
services.AddNwp(opt => {
opt.DefaultTokenBudget = 1000;
});
var query = new QueryFrame {
AnchorRef = "sha256:a3f9b2c1...",
Filter = JsonSerializer.SerializeToElement(new { status = "active" }),
Limit = 50
};
byte[] wire = codec.Encode(query); // auto-handles 4-byte / 8-byte frame headers
Phase 0 — Spec Unification (Complete)
frame-registry.yaml machine-readable frame registry v0.2error-codes.md / status-codes.md error codes with HTTP mappingtoken-budget.md CGN metering specservices/NPS-AaaS-Profile.md AaaS compliance profile v0.1Phase 1 — Core Build (In progress, target 2026 Q3)
NPS.Core C# reference implementation — frame codec libraryNPS.NWP C# reference implementation — Memory / Action / Complex / Anchor / Bridge Node middlewareNPS.NIP C# reference implementation — CA library + identity verifier (OCSP / CRL)NPS.NDP C# reference implementation — frame types + registry + announce validatorNPS.NOP C# reference implementation — full orchestration engine + security hardeningnps-lib v1.0.0-alpha.16 (Phase 1) (NCP + NWP + NIP + NDP + NOP, 162 tests; import module nps_sdk)NPS.Core, NPS.NWP, etc.) — 14 packages published to Nexus; 14 symbol packages generated and retained in the GitHub Release bundlenps-lib)Phase 2 — Ecosystem Expansion (In progress)
1.0.0-alpha.11 which omitted dist/; alpha dist-tag now resolves to 1.0.0-alpha.16)LabAcacia.McpIngress, MCP 2024-11-05, JSON-RPC 2.0; renamed by NPS-CR-0001)LabAcacia.A2aIngress, Google A2A v0.2; renamed by NPS-CR-0001)LabAcacia.GrpcIngress, 4 unary RPCs; renamed by NPS-CR-0001)tools/daemons/ (npsd / nps-runner / nps-ingress / nps-registry / nps-cloud-ca / nps-ledger) — see docs/daemons/architecture.mdcompat/*-bridge → compat/*-ingress rename)topology.snapshot / topology.stream reserved query types on Anchor Node; .NET reference impl + L2 conformance suite — daemon-side adoption deferred)samples/NPS.Samples.NopDag) — Phase 2 DAG exit criterion met| Topic | Description |
|---|---|
| Frame Model | NCP frame structure, encoding tiers, flags bitmap, schema anchoring |
| NID Identity System | NID format, certificate structure, 6-step verification, OCSP, scope wildcards |
| DAG Orchestration | Execution flow, input mapping, K-of-N sync, callbacks and aggregation strategies |
| Node Types | Memory / Action / Complex / Anchor / Bridge node comparison |
| Package | Description |
|---|---|
| .NET SDK Index | Environment requirements, package dependencies, DI registration overview |
| NPS.Core | Frame types, codecs, AnchorCache, exception hierarchy |
| NPS.NWP | QueryFrame, Filter DSL, MemoryNodeMiddleware, NWM manifest |
| NPS.NIP | NipIdentVerifier 6-step verification, NipCaService, NipSigner, CA HTTP routes |
| NPS.NDP | AnnounceFrame, INdpRegistry, NdpAnnounceValidator |
| NPS.NOP | TaskFrame/DAG model, NopOrchestrator, callback validator, condition/input mapping |
| Topic | Description |
|---|---|
| Compat overview | When to pick MCP / A2A / gRPC; shared design and non-goals |
| MCP Ingress deep dive | 1:N upstream model, tool-name encoding, async lifecycle, header semantics |
| A2A Ingress deep dive | 1:1 AgentCard mapping, skill lookup, task state translation, in-memory binding |
| gRPC Ingress deep dive | Bytes-passthrough rationale, dual error mapping, multi-language clients |
| Report | Result |
|---|---|
| REST vs NWP token savings | Aggregate 45.0% CGN reduction (S1 43.1% / S2 44.0% / S3 54.2%) — exceeds Phase 1 ≥30% exit criterion |
| Tier-1 JSON vs Tier-2 MsgPack wire size | Aggregate 63.6% byte reduction on steady-state frames — exceeds Phase 2 ≤50% exit criterion |
| Document | Description |
|---|---|
| NPS Overview | Suite entry point, frame namespace at a glance |
| NCP Spec | Frame wire format, encoding tiers, dual-header mode |
| NWP Spec | Node request/response semantics, Filter DSL, streaming responses |
| NIP Spec | Identity protocol, Ed25519 signing, CRL/OCSP |
| NDP Spec | Node discovery, TTL broadcast, graph sync |
| NOP Spec | DAG orchestration, delegation chains, K-of-N |
| Cognon (CGN) Metering | Cross-model standardized token metering unit |
| Error Code Namespace | Unified error codes across all protocols |
| Status Code Mapping | NPS native status codes with HTTP mapping |
| AaaS Compliance Profile | Anchor Node + Bridge Node, Vector Proxy, L1/L2/L3 compliance levels |
| Daemon architecture | Six-daemon, three-layer reference deployment topology |
| RFC process + drafts | RFC-0001 NCP preamble · 0002 X.509+ACME NID · 0003 assurance levels · 0004 reputation log |
| Output | Owner |
|---|---|
| NPS Specification | LabAcacia / INNO LOTUS PTY LTD |
| Reference Implementations (OSS) | LabAcacia |
| NPS Cloud Service | INNO LOTUS PTY LTD |
LabAcacia is the open-source lab under INNO LOTUS PTY LTD. Licensed under Apache 2.0.
Apache 2.0 © 2026 INNO LOTUS PTY LTD