Everything is better with

PartyKit is an open source deployment platform for AI agents, multiplayer and local-first apps, games, and websites.

Infinitely customizable. You bring the code, we do the hosting. Use any package from npm, or write your own servers from scratch.

Batteries included. Analytics, staging environments, secrets management, logging. All the tools your team needs to build production apps.

Speed and scale. A worldwide edge network with low latency, anywhere on Earth. We enable your ambition, from your first user to millions.

Only pay for what you use. A generous free tier, and pay-as-you-go pricing. No more paying for unused resources.

Works with your existing tools

React Logo

Effortless Integrations

Works well with with popular collaboration frameworks and libraries.  Y.js, Automerge, Replicache, XState, tldraw, they all Just Work™.

Logos / Lockup v2


PartyKit integrates with your current setup. Plays nicely with Vercel, Netlify, AWS, Cloudflare, fly.io, or wherever you host your app. No big rewrite needed.


WebSockets, Fetch, Request-Response, Wasm. PartyKit uses web standards to guarantee interoperability with all your tools, now and in the future.

HTML5 Logo

Getting Started

Let's create a simple stateful web server that responds to WebSockets and HTTP Requests!

Install with npm

npm install partykit

Write your code

// server.js
export default class Server {
  onMessage(message, websocket) {
  onRequest(request) {
    return new Response(`This is room ${party.id}`);

Develop on localhost

npx partykit dev server.js

Deploy to the edge

npx partykit deploy server.js --name first-party

Try it out

curl https://first-party.{yourname}.partykit.dev/party/my-room


Everything's better with friends

Brandon Dail

Staff Engineer, Discord

I did a bunch of work recently with Y.js and PartyKit and can confirm it made some of the most difficult parts a breeze. You should 100% try it out at least if it’s relevant to what you’re building.

David Khourshid

Founder, Stately

It's the future of workflows.

Yousef El-Dardiry

Maintainer, BlockNote.js

A breeze to set up 🙂 Just takes less than 40 lines of code to do! Looking forward to the future of PartyKit!

Anders Bech Mellson

Developer, Stately

We've been having a blast using PartyKit at StatelyAI for a little while. It makes implementing real-time a breeze. Try it on your next thing 🎉

Bhanu Teja P

Founder, SiteGPT

I have been trying to solve a real-time sync problem for SiteGPT for months now. I tried everything and nothing seemed to work properly. Sunil solved my entire problem using PartyKit in around 10 lines of code 🤯 10 lines... and I am not even exaggerating 😅 PartyKit is awesome!!

Adam Janiš

Staff Engineer, Kiwi.com

oh god this is so easy

Designed for real-time collaborative apps

The future of the Internet is collaborative. It has always been hard and operationally expensive to build experiences that bring the world together. PartyKit changes that.

Welcome to the party, pal!