Chrysalis

What you can build

A Chrysalis app is a full web app with a server side that can talk to your models. If it fits in a browser tab, you can probably build it by asking.

#Ideas

Visual novels and story gamesScenes, sprites, choices and a narrator played by your model, with saves in the app's data folder.
Roleplay and chat toolsCharacter chats, group scenes, memory and lorebooks. The official Roleplay app is built exactly this way.
Game masters with toolsA model that rolls dice, tracks inventory or looks up rules by calling your plugin's functions.
Trackers and journalsBooks, habits, workouts or notes, with a model that summarizes your week on a timer.
DashboardsPull data from public web APIs through a plugin and chart it with any npm charting library.
Writing and study toolsDraft editors, flashcards generated from your notes, and search over your documents with embeddings.
GamesCanvas, WebGL or DOM games built with any npm package, with an AI opponent or level generator.
Add-ons for other appsA plugin dropped into an existing app that adds memory, translation or a house style to every prompt it sends.

#The building blocks

Your app needs toUse
Show a UIReact and Tailwind in src/, plus any npm package. See the frontend.
Save dataA plugin with fs writing JSON into data/, or store for small values.
Get text from a modelA plugin with llm calling host.llm.request. Works with every provider you connected.
Show a reply as it is writtenA stream descriptor on the request, and app_stream events on the page. See streaming.
Get structured data from a modelA schema on the request; the parsed object comes back in json.
Let the model take actionsA plugin with tools. See tools.
Search by meaninghost.llm.embed in a plugin, with the vectors saved in data/.
Generate imagesPOST /v1/images with a prompt from the page. The image is saved as an asset and its URL returned.
Speak textPOST /v1/audio/speech with text from the page, using your speech settings, or free online voices when none are set up.
Call a web APIA plugin with network and the API's host in networkHosts. See web requests.
Show pictures from the web/v1/apps/<app>/img?url=… as the image source, for hosts a plugin in the app lists in networkHosts.
Do work in the backgroundA plugin with schedule and an onTick export.
Import files people uploadA route with the zip permission for archives, or plain JSON bodies up to 1 MB.
Change another plugin's promptsA plugin with hooks and llm exporting llmRequest. See prompt hooks.
Update live when data changesListen for look_changed on the WebSocket. See data changes.

#Ask for it

Click New app, then describe what you want to the agent. Being specific about data and behavior gets you further than describing looks:

  • "Build a visual novel app. Scenes are JSON files in data/scenes with a background, characters, lines and choices. Add a button that asks the model to write the next scene."
  • "Make a reading tracker. Save each book as a file in data/books. Every Sunday, summarize what I read that week."
  • "Add a plugin to Roleplay that keeps a list of facts about me and adds them to every prompt."
  • "Make a dashboard that shows the weather for my city from api.open-meteo.com, refreshed every 10 minutes."

Keep the app open beside the agent while it works. The open page builds the app and reports errors back, so the agent can fix its own mistakes.

#Limits worth knowing

  • The page cannot reach the internet directly. Web APIs go through a plugin, and images through the app's image proxy.
  • Plugins are short and synchronous. A pass runs for up to 10 seconds with 64 MB of memory, and a request can wait on at most two rounds of model or web calls. Long jobs are split across requests or timers.
  • No native programs. Apps cannot start processes on your computer. Tools that need one can run as an MCP server you add in Settings.
  • No bundler plugins. Build tool configs do not run, so formats that need a compiler plugin, such as single-file Vue or Svelte components, are not supported. React works out of the box.
  • No peer-to-peer connections. Chrysalis blocks WebRTC in app pages on browsers that support blocking it.
  • Building needs an open tab. Apps build in your browser, so a change lands when a Chrysalis page is open.

#Next

Edit this page on GitHub