WebSim.ai Advanced Guide

1. Generated Backend

Generated Backends allow users to call on a simulated database in their websims. To use, type '/api/backendhere'. For example, for my Underground Martian Expedition I used '/api/martianplants'. When the user asks for a plant, it gives back a generated plant and its information from a simulated database.

2. HTMX Streaming

Using HTMX can allow your websim to process information without reloading the page. In my Underground Martian Expedition, I used HTMX so the user would be able to search plants without waiting for a full page loading sequence.

You can also use HTMX for live chatting with various LLM personas - a great example is Rudy's Boom Boom Room - Lightning Round by Jazmaan/OneMeatball.

In order to implement HTMX, simply tell your websim you would like to use HTMX. You can specify when, and where to implement, but it is generally not required.

HTMX codes in HTML, which can be better for making visuals compared to the data-focused JSON that the simulated backend uses.

3. Plugins

Extend the functionality of your WebSim.ai projects with our growing library of plugins. These pre-built components can be easily integrated into your simulated websites.

Example: Add a weather widget to your page using the WebSim Weather Plugin.
Tip: Check the plugin marketplace regularly for new additions and updates.

4. Context Management

WebSim.ai provides powerful context management tools to help you maintain consistency across your simulated web universe.

Example: Use context variables to maintain user state across multiple pages in your WebSim project.
Note: Proper context management is crucial for creating cohesive, multi-page experiences.

5. !Continue

The !Continue feature is currently the only true command in websim. When you are generating a particularly large input, it can load unfinished. When this happens, you can type !Continue into the typical prompt bar, and it will continue processing and generating the page on the next load.

Tip: It can be tough to notice when you need to continue. Websim has a feature that will sometimes detect when you need to !continue, and it will show a button in the prompt bar for you to click. Other ways to notice are a black screen, buttons that do nothing, and other broken elements.