[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-rivet-rivetkit-client-react":3,"mdc-fg7siw-key":38,"related-repo-rivet-rivetkit-client-react":1101,"related-org-rivet-rivetkit-client-react":1229},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":12,"stars":27,"repoUrl":28,"updatedAt":29,"license":30,"forks":31,"topics":32,"repo":33,"sourceUrl":36,"mdContent":37},"rivetkit-client-react","use RivetKit React client","RivetKit React client guidance. Use for React apps that connect to Rivet Actors with @rivetkit\u002Freact, create hooks with createRivetKit, or manage realtime state with useActor.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},"rivet","Rivet","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Frivet.png","rivet-dev",[13,15,18,21,24],{"name":9,"slug":8,"type":14},"tag",{"name":16,"slug":17,"type":14},"React","react",{"name":19,"slug":20,"type":14},"SDK","sdk",{"name":22,"slug":23,"type":14},"Frontend","frontend",{"name":25,"slug":26,"type":14},"State Management","state-management",17,"https:\u002F\u002Fgithub.com\u002Frivet-dev\u002Fskills","2026-07-30T05:31:36.618873",null,7,[],{"repoUrl":28,"stars":27,"forks":31,"topics":34,"description":35},[],"Generated skill files for Rivet AI integrations","https:\u002F\u002Fgithub.com\u002Frivet-dev\u002Fskills\u002Ftree\u002FHEAD\u002Frivetkit-client-react","---\nname: \"rivetkit-client-react\"\ndescription: \"RivetKit React client guidance. Use for React apps that connect to Rivet Actors with @rivetkit\u002Freact, create hooks with createRivetKit, or manage realtime state with useActor.\"\n---\n\n# RivetKit React Client\n\nUse this skill when building React apps that connect to Rivet Actors with `@rivetkit\u002Freact`.\n\n## First Steps\n\n1. Install the React client (latest: 2.3.7)\n   ```bash\n   npm install @rivetkit\u002Freact@2.3.7\n   ```\n2. Create hooks with `createRivetKit()` and connect with `useActor()`.\n\n## Error Handling Policy\n\n- Prefer fail-fast behavior by default.\n- Avoid `try\u002Fcatch` unless absolutely needed.\n- If a `catch` is used, handle the error explicitly, at minimum by logging it.\n\n## Getting Started\n\nSee the [React quickstart guide](\u002Fdocs\u002Factors\u002Fquickstart\u002Freact) for getting started.\n\n## Install\n\n## Minimal Client\n\n## Stateless vs Stateful\n\n## Getting Actors\n\n## Connection Parameters\n\n## Subscribing to Events\n\n## Connection Lifecycle\n\n## Low-Level HTTP & WebSocket\n\nUse the JavaScript client for raw HTTP and WebSocket access:\n\n```tsx @nocheck\nimport { createClient } from \"rivetkit\u002Fclient\";\n\nconst client = createClient();\nconst handle = client.chatRoom.getOrCreate([\"general\"]);\n\nconst response = await handle.fetch(\"history\");\nconst history = await response.json();\n\nconst ws = await handle.webSocket(\"stream\");\nws.addEventListener(\"message\", (event) => {\n  console.log(\"message:\", event.data);\n});\nws.send(\"hello\");\n```\n\n## Calling from Backend\n\nUse the JavaScript client on your backend (Node.js\u002FBun). See the [JavaScript client docs](\u002Fdocs\u002Fclients\u002Fjavascript).\n\n## Error Handling\n\n## Concepts\n\n### Keys\n\nKeys uniquely identify actor instances. Use compound keys (arrays) for hierarchical addressing:\n\nDon't build keys with string interpolation like `\"org:${userId}\"` when `userId` contains user data. Use arrays instead to prevent key injection attacks.\n\n### Environment Variables\n\n`createRivetKit()` (and the underlying `createClient()` instance) automatically read:\n\n- `RIVET_ENDPOINT`\n- `RIVET_NAMESPACE`\n- `RIVET_TOKEN`\n- `RIVET_POOL`\n\nDefaults to `http:\u002F\u002Flocalhost:6420` when unset. RivetKit runs on port 6420 by default.\n\n### Endpoint Format\n\nEndpoints support URL auth syntax:\n\n```\nhttps:\u002F\u002Fnamespace:token@api.rivet.dev\n```\n\nYou can also pass the endpoint without auth and provide `RIVET_NAMESPACE` and `RIVET_TOKEN` separately. For serverless deployments, use your app's `\u002Fapi\u002Frivet` URL. See [Endpoints](\u002Fdocs\u002Fgeneral\u002Fendpoints#url-auth-syntax) for details.\n\n## API Reference\n\n**Package:** [@rivetkit\u002Freact](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@rivetkit\u002Freact)\n\n- [`createRivetKit`](\u002Fdocs\u002Fclients\u002Freact) - Create hooks for React\n- [`useActor`](\u002Fdocs\u002Fclients\u002Freact) - Hook for actor instances\n\n## Need More Than the Client?\n\nIf you need more about Rivet Actors, registries, or server-side RivetKit, add the main skill:\n\n```bash\nnpx skills add rivet-dev\u002Fskills\n```\n\nThen use the `rivetkit` skill for backend guidance.\n\n",{"data":39,"body":40},{"name":4,"description":6},{"type":41,"children":42},"root",[43,52,67,74,138,144,179,185,199,205,211,217,223,229,235,241,247,252,790,796,808,814,820,827,832,853,859,877,916,929,935,940,950,985,991,1009,1041,1047,1052,1082,1095],{"type":44,"tag":45,"props":46,"children":48},"element","h1",{"id":47},"rivetkit-react-client",[49],{"type":50,"value":51},"text","RivetKit React Client",{"type":44,"tag":53,"props":54,"children":55},"p",{},[56,58,65],{"type":50,"value":57},"Use this skill when building React apps that connect to Rivet Actors with ",{"type":44,"tag":59,"props":60,"children":62},"code",{"className":61},[],[63],{"type":50,"value":64},"@rivetkit\u002Freact",{"type":50,"value":66},".",{"type":44,"tag":68,"props":69,"children":71},"h2",{"id":70},"first-steps",[72],{"type":50,"value":73},"First Steps",{"type":44,"tag":75,"props":76,"children":77},"ol",{},[78,118],{"type":44,"tag":79,"props":80,"children":81},"li",{},[82,84],{"type":50,"value":83},"Install the React client (latest: 2.3.7)\n",{"type":44,"tag":85,"props":86,"children":91},"pre",{"className":87,"code":88,"language":89,"meta":90,"style":90},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","npm install @rivetkit\u002Freact@2.3.7\n","bash","",[92],{"type":44,"tag":59,"props":93,"children":94},{"__ignoreMap":90},[95],{"type":44,"tag":96,"props":97,"children":100},"span",{"class":98,"line":99},"line",1,[101,107,113],{"type":44,"tag":96,"props":102,"children":104},{"style":103},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[105],{"type":50,"value":106},"npm",{"type":44,"tag":96,"props":108,"children":110},{"style":109},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[111],{"type":50,"value":112}," install",{"type":44,"tag":96,"props":114,"children":115},{"style":109},[116],{"type":50,"value":117}," @rivetkit\u002Freact@2.3.7\n",{"type":44,"tag":79,"props":119,"children":120},{},[121,123,129,131,137],{"type":50,"value":122},"Create hooks with ",{"type":44,"tag":59,"props":124,"children":126},{"className":125},[],[127],{"type":50,"value":128},"createRivetKit()",{"type":50,"value":130}," and connect with ",{"type":44,"tag":59,"props":132,"children":134},{"className":133},[],[135],{"type":50,"value":136},"useActor()",{"type":50,"value":66},{"type":44,"tag":68,"props":139,"children":141},{"id":140},"error-handling-policy",[142],{"type":50,"value":143},"Error Handling Policy",{"type":44,"tag":145,"props":146,"children":147},"ul",{},[148,153,166],{"type":44,"tag":79,"props":149,"children":150},{},[151],{"type":50,"value":152},"Prefer fail-fast behavior by default.",{"type":44,"tag":79,"props":154,"children":155},{},[156,158,164],{"type":50,"value":157},"Avoid ",{"type":44,"tag":59,"props":159,"children":161},{"className":160},[],[162],{"type":50,"value":163},"try\u002Fcatch",{"type":50,"value":165}," unless absolutely needed.",{"type":44,"tag":79,"props":167,"children":168},{},[169,171,177],{"type":50,"value":170},"If a ",{"type":44,"tag":59,"props":172,"children":174},{"className":173},[],[175],{"type":50,"value":176},"catch",{"type":50,"value":178}," is used, handle the error explicitly, at minimum by logging it.",{"type":44,"tag":68,"props":180,"children":182},{"id":181},"getting-started",[183],{"type":50,"value":184},"Getting Started",{"type":44,"tag":53,"props":186,"children":187},{},[188,190,197],{"type":50,"value":189},"See the ",{"type":44,"tag":191,"props":192,"children":194},"a",{"href":193},"\u002Fdocs\u002Factors\u002Fquickstart\u002Freact",[195],{"type":50,"value":196},"React quickstart guide",{"type":50,"value":198}," for getting started.",{"type":44,"tag":68,"props":200,"children":202},{"id":201},"install",[203],{"type":50,"value":204},"Install",{"type":44,"tag":68,"props":206,"children":208},{"id":207},"minimal-client",[209],{"type":50,"value":210},"Minimal Client",{"type":44,"tag":68,"props":212,"children":214},{"id":213},"stateless-vs-stateful",[215],{"type":50,"value":216},"Stateless vs Stateful",{"type":44,"tag":68,"props":218,"children":220},{"id":219},"getting-actors",[221],{"type":50,"value":222},"Getting Actors",{"type":44,"tag":68,"props":224,"children":226},{"id":225},"connection-parameters",[227],{"type":50,"value":228},"Connection Parameters",{"type":44,"tag":68,"props":230,"children":232},{"id":231},"subscribing-to-events",[233],{"type":50,"value":234},"Subscribing to Events",{"type":44,"tag":68,"props":236,"children":238},{"id":237},"connection-lifecycle",[239],{"type":50,"value":240},"Connection Lifecycle",{"type":44,"tag":68,"props":242,"children":244},{"id":243},"low-level-http-websocket",[245],{"type":50,"value":246},"Low-Level HTTP & WebSocket",{"type":44,"tag":53,"props":248,"children":249},{},[250],{"type":50,"value":251},"Use the JavaScript client for raw HTTP and WebSocket access:",{"type":44,"tag":85,"props":253,"children":258},{"className":254,"code":255,"language":256,"meta":257,"style":90},"language-tsx shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { createClient } from \"rivetkit\u002Fclient\";\n\nconst client = createClient();\nconst handle = client.chatRoom.getOrCreate([\"general\"]);\n\nconst response = await handle.fetch(\"history\");\nconst history = await response.json();\n\nconst ws = await handle.webSocket(\"stream\");\nws.addEventListener(\"message\", (event) => {\n  console.log(\"message:\", event.data);\n});\nws.send(\"hello\");\n","tsx","@nocheck",[259],{"type":44,"tag":59,"props":260,"children":261},{"__ignoreMap":90},[262,313,323,357,424,432,495,537,545,604,669,731,748],{"type":44,"tag":96,"props":263,"children":264},{"class":98,"line":99},[265,271,277,283,288,293,298,303,308],{"type":44,"tag":96,"props":266,"children":268},{"style":267},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[269],{"type":50,"value":270},"import",{"type":44,"tag":96,"props":272,"children":274},{"style":273},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[275],{"type":50,"value":276}," {",{"type":44,"tag":96,"props":278,"children":280},{"style":279},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[281],{"type":50,"value":282}," createClient",{"type":44,"tag":96,"props":284,"children":285},{"style":273},[286],{"type":50,"value":287}," }",{"type":44,"tag":96,"props":289,"children":290},{"style":267},[291],{"type":50,"value":292}," from",{"type":44,"tag":96,"props":294,"children":295},{"style":273},[296],{"type":50,"value":297}," \"",{"type":44,"tag":96,"props":299,"children":300},{"style":109},[301],{"type":50,"value":302},"rivetkit\u002Fclient",{"type":44,"tag":96,"props":304,"children":305},{"style":273},[306],{"type":50,"value":307},"\"",{"type":44,"tag":96,"props":309,"children":310},{"style":273},[311],{"type":50,"value":312},";\n",{"type":44,"tag":96,"props":314,"children":316},{"class":98,"line":315},2,[317],{"type":44,"tag":96,"props":318,"children":320},{"emptyLinePlaceholder":319},true,[321],{"type":50,"value":322},"\n",{"type":44,"tag":96,"props":324,"children":326},{"class":98,"line":325},3,[327,333,338,343,348,353],{"type":44,"tag":96,"props":328,"children":330},{"style":329},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[331],{"type":50,"value":332},"const",{"type":44,"tag":96,"props":334,"children":335},{"style":279},[336],{"type":50,"value":337}," client ",{"type":44,"tag":96,"props":339,"children":340},{"style":273},[341],{"type":50,"value":342},"=",{"type":44,"tag":96,"props":344,"children":346},{"style":345},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[347],{"type":50,"value":282},{"type":44,"tag":96,"props":349,"children":350},{"style":279},[351],{"type":50,"value":352},"()",{"type":44,"tag":96,"props":354,"children":355},{"style":273},[356],{"type":50,"value":312},{"type":44,"tag":96,"props":358,"children":360},{"class":98,"line":359},4,[361,365,370,374,379,383,388,392,397,402,406,411,415,420],{"type":44,"tag":96,"props":362,"children":363},{"style":329},[364],{"type":50,"value":332},{"type":44,"tag":96,"props":366,"children":367},{"style":279},[368],{"type":50,"value":369}," handle ",{"type":44,"tag":96,"props":371,"children":372},{"style":273},[373],{"type":50,"value":342},{"type":44,"tag":96,"props":375,"children":376},{"style":279},[377],{"type":50,"value":378}," client",{"type":44,"tag":96,"props":380,"children":381},{"style":273},[382],{"type":50,"value":66},{"type":44,"tag":96,"props":384,"children":385},{"style":279},[386],{"type":50,"value":387},"chatRoom",{"type":44,"tag":96,"props":389,"children":390},{"style":273},[391],{"type":50,"value":66},{"type":44,"tag":96,"props":393,"children":394},{"style":345},[395],{"type":50,"value":396},"getOrCreate",{"type":44,"tag":96,"props":398,"children":399},{"style":279},[400],{"type":50,"value":401},"([",{"type":44,"tag":96,"props":403,"children":404},{"style":273},[405],{"type":50,"value":307},{"type":44,"tag":96,"props":407,"children":408},{"style":109},[409],{"type":50,"value":410},"general",{"type":44,"tag":96,"props":412,"children":413},{"style":273},[414],{"type":50,"value":307},{"type":44,"tag":96,"props":416,"children":417},{"style":279},[418],{"type":50,"value":419},"])",{"type":44,"tag":96,"props":421,"children":422},{"style":273},[423],{"type":50,"value":312},{"type":44,"tag":96,"props":425,"children":427},{"class":98,"line":426},5,[428],{"type":44,"tag":96,"props":429,"children":430},{"emptyLinePlaceholder":319},[431],{"type":50,"value":322},{"type":44,"tag":96,"props":433,"children":435},{"class":98,"line":434},6,[436,440,445,449,454,459,463,468,473,477,482,486,491],{"type":44,"tag":96,"props":437,"children":438},{"style":329},[439],{"type":50,"value":332},{"type":44,"tag":96,"props":441,"children":442},{"style":279},[443],{"type":50,"value":444}," response ",{"type":44,"tag":96,"props":446,"children":447},{"style":273},[448],{"type":50,"value":342},{"type":44,"tag":96,"props":450,"children":451},{"style":267},[452],{"type":50,"value":453}," await",{"type":44,"tag":96,"props":455,"children":456},{"style":279},[457],{"type":50,"value":458}," handle",{"type":44,"tag":96,"props":460,"children":461},{"style":273},[462],{"type":50,"value":66},{"type":44,"tag":96,"props":464,"children":465},{"style":345},[466],{"type":50,"value":467},"fetch",{"type":44,"tag":96,"props":469,"children":470},{"style":279},[471],{"type":50,"value":472},"(",{"type":44,"tag":96,"props":474,"children":475},{"style":273},[476],{"type":50,"value":307},{"type":44,"tag":96,"props":478,"children":479},{"style":109},[480],{"type":50,"value":481},"history",{"type":44,"tag":96,"props":483,"children":484},{"style":273},[485],{"type":50,"value":307},{"type":44,"tag":96,"props":487,"children":488},{"style":279},[489],{"type":50,"value":490},")",{"type":44,"tag":96,"props":492,"children":493},{"style":273},[494],{"type":50,"value":312},{"type":44,"tag":96,"props":496,"children":497},{"class":98,"line":31},[498,502,507,511,515,520,524,529,533],{"type":44,"tag":96,"props":499,"children":500},{"style":329},[501],{"type":50,"value":332},{"type":44,"tag":96,"props":503,"children":504},{"style":279},[505],{"type":50,"value":506}," history ",{"type":44,"tag":96,"props":508,"children":509},{"style":273},[510],{"type":50,"value":342},{"type":44,"tag":96,"props":512,"children":513},{"style":267},[514],{"type":50,"value":453},{"type":44,"tag":96,"props":516,"children":517},{"style":279},[518],{"type":50,"value":519}," response",{"type":44,"tag":96,"props":521,"children":522},{"style":273},[523],{"type":50,"value":66},{"type":44,"tag":96,"props":525,"children":526},{"style":345},[527],{"type":50,"value":528},"json",{"type":44,"tag":96,"props":530,"children":531},{"style":279},[532],{"type":50,"value":352},{"type":44,"tag":96,"props":534,"children":535},{"style":273},[536],{"type":50,"value":312},{"type":44,"tag":96,"props":538,"children":540},{"class":98,"line":539},8,[541],{"type":44,"tag":96,"props":542,"children":543},{"emptyLinePlaceholder":319},[544],{"type":50,"value":322},{"type":44,"tag":96,"props":546,"children":548},{"class":98,"line":547},9,[549,553,558,562,566,570,574,579,583,587,592,596,600],{"type":44,"tag":96,"props":550,"children":551},{"style":329},[552],{"type":50,"value":332},{"type":44,"tag":96,"props":554,"children":555},{"style":279},[556],{"type":50,"value":557}," ws ",{"type":44,"tag":96,"props":559,"children":560},{"style":273},[561],{"type":50,"value":342},{"type":44,"tag":96,"props":563,"children":564},{"style":267},[565],{"type":50,"value":453},{"type":44,"tag":96,"props":567,"children":568},{"style":279},[569],{"type":50,"value":458},{"type":44,"tag":96,"props":571,"children":572},{"style":273},[573],{"type":50,"value":66},{"type":44,"tag":96,"props":575,"children":576},{"style":345},[577],{"type":50,"value":578},"webSocket",{"type":44,"tag":96,"props":580,"children":581},{"style":279},[582],{"type":50,"value":472},{"type":44,"tag":96,"props":584,"children":585},{"style":273},[586],{"type":50,"value":307},{"type":44,"tag":96,"props":588,"children":589},{"style":109},[590],{"type":50,"value":591},"stream",{"type":44,"tag":96,"props":593,"children":594},{"style":273},[595],{"type":50,"value":307},{"type":44,"tag":96,"props":597,"children":598},{"style":279},[599],{"type":50,"value":490},{"type":44,"tag":96,"props":601,"children":602},{"style":273},[603],{"type":50,"value":312},{"type":44,"tag":96,"props":605,"children":607},{"class":98,"line":606},10,[608,613,617,622,626,630,635,639,644,649,655,659,664],{"type":44,"tag":96,"props":609,"children":610},{"style":279},[611],{"type":50,"value":612},"ws",{"type":44,"tag":96,"props":614,"children":615},{"style":273},[616],{"type":50,"value":66},{"type":44,"tag":96,"props":618,"children":619},{"style":345},[620],{"type":50,"value":621},"addEventListener",{"type":44,"tag":96,"props":623,"children":624},{"style":279},[625],{"type":50,"value":472},{"type":44,"tag":96,"props":627,"children":628},{"style":273},[629],{"type":50,"value":307},{"type":44,"tag":96,"props":631,"children":632},{"style":109},[633],{"type":50,"value":634},"message",{"type":44,"tag":96,"props":636,"children":637},{"style":273},[638],{"type":50,"value":307},{"type":44,"tag":96,"props":640,"children":641},{"style":273},[642],{"type":50,"value":643},",",{"type":44,"tag":96,"props":645,"children":646},{"style":273},[647],{"type":50,"value":648}," (",{"type":44,"tag":96,"props":650,"children":652},{"style":651},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[653],{"type":50,"value":654},"event",{"type":44,"tag":96,"props":656,"children":657},{"style":273},[658],{"type":50,"value":490},{"type":44,"tag":96,"props":660,"children":661},{"style":329},[662],{"type":50,"value":663}," =>",{"type":44,"tag":96,"props":665,"children":666},{"style":273},[667],{"type":50,"value":668}," {\n",{"type":44,"tag":96,"props":670,"children":672},{"class":98,"line":671},11,[673,678,682,687,692,696,701,705,709,714,718,723,727],{"type":44,"tag":96,"props":674,"children":675},{"style":279},[676],{"type":50,"value":677},"  console",{"type":44,"tag":96,"props":679,"children":680},{"style":273},[681],{"type":50,"value":66},{"type":44,"tag":96,"props":683,"children":684},{"style":345},[685],{"type":50,"value":686},"log",{"type":44,"tag":96,"props":688,"children":690},{"style":689},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[691],{"type":50,"value":472},{"type":44,"tag":96,"props":693,"children":694},{"style":273},[695],{"type":50,"value":307},{"type":44,"tag":96,"props":697,"children":698},{"style":109},[699],{"type":50,"value":700},"message:",{"type":44,"tag":96,"props":702,"children":703},{"style":273},[704],{"type":50,"value":307},{"type":44,"tag":96,"props":706,"children":707},{"style":273},[708],{"type":50,"value":643},{"type":44,"tag":96,"props":710,"children":711},{"style":279},[712],{"type":50,"value":713}," event",{"type":44,"tag":96,"props":715,"children":716},{"style":273},[717],{"type":50,"value":66},{"type":44,"tag":96,"props":719,"children":720},{"style":279},[721],{"type":50,"value":722},"data",{"type":44,"tag":96,"props":724,"children":725},{"style":689},[726],{"type":50,"value":490},{"type":44,"tag":96,"props":728,"children":729},{"style":273},[730],{"type":50,"value":312},{"type":44,"tag":96,"props":732,"children":734},{"class":98,"line":733},12,[735,740,744],{"type":44,"tag":96,"props":736,"children":737},{"style":273},[738],{"type":50,"value":739},"}",{"type":44,"tag":96,"props":741,"children":742},{"style":279},[743],{"type":50,"value":490},{"type":44,"tag":96,"props":745,"children":746},{"style":273},[747],{"type":50,"value":312},{"type":44,"tag":96,"props":749,"children":751},{"class":98,"line":750},13,[752,756,760,765,769,773,778,782,786],{"type":44,"tag":96,"props":753,"children":754},{"style":279},[755],{"type":50,"value":612},{"type":44,"tag":96,"props":757,"children":758},{"style":273},[759],{"type":50,"value":66},{"type":44,"tag":96,"props":761,"children":762},{"style":345},[763],{"type":50,"value":764},"send",{"type":44,"tag":96,"props":766,"children":767},{"style":279},[768],{"type":50,"value":472},{"type":44,"tag":96,"props":770,"children":771},{"style":273},[772],{"type":50,"value":307},{"type":44,"tag":96,"props":774,"children":775},{"style":109},[776],{"type":50,"value":777},"hello",{"type":44,"tag":96,"props":779,"children":780},{"style":273},[781],{"type":50,"value":307},{"type":44,"tag":96,"props":783,"children":784},{"style":279},[785],{"type":50,"value":490},{"type":44,"tag":96,"props":787,"children":788},{"style":273},[789],{"type":50,"value":312},{"type":44,"tag":68,"props":791,"children":793},{"id":792},"calling-from-backend",[794],{"type":50,"value":795},"Calling from Backend",{"type":44,"tag":53,"props":797,"children":798},{},[799,801,807],{"type":50,"value":800},"Use the JavaScript client on your backend (Node.js\u002FBun). See the ",{"type":44,"tag":191,"props":802,"children":804},{"href":803},"\u002Fdocs\u002Fclients\u002Fjavascript",[805],{"type":50,"value":806},"JavaScript client docs",{"type":50,"value":66},{"type":44,"tag":68,"props":809,"children":811},{"id":810},"error-handling",[812],{"type":50,"value":813},"Error Handling",{"type":44,"tag":68,"props":815,"children":817},{"id":816},"concepts",[818],{"type":50,"value":819},"Concepts",{"type":44,"tag":821,"props":822,"children":824},"h3",{"id":823},"keys",[825],{"type":50,"value":826},"Keys",{"type":44,"tag":53,"props":828,"children":829},{},[830],{"type":50,"value":831},"Keys uniquely identify actor instances. Use compound keys (arrays) for hierarchical addressing:",{"type":44,"tag":53,"props":833,"children":834},{},[835,837,843,845,851],{"type":50,"value":836},"Don't build keys with string interpolation like ",{"type":44,"tag":59,"props":838,"children":840},{"className":839},[],[841],{"type":50,"value":842},"\"org:${userId}\"",{"type":50,"value":844}," when ",{"type":44,"tag":59,"props":846,"children":848},{"className":847},[],[849],{"type":50,"value":850},"userId",{"type":50,"value":852}," contains user data. Use arrays instead to prevent key injection attacks.",{"type":44,"tag":821,"props":854,"children":856},{"id":855},"environment-variables",[857],{"type":50,"value":858},"Environment Variables",{"type":44,"tag":53,"props":860,"children":861},{},[862,867,869,875],{"type":44,"tag":59,"props":863,"children":865},{"className":864},[],[866],{"type":50,"value":128},{"type":50,"value":868}," (and the underlying ",{"type":44,"tag":59,"props":870,"children":872},{"className":871},[],[873],{"type":50,"value":874},"createClient()",{"type":50,"value":876}," instance) automatically read:",{"type":44,"tag":145,"props":878,"children":879},{},[880,889,898,907],{"type":44,"tag":79,"props":881,"children":882},{},[883],{"type":44,"tag":59,"props":884,"children":886},{"className":885},[],[887],{"type":50,"value":888},"RIVET_ENDPOINT",{"type":44,"tag":79,"props":890,"children":891},{},[892],{"type":44,"tag":59,"props":893,"children":895},{"className":894},[],[896],{"type":50,"value":897},"RIVET_NAMESPACE",{"type":44,"tag":79,"props":899,"children":900},{},[901],{"type":44,"tag":59,"props":902,"children":904},{"className":903},[],[905],{"type":50,"value":906},"RIVET_TOKEN",{"type":44,"tag":79,"props":908,"children":909},{},[910],{"type":44,"tag":59,"props":911,"children":913},{"className":912},[],[914],{"type":50,"value":915},"RIVET_POOL",{"type":44,"tag":53,"props":917,"children":918},{},[919,921,927],{"type":50,"value":920},"Defaults to ",{"type":44,"tag":59,"props":922,"children":924},{"className":923},[],[925],{"type":50,"value":926},"http:\u002F\u002Flocalhost:6420",{"type":50,"value":928}," when unset. RivetKit runs on port 6420 by default.",{"type":44,"tag":821,"props":930,"children":932},{"id":931},"endpoint-format",[933],{"type":50,"value":934},"Endpoint Format",{"type":44,"tag":53,"props":936,"children":937},{},[938],{"type":50,"value":939},"Endpoints support URL auth syntax:",{"type":44,"tag":85,"props":941,"children":945},{"className":942,"code":944,"language":50},[943],"language-text","https:\u002F\u002Fnamespace:token@api.rivet.dev\n",[946],{"type":44,"tag":59,"props":947,"children":948},{"__ignoreMap":90},[949],{"type":50,"value":944},{"type":44,"tag":53,"props":951,"children":952},{},[953,955,960,962,967,969,975,977,983],{"type":50,"value":954},"You can also pass the endpoint without auth and provide ",{"type":44,"tag":59,"props":956,"children":958},{"className":957},[],[959],{"type":50,"value":897},{"type":50,"value":961}," and ",{"type":44,"tag":59,"props":963,"children":965},{"className":964},[],[966],{"type":50,"value":906},{"type":50,"value":968}," separately. For serverless deployments, use your app's ",{"type":44,"tag":59,"props":970,"children":972},{"className":971},[],[973],{"type":50,"value":974},"\u002Fapi\u002Frivet",{"type":50,"value":976}," URL. See ",{"type":44,"tag":191,"props":978,"children":980},{"href":979},"\u002Fdocs\u002Fgeneral\u002Fendpoints#url-auth-syntax",[981],{"type":50,"value":982},"Endpoints",{"type":50,"value":984}," for details.",{"type":44,"tag":68,"props":986,"children":988},{"id":987},"api-reference",[989],{"type":50,"value":990},"API Reference",{"type":44,"tag":53,"props":992,"children":993},{},[994,1000,1002],{"type":44,"tag":995,"props":996,"children":997},"strong",{},[998],{"type":50,"value":999},"Package:",{"type":50,"value":1001}," ",{"type":44,"tag":191,"props":1003,"children":1007},{"href":1004,"rel":1005},"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@rivetkit\u002Freact",[1006],"nofollow",[1008],{"type":50,"value":64},{"type":44,"tag":145,"props":1010,"children":1011},{},[1012,1027],{"type":44,"tag":79,"props":1013,"children":1014},{},[1015,1025],{"type":44,"tag":191,"props":1016,"children":1018},{"href":1017},"\u002Fdocs\u002Fclients\u002Freact",[1019],{"type":44,"tag":59,"props":1020,"children":1022},{"className":1021},[],[1023],{"type":50,"value":1024},"createRivetKit",{"type":50,"value":1026}," - Create hooks for React",{"type":44,"tag":79,"props":1028,"children":1029},{},[1030,1039],{"type":44,"tag":191,"props":1031,"children":1032},{"href":1017},[1033],{"type":44,"tag":59,"props":1034,"children":1036},{"className":1035},[],[1037],{"type":50,"value":1038},"useActor",{"type":50,"value":1040}," - Hook for actor instances",{"type":44,"tag":68,"props":1042,"children":1044},{"id":1043},"need-more-than-the-client",[1045],{"type":50,"value":1046},"Need More Than the Client?",{"type":44,"tag":53,"props":1048,"children":1049},{},[1050],{"type":50,"value":1051},"If you need more about Rivet Actors, registries, or server-side RivetKit, add the main skill:",{"type":44,"tag":85,"props":1053,"children":1055},{"className":87,"code":1054,"language":89,"meta":90,"style":90},"npx skills add rivet-dev\u002Fskills\n",[1056],{"type":44,"tag":59,"props":1057,"children":1058},{"__ignoreMap":90},[1059],{"type":44,"tag":96,"props":1060,"children":1061},{"class":98,"line":99},[1062,1067,1072,1077],{"type":44,"tag":96,"props":1063,"children":1064},{"style":103},[1065],{"type":50,"value":1066},"npx",{"type":44,"tag":96,"props":1068,"children":1069},{"style":109},[1070],{"type":50,"value":1071}," skills",{"type":44,"tag":96,"props":1073,"children":1074},{"style":109},[1075],{"type":50,"value":1076}," add",{"type":44,"tag":96,"props":1078,"children":1079},{"style":109},[1080],{"type":50,"value":1081}," rivet-dev\u002Fskills\n",{"type":44,"tag":53,"props":1083,"children":1084},{},[1085,1087,1093],{"type":50,"value":1086},"Then use the ",{"type":44,"tag":59,"props":1088,"children":1090},{"className":1089},[],[1091],{"type":50,"value":1092},"rivetkit",{"type":50,"value":1094}," skill for backend guidance.",{"type":44,"tag":1096,"props":1097,"children":1098},"style",{},[1099],{"type":50,"value":1100},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":1102,"total":1228},[1103,1126,1144,1163,1179,1195,1210],{"slug":1104,"name":1104,"fn":1105,"description":1106,"org":1107,"tags":1108,"stars":27,"repoUrl":28,"updatedAt":1125},"ai-agent","build AI agent backends with Rivet","Build an AI agent backend with persistent memory: one Rivet Actor per conversation, queued message handling, and streaming LLM responses as realtime events.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1109,1112,1115,1118,1121,1124],{"name":1110,"slug":1111,"type":14},"Agents","agents",{"name":1113,"slug":1114,"type":14},"Backend","backend",{"name":1116,"slug":1117,"type":14},"LLM","llm",{"name":1119,"slug":1120,"type":14},"Memory","memory",{"name":1122,"slug":1123,"type":14},"Real-time","real-time",{"name":9,"slug":8,"type":14},"2026-07-21T05:37:45.411803",{"slug":1127,"name":1127,"fn":1128,"description":1129,"org":1130,"tags":1131,"stars":27,"repoUrl":28,"updatedAt":1143},"ai-agent-workspace","create persistent workspaces for AI agents","Give every AI agent its own computer: a persistent workspace with a filesystem, processes, shells, networking, and agent sessions on a lightweight in-process OS.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1132,1133,1136,1139,1140],{"name":1110,"slug":1111,"type":14},{"name":1134,"slug":1135,"type":14},"File Storage","file-storage",{"name":1137,"slug":1138,"type":14},"Infrastructure","infrastructure",{"name":9,"slug":8,"type":14},{"name":1141,"slug":1142,"type":14},"Sandboxing","sandboxing","2026-06-14T08:06:57.274844",{"slug":1145,"name":1145,"fn":1146,"description":1147,"org":1148,"tags":1149,"stars":27,"repoUrl":28,"updatedAt":1162},"chat-room","build realtime chat rooms with Rivet","Build a realtime chat room backend with Rivet Actors: one actor per room, SQLite-backed message history, and WebSocket broadcast to every connected client.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1150,1151,1154,1155,1156,1159],{"name":1113,"slug":1114,"type":14},{"name":1152,"slug":1153,"type":14},"Messaging","messaging",{"name":1122,"slug":1123,"type":14},{"name":9,"slug":8,"type":14},{"name":1157,"slug":1158,"type":14},"SQL","sql",{"name":1160,"slug":1161,"type":14},"WebSockets","websockets","2026-07-21T05:37:48.403494",{"slug":1164,"name":1164,"fn":1165,"description":1166,"org":1167,"tags":1168,"stars":27,"repoUrl":28,"updatedAt":1178},"collaborative-text-editor","build collaborative text editors with Rivet","Build a collaborative text editor backend with Yjs CRDTs and Rivet Actors: per-document actors relay sync and awareness updates and persist snapshots.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1169,1170,1173,1176,1177],{"name":1113,"slug":1114,"type":14},{"name":1171,"slug":1172,"type":14},"Collaboration","collaboration",{"name":1174,"slug":1175,"type":14},"Documents","documents",{"name":1122,"slug":1123,"type":14},{"name":9,"slug":8,"type":14},"2026-07-21T05:37:49.412829",{"slug":1180,"name":1180,"fn":1181,"description":1182,"org":1183,"tags":1184,"stars":27,"repoUrl":28,"updatedAt":1194},"cron-jobs","schedule durable cron jobs with Rivet","Patterns for durable one-shot, calendar, and fixed-interval work on Rivet Actors.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1185,1188,1189,1190,1191],{"name":1186,"slug":1187,"type":14},"Automation","automation",{"name":1113,"slug":1114,"type":14},{"name":1137,"slug":1138,"type":14},{"name":9,"slug":8,"type":14},{"name":1192,"slug":1193,"type":14},"Scheduling","scheduling","2026-07-21T05:37:43.395911",{"slug":1196,"name":1196,"fn":1197,"description":1198,"org":1199,"tags":1200,"stars":27,"repoUrl":28,"updatedAt":1209},"live-cursors","implement live cursors and multiplayer presence","Live cursors and multiplayer presence with Rivet Actors: per-connection cursor state, realtime updates over events or raw WebSockets, and throttling.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1201,1202,1203,1204,1205,1208],{"name":1171,"slug":1172,"type":14},{"name":22,"slug":23,"type":14},{"name":1122,"slug":1123,"type":14},{"name":9,"slug":8,"type":14},{"name":1206,"slug":1207,"type":14},"UX Design","ux-design",{"name":1160,"slug":1161,"type":14},"2026-07-21T05:37:47.391088",{"slug":1211,"name":1211,"fn":1212,"description":1213,"org":1214,"tags":1215,"stars":27,"repoUrl":28,"updatedAt":1227},"multiplayer-game","build multiplayer games with Rivet","Pragmatic patterns for building multiplayer games: matchmaking, tick loops, realtime state, interest management, and validation.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1216,1219,1222,1225,1226],{"name":1217,"slug":1218,"type":14},"Architecture","architecture",{"name":1220,"slug":1221,"type":14},"Engineering","engineering",{"name":1223,"slug":1224,"type":14},"Game Development","game-development",{"name":1122,"slug":1123,"type":14},{"name":9,"slug":8,"type":14},"2026-07-21T05:37:44.627991",16,{"items":1230,"total":27},[1231,1240,1248,1257,1265,1273,1282,1290,1308,1323,1337,1345],{"slug":1104,"name":1104,"fn":1105,"description":1106,"org":1232,"tags":1233,"stars":27,"repoUrl":28,"updatedAt":1125},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1234,1235,1236,1237,1238,1239],{"name":1110,"slug":1111,"type":14},{"name":1113,"slug":1114,"type":14},{"name":1116,"slug":1117,"type":14},{"name":1119,"slug":1120,"type":14},{"name":1122,"slug":1123,"type":14},{"name":9,"slug":8,"type":14},{"slug":1127,"name":1127,"fn":1128,"description":1129,"org":1241,"tags":1242,"stars":27,"repoUrl":28,"updatedAt":1143},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1243,1244,1245,1246,1247],{"name":1110,"slug":1111,"type":14},{"name":1134,"slug":1135,"type":14},{"name":1137,"slug":1138,"type":14},{"name":9,"slug":8,"type":14},{"name":1141,"slug":1142,"type":14},{"slug":1145,"name":1145,"fn":1146,"description":1147,"org":1249,"tags":1250,"stars":27,"repoUrl":28,"updatedAt":1162},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1251,1252,1253,1254,1255,1256],{"name":1113,"slug":1114,"type":14},{"name":1152,"slug":1153,"type":14},{"name":1122,"slug":1123,"type":14},{"name":9,"slug":8,"type":14},{"name":1157,"slug":1158,"type":14},{"name":1160,"slug":1161,"type":14},{"slug":1164,"name":1164,"fn":1165,"description":1166,"org":1258,"tags":1259,"stars":27,"repoUrl":28,"updatedAt":1178},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1260,1261,1262,1263,1264],{"name":1113,"slug":1114,"type":14},{"name":1171,"slug":1172,"type":14},{"name":1174,"slug":1175,"type":14},{"name":1122,"slug":1123,"type":14},{"name":9,"slug":8,"type":14},{"slug":1180,"name":1180,"fn":1181,"description":1182,"org":1266,"tags":1267,"stars":27,"repoUrl":28,"updatedAt":1194},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1268,1269,1270,1271,1272],{"name":1186,"slug":1187,"type":14},{"name":1113,"slug":1114,"type":14},{"name":1137,"slug":1138,"type":14},{"name":9,"slug":8,"type":14},{"name":1192,"slug":1193,"type":14},{"slug":1196,"name":1196,"fn":1197,"description":1198,"org":1274,"tags":1275,"stars":27,"repoUrl":28,"updatedAt":1209},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1276,1277,1278,1279,1280,1281],{"name":1171,"slug":1172,"type":14},{"name":22,"slug":23,"type":14},{"name":1122,"slug":1123,"type":14},{"name":9,"slug":8,"type":14},{"name":1206,"slug":1207,"type":14},{"name":1160,"slug":1161,"type":14},{"slug":1211,"name":1211,"fn":1212,"description":1213,"org":1283,"tags":1284,"stars":27,"repoUrl":28,"updatedAt":1227},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1285,1286,1287,1288,1289],{"name":1217,"slug":1218,"type":14},{"name":1220,"slug":1221,"type":14},{"name":1223,"slug":1224,"type":14},{"name":1122,"slug":1123,"type":14},{"name":9,"slug":8,"type":14},{"slug":1291,"name":1291,"fn":1292,"description":1293,"org":1294,"tags":1295,"stars":27,"repoUrl":28,"updatedAt":1307},"per-tenant-database","implement multi-tenant data isolation with Rivet","Multi-tenant data isolation with one Rivet Actor per tenant: the actor key is the tenant id, so each tenant gets its own isolated dataset and migrations.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1296,1297,1300,1303,1306],{"name":1217,"slug":1218,"type":14},{"name":1298,"slug":1299,"type":14},"Database","database",{"name":1301,"slug":1302,"type":14},"Migration","migration",{"name":1304,"slug":1305,"type":14},"Multi-Tenant","multi-tenant",{"name":9,"slug":8,"type":14},"2026-07-21T05:37:46.414425",{"slug":1092,"name":1092,"fn":1309,"description":1310,"org":1311,"tags":1312,"stars":27,"repoUrl":28,"updatedAt":1322},"build and debug Rivet Actors","RivetKit backend and Rivet Actor runtime guidance. Use for building, modifying, debugging, or testing Rivet Actors, registries, serverless\u002Frunner modes, deployment, or actor-based workflows.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1313,1314,1315,1318,1321],{"name":1110,"slug":1111,"type":14},{"name":1113,"slug":1114,"type":14},{"name":1316,"slug":1317,"type":14},"Debugging","debugging",{"name":1319,"slug":1320,"type":14},"Deployment","deployment",{"name":9,"slug":8,"type":14},"2026-07-24T05:38:58.10133",{"slug":1324,"name":1324,"fn":1325,"description":1326,"org":1327,"tags":1328,"stars":27,"repoUrl":28,"updatedAt":1336},"rivetkit-client-javascript","use RivetKit JavaScript client","RivetKit JavaScript client guidance. Use for browser, Node.js, or Bun clients that connect to Rivet Actors with rivetkit\u002Fclient, create clients, call actions, or manage connections.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1329,1330,1331,1334,1335],{"name":1113,"slug":1114,"type":14},{"name":22,"slug":23,"type":14},{"name":1332,"slug":1333,"type":14},"JavaScript","javascript",{"name":9,"slug":8,"type":14},{"name":19,"slug":20,"type":14},"2026-07-30T05:31:37.725576",{"slug":4,"name":4,"fn":5,"description":6,"org":1338,"tags":1339,"stars":27,"repoUrl":28,"updatedAt":29},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1340,1341,1342,1343,1344],{"name":22,"slug":23,"type":14},{"name":16,"slug":17,"type":14},{"name":9,"slug":8,"type":14},{"name":19,"slug":20,"type":14},{"name":25,"slug":26,"type":14},{"slug":1346,"name":1346,"fn":1347,"description":1348,"org":1349,"tags":1350,"stars":27,"repoUrl":28,"updatedAt":1358},"rivetkit-client-rust","build RivetKit Rust clients","RivetKit Rust client guidance. Use for Rust clients and backends that connect to Rivet Actors with rivetkit::client, create typed actor handles, call actions, or manage connections.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1351,1354,1355],{"name":1352,"slug":1353,"type":14},"API Development","api-development",{"name":1113,"slug":1114,"type":14},{"name":1356,"slug":1357,"type":14},"Rust","rust","2026-07-24T05:39:02.105888"]