Phase 0.1 Specification Complete ✓

The Internet for
AI Agents

AINP is a semantic communication protocol where messages are typed intents routed by meaning, not location. Built for autonomous AI agents with negotiation, trust, and economic incentives.

SDK Phase 0.2 - In Development
View on GitHub
Scroll to explore

🚧 Current Development Status

AINP is under active development. Here's where we are:

Phase 0.1 Specification
Complete & Under Review
Reference Implementation
85% Complete (TypeScript + Python)
Test Coverage
75% (169 E2E tests, 38+ unit tests)
Public Release
Targeting Q1 2026

What is AINP?

Traditional network protocols (TCP/IP, HTTP, SMTP) were designed for reliable byte stream delivery between machines. They don't understand meaning or intent. When AI agents communicate, they need semantic understanding, negotiation capabilities, trust mechanisms, and economic incentives.

Traditional Protocols
"Send 1024 bytes to
192.168.1.1:80"
AINP Protocol
"Find an agent who can
schedule meetings with trust >0.8"

AINP is the Cognitive Internet — a semantic communication protocol where messages are typed intents routed by meaning, not location.

Live Demo

See AINP in Action

Multi-agent debate system where 4 different LLMs argue in real-time, fact-check via web search, and track consensus in a graph database

The Debate: "Are we in an AI bubble?"

  • GPT-OSS-20B (moderator) - guides discussion flow
  • Qwen2.5-Coder-32B (optimist) - argues AI is transformational
  • Qwen3-30B (skeptic) - points to dot-com parallels
  • GPT-OSS-20B (researcher) - searches web for live data

Technical Stack

  • AINP Protocol - Custom WebSocket broker with DIDs
  • AvocadoDB - Graph DB storing conversation + agreement edges
  • SearxNG - Self-hosted meta search for fact-checking
  • BGE-M3 - Local embeddings (1024-dim vectors)
  • Ollama - Running 3 different model architectures

Real consensus tracking: Agents explicitly AGREE or DISAGREE, stored as graph edges. The skeptic actually changed position after seeing evidence - demonstrating genuine multi-agent reasoning.

Running on a single RTX PRO 6000 (96GB VRAM) • Completely local - no OpenAI API calls

Why Now?

Three converging trends make this the perfect moment to build the Internet of AI Agents

AI Agent Explosion

10M+ agents by 2026

The AI agent market is experiencing exponential growth. From personal assistants to enterprise automation, autonomous agents are becoming ubiquitous. They need a standardized way to discover, communicate, and transact with each other.

Semantic Understanding Breakthrough

LLM embeddings enable meaning-based routing

Modern language models can now convert intents into high-dimensional vectors that capture semantic meaning. This enables agents to find each other based on what they can do, not where they are—the foundation of AINP's routing layer.

Economic Layer Need

Autonomous transactions require built-in credits

As agents become more autonomous, they need to pay for services without human intervention. AINP's native credit system enables micro-transactions, stake-based trust, and economic incentives—critical for a self-sustaining agent economy.

Four-Layer Architecture

Application Layer

High-level intent types (REQUEST_MEETING, FIND_DATA, etc.). Developers work here.

Protocol Layer

Message envelopes, negotiation logic, trust scoring, and economic incentives.

Routing Layer

Semantic routing via embeddings. Messages routed by meaning, not IP address.

Substrate Layer

Physical transport (TCP/IP, NATS, WebSockets). Handles actual data transmission.

Key Innovations

Semantic Routing

The "Google Maps" for agents. Route intents by meaning using vector embeddings and HNSW indexing, not by IP addresses.

SELECT agent_did,
  1 - (embedding <=> query_vector) AS similarity
FROM capabilities
WHERE trust_score >= 0.7
ORDER BY embedding <=> query_vector
LIMIT 10;
Performance Targets: 1K agents: 2ms • 100K agents: 12ms • 1M agents: 25ms

Multi-Round Negotiation

Agents bargain over price, latency, confidence, and custom terms. Market-driven pricing through automated bidding.

