AI Agents
Claim
/api/agents/{orgName}/claimPreviews the agent claim (dryRun=true) or starts its commit. The response shape is identical in both cases. Commit transfers the agent’s stacks to the destination organization, soft-deletes the agent’s organization, and soft-deletes the agent’s access token. If there are unresolved conflicts or failures, it returns them and does not perform any state mutations.
Request Parameters
orgNamestring path requiredThe organization namedryRunboolean query optionalIf set, perform a dry run without committing changes
Request Body
claimTokenstring requiredThe opaque single-use claim token embedded in the claim URL the agent surfaces to its human. Returned by /api/agents/signup as part of the claim URL.- Renaming instructions for the entities flagged in the response’s conflicts list. Failures cannot be resolved this way.
Responses
- Identity and metadata for the agent account being claimed.
- ↳
loginstring requiredThe agent user’s Pulumi login (e.g. “agent-abc123”). This is what pulumi whoami returns while the agent’s access token is in use. - ↳
orgNamestring requiredSlug of the agent’s individual organization. This appears in the/ / identity of any stack the agent created. - ↳
createdAtstring requiredWhen the agent account was created (i.e. when /api/agents/signup ran). - Inventory of Pulumi entities owned by the agent in the source organization. If the claim completes, these transfer to the destination organization. A non-empty conflicts or failures list prevents the claim from completing.
- ↳
kindstring required - Name collisions with the destination organization that the client can resolve by supplying conflictsResolution in a follow-up request. Both preview and a blocked commit return 200 with this body populated; the commit does not mutate state when any conflict is present.
- ↳
kindstring required - Entities the service cannot transfer (e.g. Insights accounts at launch, which have no transfer primitive yet). Unlike conflicts, failures are not user-resolvable.
- The reference of the entity that cannot be transferred.
- ↳
failureDetailsstring requiredService-side reason the entity cannot be transferred. claimExpiresAtstring requiredWhen the claim window closes. After this time the claim token expires and the claim cannot complete.transferTokenstring optionalOn successful start of a claim, the token needed to check for progress.
Claim Status
/api/agents/{orgName}/claim/statusFetches details from recent agent claims.
Request Parameters
orgNamestring path requiredThe organization name
Responses
Signup Challenge
/api/agents/signupIssues a proof-of-work challenge for the agent signup flow. The caller computes the proof over the returned challengeData and submits the result to POST /api/agents/signup along with the returned challengeID. The challenge expires after a short window if not consumed.
Responses
challengeIDstring requiredAn ID identifying this challenge. Pass back to POST /api/agents/signup as challengeID.challengeDatastring requiredInput data for the proof-of-work computation. Compute the proof over this and submit the result to POST /api/agents/signup as challengeResult.
Signup
/api/agents/signupCreates a new Pulumi Cloud account programmatically, without human intervention, and returns an access token plus a claim URL. The caller must first obtain a challenge from GET /api/agents/signup/challenge and submit the computed proof of work here. Intended for agent contexts: a CLI that detects it is running on behalf of an agent and finds no local credentials issues the challenge call, solves it, then calls this endpoint, writes the returned access token to its credentials file, and surfaces the claim URL to its human so the human can take ownership of the account later. The account is a Pulumi Individual Account in a pre-claim state; operations that require a verified email (such as creating agent tasks) are unavailable until the account is claimed.
Request Body
challengeIDstring requiredAn ID identifying the challenge issued by GET /api/agents/signup/challenge.challengeResultstring requiredOutput of the proof-of-work computation over the challengeData returned by GET /api/agents/signup/challenge.
Responses
accessTokenstring requiredThe Pulumi access token to use for authenticating future API requests as the new user.accessTokenValidUntilstring requiredWhen the temporary access token expires.claimTokenstring requiredAn opaque single-use token the human submits to claim ownership of the account. The CLI surfaces a claim URL embedding this token to the human; the path is a CLI/UI concern.claimTokenValidUntilstring requiredWhen the claim token expires.- The newly-created user’s profile information.
- ↳
idstring requiredThe unique identifier of the user. - ↳
githubLoginstring requiredThe user’s login name (originally from GitHub). - ↳
namestring requiredThe user’s display name. - ↳
emailstring requiredThe user’s email address. - ↳
avatarUrlstring requiredThe URL of the user’s avatar image. - Organizations is the list of Pulumi organizations the user is a member of.
- PotentialOrganizations is the list of Pulumi organizations the user is a potential member of.
- ↳
identitiesarray[string] requiredIdentities is the array of identities a Pulumi user’s account is tied to. - ↳
siteAdminboolean optionalSiteAdministrator is whether or not the user is a site administrator. - ↳
registryAdminboolean optionalRegistryAdmin is whether or not the user is a registry administrator. - TokenInfo is contains metadata, set only for machine tokens & to be used only in the CLI
- ↳
hasMFAboolean requiredWhether the user has multi-factor authentication enabled. - ↳
isOrgManagedboolean requiredWhether the user’s account is managed by an organization. - ↳
isManagedByMultiOrgboolean requiredWhether the user’s account is managed by multiple organizations. - ↳
isAgentboolean optionalWhether the user is a synthetic agent account. Agent accounts cannot be authenticated except via their issued access token until a human claims the account via the claim URL.
Signup Validate
/api/agents/signup/validate/{claimToken}Verifies the claim token is still valid. It returns the details about the agent and the resources it created
Request Parameters
claimTokenstring path requiredThe claim token generated by the Agent Signup
Responses
- Identity and metadata for the agent account being claimed.
- ↳
loginstring requiredThe agent user’s Pulumi login (e.g. “agent-abc123”). This is what pulumi whoami returns while the agent’s access token is in use. - ↳
orgNamestring requiredSlug of the agent’s individual organization. This appears in the/ / identity of any stack the agent created. - ↳
createdAtstring requiredWhen the agent account was created (i.e. when /api/agents/signup ran). - Inventory of Pulumi entities owned by the agent in the source organization. If the claim completes, these transfer to the destination organization. A non-empty conflicts or failures list prevents the claim from completing.
- ↳
kindstring required - Name collisions with the destination organization that the client can resolve by supplying conflictsResolution in a follow-up request. Both preview and a blocked commit return 200 with this body populated; the commit does not mutate state when any conflict is present.
- ↳
kindstring required - Entities the service cannot transfer (e.g. Insights accounts at launch, which have no transfer primitive yet). Unlike conflicts, failures are not user-resolvable.
- The reference of the entity that cannot be transferred.
- ↳
failureDetailsstring requiredService-side reason the entity cannot be transferred. claimExpiresAtstring requiredWhen the claim window closes. After this time the claim token expires and the claim cannot complete.transferTokenstring optionalOn successful start of a claim, the token needed to check for progress.
Thank you for your feedback!
If you have a question about how to use Pulumi, reach out in Community Slack.
Open an issue on GitHub to report a problem or suggest an improvement.