The docs for @playcode/sdk, the package your app's backend uses for AI, are now a section of their own, so you find what you need and copy code that works.
A quick start, and a map of what you can build with each part.
Agents in depth: tools, how a run ends, approvals, hooks, fallback models, sub-agents and spending limits.
A chat for your users, step by step: the chat endpoint and the React hook.
Runs that survive a restart, on your own database and queue.
Examples from real use cases: reading invoices, sorting tickets, answering from your own data, refunds a person reviews, a weekly report.
A reference of every option, event, error and default.
Every code sample in these pages compiles against the SDK: a test checks them on every release.
Activity and webhooks now include what happens inside your projects: file changes, commands, publishes and environment variables. These events were recorded before, but they were missing from the workspace's activity, and no webhook received them.
A project's events reach only the people who can see the project:
A private project's events stay with the people it is shared with.
An access token limited to some projects sees only their events.
A webhook gets a project's events only while the person who added it can see that project.
@playcode/cli 0.2 (npm) is out. Update with npm i -g @playcode/cli@latest.
playcode projects lists your projects again. In 0.1.1 it printed the list of project operations instead.
170 operations of the Playcode API, up from 89. Among the new ones: workspaces with their members and invites, billing settings and top-ups, creating a project of a chosen type, a Cloud app's computer settings and restores, uploads for big inputs, chats, project export and aliases, and app services. playcode <family> help lists a family's operations and marks the ones that need consent.
Every operation that charges money takes two steps, and so do destructive ones like deleting a project, a workspace or a chat: a proposal that states the terms, then the operation with that proposal's id. See Consent.
The CLI carries the operation list of its release, so an operation Playcode adds later needs a newer CLI. playcode mcp always reads the current list.
The Playcode SDK now does the hard parts of an AI agent for you. Ask the agent for a chat in your app, and it comes with these by default.
Conversations that keep going. Each of your users has their own conversations, saved in your app's database. An answer goes on when the page reloads or the server restarts, and picks up from its last finished step.
Actions wait for approval. An action your user confirms - a booking, an email in their name - waits for their Approve or Deny in the chat. An action only you allow, such as a refund, waits for you on your app's admin page.
A daily line per user. Set what one of your users may spend in a day. Past it, the chat says so before it calls a model.
What each user costs. Ask the agent what your app's AI cost, per user, per model or per day.
A spare model. Name a second model, and when the first one's maker is down, the chat goes on with it.
Long chats stay inside the model's limits. Old tool results are cleared first, then a short brief stands for the older part.
Agents cost less. An agent reads the part of its prompt that repeats from the cache, at the model's cache price.
Tested without credits. A scripted model and recorded runs let you test your agent with no network.
The chat page is plain and yours to restyle. Your app's secret key never reaches the browser.
Try it: Add a support chat to my app - each customer has their own conversation, refunds wait for my approval, and a customer can spend at most 1 credit a day.
Since October 8, an ad blocker could hide parts of the sign-in window on the Playcode website, the one that opens after you type an idea on the home page or pick a plan on the pricing page. With a blocker turned on, the Continue with Google, GitHub and Microsoft buttons were missing, and the field for the 6-digit email code did not show. Without that field, you could not finish signing in.
The sign-in window now shows every button and the code field, with or without an ad blocker. If it stopped you before, try again. You do not need to turn your ad blocker off.
The Create access token dialog in Settings → Workspace → Developers now offers every permission the API understands - including read-only levels (see projects, see domains, see chats), project management without the computer, and Drive the agent (start chats the Playcode agent works on). The list is served by the API itself, so new permissions appear in the dialog the day they exist.
Tokens are also editable now: change a token's name or permissions at any time without re-issuing the secret - the change applies on the token's next call. The workspace, project reach and expiry stay fixed; revoke and re-create to change those.
When you sign up and send your first message, it now goes straight to the agent. Before, many new accounts saw the pricing screen first, even though their free credits had already arrived, and had to send the message again.
Playcode now checks your balance with the server before it shows pricing, so the pricing screen opens only when you are really out of credits. If the check cannot reach the server, you get a short message to try again, and your text stays in the box.
When you upload files saved on Windows, the agent now edits them like any other file.
Changes across several lines work. Before, the agent could change a single line in these files but failed on any change that spanned more lines. It then worked around the failure: it hid old sections in comments instead of removing them, or rewrote the whole file.
Nothing to do on your side. Files you uploaded before this fix are covered too.
When your website fails to build on publish, the editor now shows the error itself.
The real error, with its place. The dialog names the problem and the file and line it comes from. Before, it showed only {}, so neither you nor the agent could tell what went wrong.
Hand it to the agent. Copy the error into the chat, and the agent can fix the code it points to.
When the agent takes a screenshot, views an image by URL, or generates or edits a picture, the image now reaches the model on every model choice - not only the Claude family.
FAST and economy models see what they work with. Before, models such as Gemini 3 Flash or GLM-5.3 Flash received only a text description of their own screenshots and image views, so visual tasks - matching a design, picking a product photo, checking a layout - could go wrong without the agent noticing. Now they look at the real image.
Honest results. A model that cannot view images no longer gets told an image was shown to it.
Full-stack projects can now be downloaded whole. Open the main menu and choose Project → Download, or simply ask the AI to export your project - it hands you a download card in the chat.
The ZIP carries your complete working tree, uncommitted changes included, ready to run on any server. node_modules, build output, your database and secret values stay out of the archive - a PLAYCODE-EXPORT.md file inside explains where each of those lives: secret values stay safe in Settings → Secrets, and your data downloads from the Files tab. The download itself names which of your own secrets and folders stayed out and where to copy each one; a fresh project, whose settings Playcode generated, has nothing to warn about.
A sleeping project computer wakes on its own for the export. Code export is part of the paid plans, same as the browser projects' ZIP.
The Standard model picker now opens on four models: Claude Opus 5.5 (the default), Gemini 4 Argon, GPT-6.1 Sol and Claude Sonnet 5.5. Grok 4.7, Gemini 3.8 Flash and Kimi K3 are still there: choose More models… at the bottom of the list to see them.
Claude Opus 4.6 and DeepSeek V4.1 Flash have left the picker. If one of them is already your model, it keeps working until you choose another.
Gemini 4 Argon - Google's new frontier model, built for deep, long-horizon work - is now available on the Standard tier, next to Claude Opus 5.5. Google released it yesterday; it went through our full verification before reaching the picker: live tool-calling, prompt caching, and token accounting all confirmed on the real wire.
Argon arrives at Google's introductory pricing, which runs through November 30: until then it is one of the cheapest ways to run a frontier model on Playcode. If you want long multi-step builds, large refactors or research-heavy work at well under flagship spend, this is the moment to try it.
Asking for a custom subdomain while publishing a cloud app now reliably gives your site that address.
The address you ask for is the address you get. A publish that requests a subdomain (in chat, the publish dialog, the API, or the CLI) now pins it the moment the publish succeeds, and the reported site URL uses it. Before, the request could be silently lost and the site answered only at its generated address.
You learn the outcome, not a promise. The publish result now states whether the subdomain was pinned, or exactly why it was refused - for example when the name is already taken.
Bad names are refused up front. A subdomain that is malformed, reserved, or already in use is refused before the publish starts, so you never wait through a deploy to learn the name cannot work.
Changing the address of an already-published app no longer requires a re-publish from the API or the agent - the same subdomain controls the editor always had are now available everywhere.
Try it: Publish my app with the subdomain my-cool-app
When your chat runs on GPT-6 Luna or GPT-6.1 Sol, the agent now creates and rewrites files in your project as expected.
New files get written. Before, these models could not save a file: the agent tried again and again, and the file never appeared. Edits to files that already existed were not affected.
A rejected step says so. If the agent's attempt to save a file is refused, the chat now shows that the step did not go through, and the agent sees why on its next turn instead of repeating the same attempt.
When a message can't run, the chat now always says why - no more empty replies. And when the reason is your cloud computers, the notice says exactly that, with a Top up button - instead of "You're out of credits" next to a meter that still shows credits.
Your credits cover both AI and your cloud computers. When the balance falls close to about a month of your computers' running costs, AI pauses first so your apps stay up. Add credits and the next message runs.
Publishing a website now waits until the site actually serves before it says done.
"Published" means live. The editor confirms success only after your site answers at its address. Before, a rare hosting hiccup could show success while the site still served its previous version, or nothing at all.
Failures tell you why. If publishing fails, the editor says so and shows the reason - your previous version stays live, and publishing again is always safe.
Site previews match the live site. The dashboard thumbnail is captured only after the site is reachable, so a first publish no longer photographs an empty page.
When a plan ends, Settings, Billing & plans shows the plans again - and now also Billing Portal, above them. Choose Open Billing Portal to download the invoices of the plan that ended, or to add a tax ID, in Stripe's billing portal.
Before, the door went away with the plan, and an old invoice took a message to a person. A workspace that never paid has no invoices, so it shows no door.
A project you create while signed in now starts private on every Playcode plan, Free included. Before, a new project on the Free plan started public, so anyone with its link could open it.
Private from the start. Only you and the people and teams you invite can open a new project.
Share when you are ready. To share by link, open the project's Share tab and set Anyone with the link to Can view. Set it back to No access to make the project private again.
What stays the same. Projects you already have keep their setting. A project you start before you sign in stays public until you turn its link off, and the published site stays public either way.
Every Playcode plan can now keep a project private, Free included. Before, making a project private needed a paid plan.
Make any project private. Open the project's Share tab and set Anyone with the link to No access. Then only you and the people and teams you invited can open it.
It stays private. Opening a private project on the Free plan no longer turns its public link back on. If that happened to one of your projects before, set Anyone with the link back to No access.
What stays the same. The project's creator or an Admin makes the change, and the published site stays public either way.
Playcode no longer charges your card after you leave.
Deleting your account stops your plan renewing. The plan of your Personal workspace stays until the end of the period you paid for, then ends, and the delete window says the date. Before, it kept renewing until the account was erased, 30 days later. Team workspaces keep their plans.
Auto-recharge ends with your plan. When a plan ends, auto-recharge turns off, and a workspace without a plan is never charged by it.
The monthly card maximum counts the whole charge. Each automatic charge is checked against it as charged, the $15 minimum included.
The window states the real charge.Auto-recharge settings now shows what each charge takes: what brings your balance back to your level, and never less than $15.
Auto-send voice messages works. With it on, a finished voice message is sent at once. Turn it off in Settings > AI defaults to check the text before you send it. Before, every voice message was sent at once, whatever the setting said.
Voice input uses the project's credits. It is charged to the workspace that pays for the project, as the agent's work is. Before, it used your Personal workspace's credits, even in a team project.
Undo this change asks first. Undoing a change also undoes every change the agent made after it. When there are any, Playcode now asks and says how many. The newest change is still undone at once.
Memory Records are gone. The agent stopped reading them in July 2026, so the app no longer offers them. Put lasting rules for the agent in the project's AGENTS.md: see Memory.
Signing in and creating an account look new, and they work the same everywhere on Playcode.
Every way in, in one place. Continue with Google, get a code by email, or use Microsoft or GitHub, on the website as well as in the app.
Your idea comes with you. Describe what you want to build, sign in with any method, and Playcode starts on your idea as soon as you are in - including after a GitHub or Microsoft sign-in.
The code is easier to find. The code step now says plainly that the email may be in your Spam folder, and shows how to mark it as not spam so the next one lands in your inbox.
Sign in without losing your place. If you are asked to sign in while you work, your request stays on screen, and closing the sign-in takes you back to where you were.
Smooth on a slow connection. The picture for the next step loads while you read the current one, and each step glides into the next.
When you send the agent a new instruction while a build task is already running, that instruction now stays in front of the task until it finishes. Before, it was shown to the task exactly once - mid-work, between two steps - and on a long build the task could lose track of it and finish without it, so you had to ask again. Now a mid-build message keeps its place for the rest of the run, for background tasks and regular chats alike.
DeepSeek V4 Pro has left the model picker. DeepSeek has been serving every V4 Pro request with V4.1 Flash since mid-September (until a V4.1 Pro exists), so the picker entry no longer bought anything the Flash entry does not - except a higher price.
If you had V4 Pro selected as a default or on a chat, it now runs on DeepSeek V4.1 Flash automatically, billed at the Flash rate: $0.30 in / $1.20 out per million tokens instead of V4 Pro's $1.32 / $3.96. Same upstream model, about 4x cheaper.
We also moved DeepSeek onto redundant serving infrastructure, so the model no longer depends on a single upstream to stay available.
Site subdomain names now use hyphens (my-app.playcode.site) instead of underscores. Underscores are not valid in web hostnames, so my_app.playcode.site could never load in a browser - the editor just didn't tell you. Every published site with an underscore name has been renamed to its hyphen twin automatically, old underscore links now redirect permanently to the new address, and your numeric address keeps working as before.
GLM 5.3 Flash is now in the model picker. It is one of the cheapest models we offer, with reasoning quality close to models many times its price, a 1M-token context window, and image understanding. It thinks before every answer, so it is thorough rather than instant - pick it for budget builds where a little patience is fine.
Since March, signing in with GitHub or Microsoft from the Playcode sign-in or sign-up page brought you back to that page, even though you were already signed in. From September 17 to 28 the same buttons led to an error page instead. Both are fixed: you now land in Playcode.
If you started signing up with your email and never finished, signing in with GitHub or Microsoft now finishes it, as long as that account uses the same email address and GitHub or Microsoft has confirmed it.
Your apps and your tools can now talk to Playcode directly - three releases in one day:
@playcode/sdk 0.3 (npm) - the official SDK for your app's backend. Zero dependencies, fully typed, works in any Node or edge runtime. Send email, call every management operation, and - new today - generate images: pc.media.image({ prompt }) returns a finished image hosted on Playcode, paid per image from your workspace credits. Video generation (pc.media.video()) rides the same way.
@playcode/cli (npm) - npm i -g @playcode/cli, then playcode login signs in through your browser. List projects, read and run things on a project's computer, publish, and reach every management operation as playcode <family> <operation>. An operation added later comes with a newer CLI release.
An MCP server for your coding agent.playcode mcp runs a local MCP server over your own sign-in, built for Claude Code, Cursor, and Claude Desktop: your agent discovers Playcode operations by searching, reads the exact argument shapes, and executes - with everything scoped to the permissions you granted at sign-in.
New projects created from today's template get the SDK preinstalled. This is the start of the platform surface - more capabilities land on the same three doors.
Claude Sonnet 5.5 - Anthropic's newest Sonnet, "the best combination of speed and intelligence" - is now on the Quality chip in the model picker, at the same price as Claude Sonnet 5. Sonnet 5 is superseded; if you had it pinned, your pin keeps working.