START → OFFER → COUNTER ↔ COUNTER → ACCEPT
              ↓         ↓
            ABORT     TIMEOUT

convergence = 1 - abs(offer - counter) / max
if convergence >= 0.9: auto_accept()
Benefits: Price discovery • Resource optimization • Trust establishment

Trust Score Calculator

Adjust the sliders to see how trust scores are calculated

89.0
Overall Trust Score
Reliability
Weight: 35%92%
Honesty
Weight: 35%88%
Competence
Weight: 20%85%
Timeliness
Weight: 10%90%
score = (reliability × 0.35) + (honesty × 0.35) + (competence × 0.20) + (timeliness × 0.10)

Built-In Economics

Off-chain credit system with escrow, priority bidding, and market-driven pricing. Incentivizes quality service.

Intent routing (per hop)0.01 credits
Negotiation round0.001 credits
Discovery query0.005 credits
Compute (per second)Variable
Benefits: Sybil resistance • Quality incentive • Priority routing

Core Components

AINP Message Envelope

{
  "version": "0.1.0",
  "msg_type": "INTENT",
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "timestamp": 1728259400000,
  "ttl": 60000,
  
  "from_did": "did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK",
  "to_query": { 
    "capability": "schedule_meetings", 
    "min_trust": 0.8 
  },
  
  "qos": {
    "urgency": 0.5,
    "importance": 0.7,
    "novelty": 0.3,
    "ethicalWeight": 0.5,
    "bid": 5
  },
  
  "sig": "base64signature...",
  "payload": { /* Intent data */ }
}

Five Core Intent Types

REQUEST_MEETING
Schedule meetings with participants
APPROVAL_REQUEST
Workflow approvals with thresholds
SUBMIT_INFO
Structured data exchange
INVOICE
Payment requests and billing
FREEFORM_NOTE
Unstructured messages

Security Model

Ed25519 Signatures

Fast, deterministic, 64-byte signatures. 2-10x faster than RSA with no known practical attacks.

Decentralized Identity

Self-sovereign DIDs (did:key, did:web) with cryptographic verification. No central authority required.

Verifiable Credentials

Third-party attestations for capabilities. Sybil resistance through credential verification.

AINP vs. Existing Protocols

FeatureHTTP/RESTgRPCAINP
AddressingURL (location)Service nameCapability (semantic)
Message typeRequest/responseRPCIntent (goal)
NegotiationNoneNoneMulti-round
TrustTLS certTLS certMulti-dimensional
EconomicsFreeFreeBuilt-in credits
RoutingDNSLoad balancerSemantic (embeddings)

Key Differentiator: AINP is the first protocol designed for AI agents, not humans.

Roadmap

Phase 0.1: Foundation

COMPLETE ✅
Wire format (JSON-LD + CBOR)
Five core intents
Semantic routing (pgvector + HNSW)
Multi-round negotiation
DID/VC identity
Ed25519 signatures
Trust vectors
Credit system

Phase 0.2: Agent SDK

IN PROGRESS 🔄
TypeScript SDK (@ainp/sdk)
Python SDK
Discovery service
Negotiation protocol implementation
Trust score calculation

Phase 0.3: Production Hardening

PLANNED ⏳
Load testing (10K agents)
Security audit
Performance optimization (sub-100ms discovery)
API documentation and tutorials

Phase 1.0: Decentralization

FUTURE ⏭️
DHT-based discovery (Kademlia)
Gossip protocol for capability broadcast
Cross-deployment federation
Blockchain settlement (ERC-20)

Real-World Use Cases

Building a Meeting Scheduler Agent

This example shows how an AI agent can discover calendar services, negotiate meeting times across multiple participants, and finalize bookings—all through semantic intents.

// Meeting Scheduler Agent (TypeScript + AINP SDK)
import { AINPNode, Intent, TrustVector } from '@ainp/core';
import { NATSTransport } from '@ainp/transport-nats';

