# Request app resources If your app needs a model, a disk or a connection to another service, you can request access in its source. The workspace owner sees what this version needs before it goes live. If you already have a project database or bucket, an app administrator can [connect it directly](data-services.md). You can also use either service on its own. ## Add a resource request Create `innie-resources.json` in the folder you deploy. For an app that calls a model through the AI gateway, the whole file is: ```json { "version": 1, "resources": ["ai"] } ``` List each resource the app needs once. Keep passwords, tokens and connection strings out of this file. | Your app needs | Resource ID | What to request | | ------------------------- | --------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Storage | `database`, `files`, `volume` | Managed PostgreSQL, an app bucket or a disk mounted at `/data`. For a disk, include its size in `volume.capacityMb`. | | Models or sandboxes | `ai`, `sandboxes` | Call approved models through the [AI gateway](llm.md), or let the app start sandbox jobs and sessions. | | Network access | `http`, `agent.network` | For [outbound HTTPS](outbound-http.md), list origins and methods in `http`. For an [agent running inside the app](agent-network.md), set its destinations in `agentNetwork`. | | Workspace connections | `postgres`, `slack` | Use approved queries on an external PostgreSQL connection or approved Slack channels. [Workspace connections](service-connectors.md). | | Shared files or workflows | `google.shared`, `microsoft.shared`, `google.workflow` | Use files selected for the app or run an approved [Google workflow](connector-agent.md#calendars-and-document-drafts). | | Personal accounts | `google.personal`, `microsoft.personal`, `slack.personal` | Act with the signed-in person’s consent. Each person connects their own account. | ## Deploy and wait From the folder containing the file, run: ```sh smolcloud deploy APP_ID . ``` 1. **Builder or coding agent:** Upload the source with **Can deploy** on the app. When you see **awaiting approval**, the upload is complete. The build waits for a decision. 2. **Workspace owner:** Open the app’s **Deployments** tab. Review the source and requested resources, configure any missing connections, then approve or deny the request. A named agent can make this decision through `smolcloud admin action` if the owner has [delegated that authority](agent-start.md#delegate-configuration). 3. **Builder or coding agent:** The CLI follows the build after approval. The new version takes traffic when it passes its health check. If the owner denies the request, the build never starts. If your terminal disconnects, pick up the same deployment with `smolcloud resume APP_ID DEPLOYMENT_ID`. To check which resources reached the running app, an app administrator can [inspect its capabilities](agent-discovery.md). ## Change or withdraw approval Approval applies to one deployment. The owner can choose **Withdraw approval** in **Deployments** while it is still in progress. Smolcloud rechecks access before sending traffic to the new version. After a denial, submit a new deployment for review. A [rollback](rollback.md) to a version that declared resources also needs fresh approval. ## Use the API - **Submit.** Start with `POST /api/apps/:id/deployments`. Include `idempotencyKey`, `sourceDigest` and `declarations`. In `declarations`, add `baseDeploymentId` to the contents of the resource file. Use the current deployment ID, or `null` for the first deployment. Upload and seal the source before review. Reuse an idempotency key only for the same input. - **Read.** With deploy access, call `GET /api/deployments/:id/resource-request`. Its `decision` is `pending`, `approved` or `denied`. - **Decide.** In an owner browser session, send `POST /api/deployments/:id/resource-request` with `decision` (`approved` or `denied`), the reviewed `sourceDigest` and `confirm: true`. If replacing an existing disk writer requires downtime, approval also requires `acceptDowntime: true`. If the current deployment changed during review, submit a new request against the current version.