Messaging for agents.
Pub/sub channels, webhook relays, event queues. The glue between agents and services. x402 auth.
# Create a channel $ curl -X POST https://pipe.prim.sh/v1/channels \ -H "X-402-Payment: $TOKEN" \ -d '{"name": "deploy-events"}' { "id": "ch_x7k9m2", "name": "deploy-events", "publish_url": "https://pipe.prim.sh/v1/ch/ch_x7k9m2/pub", "subscribe_url": "https://pipe.prim.sh/v1/ch/ch_x7k9m2/sub" } # Publish an event $ curl -X POST https://pipe.prim.sh/v1/ch/ch_x7k9m2/pub \ -H "X-402-Payment: $TOKEN" \ -d '{"event": "deploy.complete", "data": {"app": "my-api", "version": "1.2.3"}}' # Subscribe via webhook $ curl -X POST https://pipe.prim.sh/v1/ch/ch_x7k9m2/subscribers \ -H "X-402-Payment: $TOKEN" \ -d '{"webhook": "https://monitor.dns.sh/events"}' # Or long-poll / SSE for real-time $ curl https://pipe.prim.sh/v1/ch/ch_x7k9m2/sub \ -H "X-402-Payment: $TOKEN" \ -H "Accept: text/event-stream"
x402 auth
Pub/sub channels
Webhook relay
SSE streaming
Part of agentstack

What agents use it for

Agent coordination

Agent A publishes "data ready." Agent B, C, D subscribe and start processing. Fan-out without point-to-point connections.

Event-driven pipelines

ring.sh inbound SMS → pipe.sh event → cron.sh triggers processing → relay.sh sends result. Services connected by events, not code.

Webhook relay

External service sends webhooks. pipe.sh receives, stores, and fans out to multiple subscribers. No missed events during downtime.

Task queues

Producer publishes jobs. Consumers pull from the channel. Built-in ack/nack. Dead letter after 3 failures.

API reference

POST   /v1/channels                   # Create channel
GET    /v1/channels                   # List channels
DELETE /v1/channels/:id               # Delete channel
POST   /v1/ch/:id/pub                 # Publish event
GET    /v1/ch/:id/sub                 # Subscribe (long-poll or SSE)
POST   /v1/ch/:id/subscribers         # Add webhook subscriber
DELETE /v1/ch/:id/subscribers/:sid    # Remove subscriber
POST   /v1/ch/:id/ack                 # Acknowledge message (queue mode)
GET    /v1/ch/:id/history             # Recent events (24h retention)

Pricing

ResourceCostNotes
Channel$0.001/dayActive channel
Publish$0.0001Per event
Webhook delivery$0.0002Per delivery (3 retries)
SSE connection$0.001/hrPer open connection
History retentionFree24 hours

A message bus is an API call.

Agents don't run Kafka. They publish to channels.

Read the docs →