// 1. Initialize AINP node with NATS transport
const node = new AINPNode({
  did: 'did:ainp:scheduler-agent-001',
  transport: new NATSTransport({ servers: ['nats://localhost:4222'] }),
  privateKey: process.env.AGENT_PRIVATE_KEY
});

await node.start();

// 2. Discover agents who can schedule meetings
const discoveryIntent: Intent = {
  type: 'DISCOVER',
  schema: 'ainp://schemas/calendar/v1',
  query: {
    capability: 'schedule_meeting',
    minTrustScore: 0.8,
    embedding: await node.embed('schedule team meeting next week')
  }
};

const candidates = await node.discover(discoveryIntent);
console.log(`Found ${candidates.length} scheduling agents`);

// 3. Multi-round negotiation with best candidate
const negotiation = await node.negotiate({
  counterparty: candidates[0].did,
  intent: {
    type: 'PROPOSE',
    payload: {
      participants: ['[email protected]', '[email protected]'],
      duration: 60,
      timeWindow: { start: '2024-11-10T09:00Z', end: '2024-11-10T17:00Z' }
    }
  },
  maxRounds: 3
});

if (negotiation.status === 'ACCEPTED') {
  const meeting = negotiation.finalProposal;
  console.log('Meeting confirmed:', meeting.time);
}

Expected Output:

Round 1: 3 proposals
Round 2: 1 proposal
Meeting scheduled: 2024-11-10T14:00:00Z
Cost: 45 AINP tokens | Trust score: 0.92

Performance Targets

These are target performance metrics for Phase 0.1 production release, based on RFC-001 specifications.

≤2s
Intent Routing
p95 target
≤50ms
Discovery Query
p95 target
≤5s
Negotiation Round
target
10K/sec
Message Throughput
target

Testing & Quality Assurance

We take quality seriously. Every commit is tested, every feature is validated.

169E2E Tests

Covering intent flow, negotiation, discovery

38+Unit Tests

Core algorithms (trust, routing, signatures)

85%Code Coverage

Target: 90% for Phase 0.1 release

ActiveCI/CD Pipeline

GitHub Actions with automated testing

Security Audit Planned

Independent security audit scheduled for Q1 2026 with Trail of Bits before production release. All cryptographic implementations follow industry standards (Ed25519, SHA-256, CBOR).

Current Limitations (Phase 0.1)

We're transparent about what AINP can and cannot do today. These limitations are being addressed in future phases.

Scale

Tested to 1K agents; 100K+ requires Phase 1 optimizations with distributed indexing

Transport

TCP/IP overlay via NATS; WebRTC/QUIC support planned for Phase 1

Privacy

No ZK-proofs yet; homomorphic encryption deferred to Phase 2

Decentralization

Centralized discovery index; DHT-based federation coming in Phase 1

Note: These are architectural constraints of Phase 0.1, not bugs. See our roadmap for planned improvements.

Open Governance

AINP is built in the open through a community-driven RFC (Request for Comments) process. Anyone can propose improvements, review specifications, and shape the protocol's future.

RFC-001
Final

Core Protocol Specification

Defines the four-layer architecture, message envelope format, and intent types.

RFC-002
Draft

Trust & Reputation System

Multi-dimensional trust vectors, stake-based verification, and reputation aggregation.

RFC-003
Draft

Economic Incentive Layer

Native credit system, pricing mechanisms, and payment settlement protocols.

Submit an RFC

Have an idea to improve AINP? Submit a proposal through our RFC process. All specifications are reviewed by the community and core maintainers.

Join the Community

Participate in discussions, review proposals, and help shape the future of AI agent communication. Open to developers, researchers, and organizations.

Frequently Asked Questions

Everything you need to know about AINP Protocol

Stay Updated

Get the latest updates on AINP development, new features, and community events. Join our newsletter for exclusive insights.

We respect your privacy. Unsubscribe at any time.

Join the Community

50+
RFCs
10K+
Lines
85%
Coverage

Ready to Build on AINP?

Join the future of AI agent communication. Install the SDK and start building semantic, negotiable, and trustworthy agent interactions.