Embarko is the cloud for small apps built by AI. The AI builds the app; Embarko gets it online, keeps it running, and helps the AI take the next useful step.
Agents start with the Markdown quickstart. Every page is also available as Markdown and JSON.
Secrets and settings
On this page: With the connector, Over HTTP, Where the person adds a secret, Examples, Limits, Errors, What to tell the person
Plain words unless the person is a developer. Never invent a link, name or code. Rules Needs first: claim (over HTTP only).
Environment variables for one app. Values are write-only: you can list the keys, never read a value back.
Connector: update_app · set_env_vars / apply_env_vars; app_danger_zone · delete_env_var; read_app · env_vars
Done when: The feature that needs the value works.
With the connector
- Call update_app { action: "set_env_vars", appName, vars: [{ key, value }], apply: true }.
- If the person must type a secret themselves, send them to the app's App setup page rather than asking them to paste it into the chat (see Where the person adds a secret). If they already pasted a key in the chat, use it and suggest they rotate it later.
Over HTTP
- If the person must type a secret themselves, send them to the app's App setup page (see Where the person adds a secret).
- PUT https://ship.embarko.ai/api/apps/{app-name}/env-vars with the token and the body in the example below. It merges: keys you leave out stay as they are.
- If the person already pasted a key in the chat, use it and suggest they replace it with a new one later.
- One key: PUT https://ship.embarko.ai/api/apps/{app-name}/env-vars/{KEY} with {"value": "...", "apply": true}.
- Without "apply": true the value is only stored: POST https://ship.embarko.ai/api/apps/{app-name}/env-vars/apply (or redeploy).
- Order: if the code that reads the key is not deployed yet, store the value without apply, then deploy the new code (a deploy picks up stored values). If the code is already live, set it with apply.
- Send X-Agent-Name on any call that applies.
Where the person adds a secret
- Tell them: open https://embarko.ai/app, choose the app, open App setup, and add {KEY} there. This works on every route, chat-only included.
- Over HTTP you can give the exact page: https://embarko.ai/app/projects/{project-id}/environment, where {project-id} is the id field of GET https://ship.embarko.ai/api/apps/{app-name} (with the token). No reply contains this link ready-made.
Example: Set two values and apply them
body.json:
{"vars":[{"key":"OPENAI_API_KEY","value":"sk-..."},{"key":"NOTIFY_EMAIL","value":"sam@example.com"}],"apply":true}
curl -sS -X PUT 'https://ship.embarko.ai/api/apps/my-app/env-vars' --oauth2-bearer $DEPLOY_TOKEN -H 'X-Agent-Name: {your-name}' -H 'Content-Type: application/json' --data @body.json
Limits
- Keys match ^[A-Za-z_][A-Za-z0-9_]*$.
- PORT, APP_NAME, APP_VERSION, DATA_DIR and STORAGE_URL are set by Embarko, and so are CRON_SECRET for an app with schedules and STORAGE_TOKEN for file storage (409 env_var_conflict if you set it yourself).
- Static sites have no env vars (409 not_supported_for_static).
- Over HTTP, the app must be claimed.
Errors
| Code | Status | Retry | What to do |
|---|
not_supported_for_static | 409 | No | Static site: put config in its files, or redeploy as a server app under a new name. |
no_current_deployment | 422 | No | Values are saved. Deploy the app; do not write them again. |
unauthorized | 401 | No | Bad token. |
permission_denied | 403 | No | The person who made this token is not allowed to do this. The reply names the permission and their access to the app (or their role). Nothing changed. Tell the person (say_to_user.no_permission); do not try another way round it. |
What to tell the person
- missing: "Your app needs a key before it can work. Add it here: {secrets page link}"
Next: Set the variables with apply, then check the app still works.
Related: status · logs
Guide home · JSON: add .json