# The Studio The Studio is your project's workspace in the cloud. It holds your code, runs your app while you build, and gives you an AI that reads your data, writes code and deploys. Idea to live app, without switching tools. ## Before you start [#before-you-start] - Create a project first. See [Create a project](/docs/projects/create-a-project). - A running Studio uses your workspace's credits, priced per minute. Unused, it stops on its own and keeps your work. ## Open the Studio [#open-the-studio] ### Find your project [#find-your-project] Go to and find the project. ### Start it [#start-it] Select **Start Studio** and confirm. A running Studio shows **Open Studio**, which opens it in a new tab. ### Wait for Running [#wait-for-running] The Studio checks your plan and credits, finds capacity, restores your workspace and starts the editor. The status goes from **Starting** to **Running**. ```python title="open_studio.py" import time from klarety import Nexus nx = Nexus.connect() project_id = "YOUR_PROJECT_ID" nx.studios.open(project_id) while (studio := nx.studios.get(project_id))["state"] != "READY": time.sleep(5) print(studio["editor_url"]) nx.studios.close(project_id) ``` `studios.open` starts the Studio, or attaches to the one already running. `studios.close` saves the workspace and stops it. Split the view to keep the **AI** and the **Preview** side by side. ## The tabs [#the-tabs] | Tab | What it is for | | --- | --- | | **AI** | Talk to Klarety AI or open your own AI tool. See [How the AI harness works](/docs/ai-harness). | | **Preview** | See the app you are building, running inside the Studio. | | **Code** | A full code editor on your project's files. | | **Data** | Your project's data and connections. | | **Agents** | The agents this project runs. See [Agents](/docs/agents). | | **Deploy** | Put your app online and manage its versions. See [Deploy an app](/docs/deploy/deploy-an-app). | | **Settings** | The project's settings. See [Project settings](/docs/projects/settings). | In a tab's menu, **Split to the left** or **Split to the right** shows two tabs side by side, and **Open in a new browser tab** moves it out. The side panel shows **Files** and **AI sessions**: what each AI is doing (Working, Waiting, Finished) and earlier conversations to **Continue** or **Read**. ## The project overview [#the-project-overview] The project page has shortcuts: - **Your app**: whether it is live, and its address. - **Your data**: see what changed, and undo it. - **Keys**: passwords and settings your app uses. See [Secrets and environment variables](/docs/projects/project-secrets). - **Code**: the GitHub repository your code is saved in. The **Activity** list shows deploys and who opened the Studio. ## Share what you are running [#share-what-you-are-running] To show a running app to the project's people, share its port in project settings under **Sharing**: choose the **Port** and **For how long**. They still sign in, and only they can open it. **Stop sharing** ends it. For anyone else, deploy it. ## When the Studio stops [#when-the-studio-stops] - After a set time with no typing, clicks or runs. - After a longer time with nobody opening it, even if the AI is busy, so a forgotten task cannot keep spending credits. - A notice shows first: **Keep working** keeps it open. Your work is saved either way. **Stop Studio** stops it yourself, saving first. Set these times in project settings, under **Studio**. ## If something goes wrong [#if-something-goes-wrong] Nothing was lost. Select **Start again**. The Studio is still saving your workspace before it stops. Wait, then open it again. A Studio cannot start without credits. See [Credits](/docs/workspace/credits). ## Next steps [#next-steps] - [Code review with Buddy](/docs/projects/buddy) - [How the AI harness works](/docs/ai-harness) - [Project settings](/docs/projects/settings)