# Capabilities and permissions Before adding a model call or a database query, check what the app can use. Smolcloud can tell you which resources are approved, which settings reached the running app and what still needs attention. ## See what an app can use Run these commands from a signed-in builder, admin or owner profile with **Can administer** on the app. A named coding agent can use its own profile with that permission. ```sh smolcloud capabilities APP_ID smolcloud guide APP_ID ``` `capabilities` returns JSON. Find the resource you need in `resources`, then read its `state`, `reason` and `deploymentReady`. The `guide` command returns Markdown with instructions for that app. Both commands are read-only. Their HTTP equivalents are `GET /api/apps/{appId}/capabilities` and `GET /api/apps/{appId}/agent-guide`. | What you see | What to do | | ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `permitted` | The app has approval. Check `deploymentReady`, the supported `operations` and any `choices` or `limits` before using the resource. | | `approval-needed` | Read `reason` to see what needs approval or connection setup. If the app declares its resources in source, [submit a resource request](resource-declarations.md). | | `unavailable` | Check the workspace setup described in `reason` before adding the integration. | **Readiness is about the current deployment.** For PostgreSQL, `deploymentReady: true` means the database is ready and the serving revision received `DATABASE_URL`. Discovery shows the variable’s name and keeps its value private. If readiness is false, check the connection and deployment status. [Connect a database](data-services.md#create-a-database). The top-level `unsupported` list names operations the platform doesn’t offer. Runtime calls still check access, remaining budget and personal consent where applicable. ## Choose permissions In **Share**, grant the person or named agent the access it needs on the existing app. | Permission | What it allows | | ------------------ | ------------------------------------------------------------------------------------------- | | **Can use** | Open the app. A named agent with this permission can call its private HTTP endpoints. | | **Can deploy** | Publish new versions of the app. | | **Can administer** | Read the app’s capabilities and guide as a builder, manage app settings and change sharing. | An agent signs in under its own name. Organisation-wide sharing lets signed-in people open the app. Give agents their own access in **Share**. [Connect a coding agent](agent-start.md). ## Call a protected app From the named agent’s CLI profile, request a path the app serves. For an app with a home page: ```sh smolcloud request APP_ID / ``` The CLI exchanges the workspace credential for a short-lived token scoped to that app. For a direct HTTP client, `POST /api/apps/{appId}/agent-access` returns `url`, `appId`, `token` and `expiresAt`. Send the token as a bearer credential only to the returned app URL. [CLI request options and limits](cli.md#call-a-private-app-as-an-agent). ## Limits App tokens last up to 60 seconds. A single agent CLI sign-in can hold up to 60 active app tokens. App permissions apply to this app. If the agent also needs to change workspace settings or decide a resource request for an owner, use [temporary administration access](agent-start.md#delegate-configuration). Each person still gives consent for access to their own connected accounts.