v0.2 · Implementation Draft

Real-time transport for portable AI agents

DARTC defines a signed, topic-multiplexed message envelope over WebRTC DataChannels — with a WebSocket relay fallback and first-class A2A alignment.

MITLicense
v0.2Protocol Version
A2AAligned
Ed25519Signed

Core Properties

Built for the agentic web

Every design decision in DARTC optimises for security, low latency, and clean interoperability with emerging AI-agent standards.

Ed25519 Signed Envelopes

Every DARTC frame carries a base64 Ed25519 signature over a canonicalized JSON representation — replay-resistant, tamper-evident.

WebRTC-First, Relay Fallback

Peer-to-peer over WebRTC DataChannels by default. When NAT traversal fails, the same signed envelopes are relayed over WebSocket — no payload mutation required.

Topic Multiplexing

A single connection carries arbitrarily many logical channels via the topic field. Reserved topics cover protocol lifecycle; application topics are open-ended.

A2A Alignment

Topics prefixed with a2a. carry Agent Cards, Messages, Tasks, and Artifacts. DARTC is the delivery binding — A2A remains the semantic standard.

Streaming & Chunking

Built-in stream metadata (chunk_id, is_final, priority) enables ordered token-by-token delivery. Backpressure is managed with per-message acknowledgement flags.

Session Policy

The dartc.hello handshake negotiates protocol versions, supported topics, and cryptographic identity — giving operators granular control over session policy.

Message Routing

Topic taxonomy

DARTC routes every frame by its topic field. Reserved prefixes handle the protocol lifecycle; everything else belongs to A2A or your application.

TopicPurpose
DARTC Reserved
dartc.helloSession negotiation and topic advertisement
dartc.ackPositive acknowledgement for requires_ack messages
dartc.errorProtocol or application error reporting
dartc.pingHeartbeat / keepalive
dartc.closeGraceful session shutdown
A2A Topics
a2a.discoveryExchange Agent Cards between peers
a2a.messageSend or stream A2A Message objects
a2a.taskTask state, subscription, cancellation, and artifacts
a2a.capabilityCapability or extension advertisement
Application Topics
<any prefix>Open — application-defined routing. E.g. orders, calendar, support, negotiate

Roadmap

Implementation milestones

Six concrete milestones from core library to full relay fallback, tracked openly on GitHub.

01Shared @dartc/core package

Envelope types, canonicalization, Ed25519 signing adapters, topic helpers, ack/error helpers, and tests.

02Generic byte signing/verification exports

Language-agnostic signing and verification utilities usable by any conforming runtime.

03Browser shim — hello & chat.request

Browser shim sends dartc.hello and a chat request topic over an existing WebRTC DataChannel.

04Origin daemon — DARTC envelope acceptance

Accept both legacy frames and DARTC envelopes, verify signatures, and stream signed DARTC deltas back to the caller.

05A2A Agent Card generation

Generate Agent Cards from a signed pod manifest, exposing agent capabilities via the a2a.discovery topic.

06WebSocket relay fallback

Relay the same DARTC envelopes over WebSocket when WebRTC cannot establish a peer-to-peer connection.

Protocol Envelope

One JSON object.
Complete integrity.

Every DARTC frame is a single JSON envelope carrying the sender identity, topic, timestamp, Ed25519 signature, and — optionally — an A2A object and streaming metadata. Nothing more.

  • UUIDv7 message IDs for total ordering
  • Canonical JSON key sorting before signing
  • Clock-skew window for replay defence
  • Typed A2A + DARTC fields — no schema conflicts
{
  "version": "0.2",
  "msg_id": "018f2f42-...",
  "from":  "visitor:session-pubkey",
  "to":    "agent:origin",
  "topic": "dartc.hello",
  "timestamp": 1747070000000,
  "dartc": {
    "requires_ack": true
  },
  "payload": {
    "role": "visitor",
    "protocol_versions": {
      "dartc": "0.2",
      "a2a":   "0.2.2"
    },
    "supported_topics": [
      "dartc.*",
      "a2a.discovery"
    ]
  },
  "signature": "base64-ed25519..."
}