Start with Cadenya without an account
Overview
A user without a Cadenya account can still have you build with Cadenya. One command creates a temporary workspace: a real workspace, with an API key that reaches only that workspace, plus a claim URL. When the user opens the claim URL and signs in or signs up, the workspace becomes theirs.
What the user needs to know:
- 24 hours. A workspace nobody claims is permanently deleted 24 hours after it was created, with its Agents, Tool Sets, objectives and secrets. It can't be recovered.
- Only a demo model until claimed. A temporary workspace has no Cadenya-provided model and no model credit. A free demo model shows the agent loop with scripted output. For real model output before claiming, the user adds their own provider key. Claiming adds Cadenya's promotional model credit (the create output's
nextStepstates the amount). - The claim URL is a secret. Whoever opens it and signs in becomes the owner of the workspace.
- Claiming needs a person without a Cadenya account. Someone who already has one gets refused, and should use their own account instead.
For everything after setup (Tool Sets, Agents, objectives, config files), use the cadenya-cli skill.
Decide whether to use this at all
cadenya whoami --display json # exits 0 only with a working credential
cadenya auth status # names the credential source in effect; always exits 0
whoami --display jsonfails, orcadenyaisn't installed: continue below. If the user mentions having an account, offercadenya auth logininstead: an existing account holder can't claim a temporary workspace.whoamiexits 0 andauth statusnames a stored login or$CADENYA_API_KEY: the user already has an account. Don't create a temporary workspace; followcadenya-cli.--temporaryrefuses to run while such a credential is configured.whoamiexits 0 andauth statusprintsCredential source: temporary workspace workspace_… (.cadenya/temporary.json).: this directory already has a live temporary workspace. Run the create command below anyway: it returns that workspace with"reused": trueand creates nothing, which gives you the claim URL and deadline to re-share.
Temporary workspaces need CLI 1.12.0 or later. Older versions have no workspaces create and fail with flag provided but not defined: -temporary. Check the version first:
cadenya --version # prints "cadenya version X.Y.Z (api …)"; X.Y.Z must be 1.12.0 or later
If cadenya is missing or older, install or upgrade it with the package manager (brew install cadenya/tools/cadenya or brew upgrade cadenya; on Windows, choco install cadenya or choco upgrade cadenya), then run cadenya --version again. Package managers can lag the GitHub releases. If the version is still below 1.12.0, download cadenya_<version>_<os>_<arch>.tar.gz (.zip on Windows; os is darwin, linux or windows, arch is amd64 or arm64) from https://github.com/cadenya/cadenya-cli/releases/latest, check it against that release's cadenya_<version>_checksums.txt (for example shasum -a 256 -c --ignore-missing cadenya_<version>_checksums.txt), and put the cadenya binary (cadenya.exe on Windows) from the archive's top level on PATH ahead of the old one. Don't continue until cadenya --version reports 1.12.0 or later.
Create the temporary workspace
Run this from the project's root directory:
cadenya workspaces create --temporary --display json | jq 'del(.apiKey)'
It prints one JSON object: status (created or reused), workspaceId, claimUrl, expiresAt (UTC, RFC 3339), apiKey, reused, nextStep, and next (follow-up commands, each with command and when). The CLI has already saved apiKey in .cadenya/temporary.json, so strip it before the output reaches your transcript. Without jq, use python3 -c 'import json,sys; d=json.load(sys.stdin); d.pop("apiKey",None); print(json.dumps(d,indent=2))'.
nextStep repeats the claim URL, and a notice with the claim URL also goes to stderr. Don't redirect either output to a file or a log, and don't discard stderr: errors go there too. The pipe hides the CLI's exit code, so empty output means the command failed; read stderr.
- The CLI stores the credential in
.cadenya/temporary.jsonin the current directory and adds.cadenya/temporary.jsonto.gitignore(only that file, because.cadenya/also holds the committedcadenya config applyfiles). It does this in a directory that isn't a git repository too, so the file stays ignored if one is created later. - Check it before anything else: in a git repository,
git check-ignore .cadenya/temporary.jsonmust print the path (outside a repository it fails withnot a git repository; check that.gitignorelists.cadenya/temporary.jsoninstead). If the CLI printedwarning: could not make git ignore .cadenya/temporary.json, fix.gitignore(look for a negation rule or a symlinked.gitignore) before anygit add. Latercadenyacommands run from this directory use it and its workspace on their own: don't pass--api-keyor--workspace-id, and don't export the key orCADENYA_WORKSPACE_IDinto your shell. An exportedCADENYA_WORKSPACE_IDstill applies to the temporary key, which reaches no other workspace, so skip theexport CADENYA_WORKSPACE_ID=…lines incadenya-cliexamples. - Never move, copy, print or commit
.cadenya/temporary.json. Don't echoapiKeyback to the user. - If this directory already has a live temporary workspace, the command returns it with
"reused": true. Don't pass--freshunless the user asks for a second workspace. --temporaryrefuses to run in CI ($CIset) and when a credential is configured.--expire-aftertakes a lifetime from1hto24h(the default is24h). It can shorten the window, never extend it.
Give the user the claim URL right away
First, decide where your reply goes. If anyone besides the user can read it (a PR, issue or Slack thread, a bot posting to a channel, a shared transcript), don't print the claim URL. Tell the user to run cadenya auth login in the project directory instead, which claims the workspace without the link. Otherwise, show the claim URL and deadline as soon as you have them, before you build anything. Fill in CLAIM_URL and DEADLINE, the expiry in local time with its zone (the stderr notice prints it that way, for example Mon Nov 9 14:07 EST). For a reused workspace, say you found and reused it instead of "created":
I created a temporary Cadenya workspace. To keep it, open this link and sign in or sign up before DEADLINE: CLAIM_URL Keep the link private: whoever opens it can take the workspace. If nobody claims it by then, it's deleted along with everything I build in it. You can also claim it by running
cadenya auth loginin this directory.
- Put the claim URL only in your private reply to the user. Never write it to a file in the repository, a commit, a PR, an issue, a code comment or a log.
- The CLI prints the claim URL again in other places:
claim-status --waiton stderr each time the state changes, and everyREQUIRES_CLAIMerror. Never tee, redirect or background these into a file or a retained log, and don't run--waitwhere output is collected (CI, shared terminals, log shippers). - If application code needs the API key, write
CADENYA_API_KEYandCADENYA_WORKSPACE_IDto an env file that git ignores (check withgit check-ignore <file>, and add it to.gitignoreif needed, even in a directory that isn't a repository yet). Read the key from.cadenya/temporary.jsonor the create output; never hard-code it in source. - Never source or export that env file into the shell that runs
cadenya. ACADENYA_API_KEYin the environment makes--temporaryrefuse, outranks.cadenya/temporary.json, and after the claim outranks the new login. Let the application load the file itself.
What works before the claim
You can create Tool Sets, Agents and variations, publish Agents and run objectives. Some things wait for the claim, and small caps apply to the rest.
- Tool Set hosts. Tool Sets only reach hosts on the account's trusted endpoints, and
cadenya trusted-endpoints createfails before the claim. Before the claim, Tool Sets can call Cadenya-hosted endpoints such as the Faker MCP server athttps://free.cadenya.com/faker-mcp, and Bare Tool Sets (--adapter bare) work because your application supplies each result. An HTTP, OpenAPI or MCP Tool Set pointed at any other host is refused when you create it (avalidation failedfield violation onspec.mcp.url,spec.openapi.url,spec.openapi.baseUrlorspec.http.baseUrl:… is not a trusted endpoint), or at sync and call time when the host comes from a reference, until the user claims and trusts the host. - Needs a claim: Widgets, widget sessions, tenants, memory layers, agent pools, trusted endpoints, API keys, and workspace administration (members, more workspaces). The temporary key has no scope for these, so they fail with HTTP 403
SCOPE_MISSING(caller does not hold the "…" scope required by this endpoint). Treat that likeREQUIRES_CLAIM, and leave Widgets and memory layers out of.cadenya/config files until the claim, orcadenya config applyfails. - Capped: Agents, variations, Tool Sets, provider keys, objectives, uploads and loops per month. Going past a cap returns
REQUIRES_CLAIM, withlimitandusagein the error metadata.
Running objectives before the claim
Before you run an objective, ask the user which option they want. A script can't ask, so take the choice as input (for example an environment variable) and default to the demo model:
- Use the demo model. It's the default model in a temporary workspace and costs nothing. It doesn't reason. When the variation has a read-only tool assigned (a GET operation, a read-only MCP tool, or a Bare tool, with no approval required), it calls one with made-up arguments, then returns a templated summary of the result. With no such tool, it returns a scripted reply and calls nothing. To show the full loop (tool call, events, completion), assign a read-only Tool Set first, for example an MCP Tool Set on the Faker MCP server (
--mcp-url https://free.cadenya.com/faker-mcp). It never calls a tool that needs approval, so leave approvals off (no--mcp-tool-approvals-always) for a demo run. Tell the user so, and don't present its output as a real model's. Because it's the workspace default, leave the model out ofagents createand variations to use it. To name it explicitly, runcadenya models list --display jsonand pass theDemomodel'smetadata.id, or its reference key<provider-key external ID>.<model external ID>(normallydemo.demo), as--default-variation-model-id. - Use their own provider key now. Ask the user to put the key in an environment variable themselves; never ask them to paste it into the chat. Build the command with
cadenya schema ai-provider-keys create, and pass the key on stdin so it stays off the command line, for exampleprintf '%s' "$ANTHROPIC_API_KEY" | cadenya ai-provider-keys create --name "Anthropic" --external-id anthropic --provider anthropic --api-key -. Thencadenya models listshows the new models. - Claim first. After the claim, the workspace gets Cadenya's promotional model credit (amount in
nextStep) and objectives run with no key of their own.
Whichever model you use, publish the Agent (cadenya agents publish <agent>) before you create an objective. The cadenya-cli skill covers building and running.
Checking the claim
cadenya workspaces claim-status --display json # state, expiresAt, claimedAt
cadenya workspaces claim-status --wait # blocks until claimed or expired
state is STATE_UNCLAIMED, STATE_PENDING (a claim is finishing), STATE_CLAIMED or STATE_EXPIRED. The command exits 4 on STATE_EXPIRED. Check before long-running work and when the user says they've claimed. Use --wait rather than a polling loop of your own. Once it reports STATE_CLAIMED, the CLI removes .cadenya/temporary.json. After that, running workspaces create --temporary again creates a second, empty workspace, so a script that may run again after the claim should check whoami first and continue with the user's login (cadenya auth login) instead.
Errors
| Error | Meaning | What to do |
|---|---|---|
REQUIRES_CLAIM |
The feature or amount needs a claimed workspace | Tell the user what it unlocks and how to claim (privately, as above), keep working on everything else |
| HTTP 429 on create, "too many temporary workspaces were created from this network" | This network holds the most live temporary workspaces allowed, or created too many too fast | Tell the user, and stop. They can claim a workspace they already have a link for (that frees a slot), wait for one to expire, or sign up and use cadenya auth login. Don't retry in a loop, and never work around it |
ACCOUNT_PROVISIONING |
The new workspace is still being set up | Retry after the delay the error gives (a few seconds), at most three times. If it still fails, tell the user and stop |
HTTP 503 on create, "temporary workspaces are unavailable right now" (PROVISIONING_DISABLED) |
Creating temporary workspaces is switched off | Tell the user. Don't retry in a loop. Offer signup at https://app.cadenya.com/signup followed by cadenya auth login |
TEMPORARY_WORKSPACE_EXPIRED, state: STATE_EXPIRED, or missing credentials / a rejected credential after expiresAt (the CLI stops using an expired .cadenya/temporary.json) |
The workspace was deleted | Tell the user what was lost. Create a new one only if they want it |
--temporary refused because a credential is configured |
The user already has an account | Use cadenya-cli with their login |
TEMPORARY_WORKSPACE_CLAIMED (exit code 3) |
The user claimed the workspace, which revoked the temporary key. The CLI removed .cadenya/temporary.json |
Tell the user it's claimed. Ask them to run cadenya auth login in this directory, or to create an API key in the dashboard. Continue with the new credential |
auth login says "you already have a Cadenya account" |
Someone with an account can't claim a temporary workspace | If it also printed Logged in., the login works: create a workspace in their account and rebuild there. If it ended with login refused, nothing was stored: run cadenya auth login from a directory without .cadenya/temporary.json, which sends no claim. The temporary workspace expires |
After the claim
- The workspace no longer expires. The temporary API key stops working, and the next request with it returns
TEMPORARY_WORKSPACE_CLAIMED. - The simplest way to claim is for the user to run
cadenya auth loginin the project directory: approving that login claims the workspace and logs them in, in one step. If they claimed through the link, they still runcadenya auth login, or create an API key in the dashboard. - Any env file holding the old key needs the new one. A stale
CADENYA_API_KEYin the environment also outranks the stored login, so unset it afterauth login. - Promotional model credit is added on claim.
cadenya models listshows the models, and the demo model stays but is no longer the default.
