Alternate Futures
GraphQL API

Mutations

Generated from the API server source (@alternatefutures/backend 0.1.2) on every merge. Endpoint https://api.alternatefutures.ai/graphql, header Authorization: Bearer <personal access token>. See the GraphQL API overview for how to call it. Left out on purpose: provider-specific types, fields and arguments; operations of the retired hosting product (sites, IPFS storage, functions) and admin-only operations.

Other

beginIdentityImport

ArgumentTypeDescription
inputBeginIdentityImportInput! · BeginIdentityImportInput

Returns DidControlChallenge! · DidControlChallenge.

completeIdentityImport

ArgumentTypeDescription
inputCompleteIdentityImportInput! · CompleteIdentityImportInput

Returns IdentityPrincipal! · IdentityPrincipal.

rotateIdentity

ArgumentTypeDescription
inputRotateIdentityInput! · RotateIdentityInput

Returns IdentityPrincipal! · IdentityPrincipal.

deactivateIdentity

ArgumentTypeDescription
inputDeactivateIdentityInput! · DeactivateIdentityInput

Returns IdentityPrincipal! · IdentityPrincipal.

createIdentityVerificationPolicy

ArgumentTypeDescription
projectIdID!
policyJSON!

Returns IdentityVerificationPolicy! · IdentityVerificationPolicy.

issueIdentityCard

ArgumentTypeDescription
inputIssueIdentityCardInput! · IssueIdentityCardInput

Returns IssuedIdentityCard! · IssuedIdentityCard.

registerIdentityCard

ArgumentTypeDescription
projectIdID!
cardJSON!

Returns IdentityCredential! · IdentityCredential.

revokeIdentityCredential

ArgumentTypeDescription
inputRevokeIdentityCredentialInput! · RevokeIdentityCredentialInput

Returns IdentityCredential! · IdentityCredential.

publishIdentityCard

ArgumentTypeDescription
inputPublishIdentityCardInput! · PublishIdentityCardInput

Returns IdentityCardPublication! · IdentityCardPublication.

createIdentityProofRequest

ArgumentTypeDescription
inputCreateIdentityProofRequestInput! · CreateIdentityProofRequestInput

Returns JSON!.

registerA2aAgentCard

ArgumentTypeDescription
inputRegisterA2aAgentCardInput! · RegisterA2aAgentCardInput

Returns A2aAgentBinding! · A2aAgentBinding.

issueA2aAccessToken

ArgumentTypeDescription
inputIssueA2aAccessTokenInput! · IssueA2aAccessTokenInput

Returns A2aAccessToken! · A2aAccessToken.

issueIdentityDelegation

ArgumentTypeDescription
inputIssueIdentityDelegationInput! · IssueIdentityDelegationInput

Returns IssuedIdentityDelegation! · IssuedIdentityDelegation.

authorizeCapabilityInvocation

ArgumentTypeDescription
projectIdID!
credentialIdID!
invocationJSON!

Returns JSON!.

submitSwarmRun

ArgumentTypeDescription
inputSubmitSwarmRuntimeRunInput! · SubmitSwarmRuntimeRunInput

Returns SwarmRuntimeRun! · SwarmRuntimeRun.

replaySwarmRun

ArgumentTypeDescription
idID!
idempotencyKeyString!
checkpointSequenceString

Returns SwarmRuntimeRun! · SwarmRuntimeRun.

cancelSwarmRun

ArgumentTypeDescription
idID!

Returns SwarmRuntimeRun! · SwarmRuntimeRun.

registerSwarmDefinition

ArgumentTypeDescription
inputRegisterSwarmDefinitionInput! · RegisterSwarmDefinitionInput

Returns SwarmDefinitionVersion! · SwarmDefinitionVersion.

registerSwarmDefinitionFromSpec

ArgumentTypeDescription
inputRegisterSwarmDefinitionFromSpecInput! · RegisterSwarmDefinitionFromSpecInput

Returns SwarmDefinitionVersion! · SwarmDefinitionVersion.

rekeySwarmPolicyBundle

Re-key the project's tool-grant bundle to the swarm's newest definition (2026-09-26): project owner or admin only. Use after a deploy was refused with SWARM_POLICY_BUNDLE_STALE because a member without admin rights saved a persona. Returns the same report a registration carries.

ArgumentTypeDescription
projectIdID!
swarmIdString!

Returns SwarmPolicyRekey! · SwarmPolicyRekey.

issueSwarmDefinitionBootstrap

ArgumentTypeDescription
inputIssueSwarmDefinitionBootstrapInput! · IssueSwarmDefinitionBootstrapInput

Returns SwarmDefinitionBootstrapCredential! · SwarmDefinitionBootstrapCredential.

revokeSwarmDefinitionBootstrap

ArgumentTypeDescription
projectIdID!
grantIdID!

Returns Boolean!.

revokeOtherSwarmDefinitionBootstraps

ArgumentTypeDescription
projectIdID!
serviceIdID!
providerString!
deploymentIdID!
keepGrantIdID!

Returns Int!.

bindSwarmDeployment

ArgumentTypeDescription
inputBindSwarmDeploymentInput! · BindSwarmDeploymentInput

Returns SwarmDeployment! · SwarmDeployment.

deploySwarmRuntime

ArgumentTypeDescription
inputDeploySwarmRuntimeInput! · DeploySwarmRuntimeInput

Returns SwarmDeployment! · SwarmDeployment.

startSwarmDeploy

Same gates and flow as deploySwarmRuntime, but returns as soon as the deploy slot is claimed; poll swarmDeployProgress until phase is ready or failed, then read swarmDeployment. Avoids the edge's 100 s response ceiling.

ArgumentTypeDescription
inputDeploySwarmRuntimeInput! · DeploySwarmRuntimeInput

Returns SwarmDeployProgress! · SwarmDeployProgress.

setSwarmModel

acc swarms model set: overwrite the project's model-provider config server-side with a listed provider/model, always through the platform proxy; the runtime reads it at boot. Every deploy re-renders the config from the model the agents declare (2026-09-26), so a model set here lasts only until the next deploy. compat/<model> with baseUrl (a self-hosted endpoint) and a project's own provider key are refused since 2026-09-26 (SWARM_MODEL_UNSUPPORTED): bring-your-own-key is an Org › Models setting.

ArgumentTypeDescription
projectIdID!
modelString!
baseUrlStringRefused since 2026-09-26 (SWARM_MODEL_UNSUPPORTED); kept so older clients get a coded error.

Returns SwarmModelConfig! · SwarmModelConfig.

connectSwarmDiscord

Connect a Discord channel to a swarm (E-MVP M4): verifies the bot token with Discord (bot accounts only) and that the bot can see the channel, stores the token as a project secret and upserts the channel in the map. Applied by the next deploy (the bridge sidecar reads the map at deploy and the token at boot). Audited; the token is never returned or logged.

ArgumentTypeDescription
inputConnectSwarmDiscordInput! · ConnectSwarmDiscordInput

Returns SwarmDiscordConnection! · SwarmDiscordConnection.

disconnectSwarmDiscord

Remove one channel (channelId) or, without it, the whole connection including the stored token. Applied by the next deploy.

ArgumentTypeDescription
projectIdID!
swarmIdString!
channelIdString

Returns SwarmDiscordConnection! · SwarmDiscordConnection.

stopSwarmDeployment

ArgumentTypeDescription
projectIdID!
swarmIdString!

Returns SwarmDeployment! · SwarmDeployment.

scaleSwarmDeployment

ArgumentTypeDescription
projectIdID!
swarmIdString!
replicasInt
minInt
maxInt
idempotencyKeyString!

Returns SwarmDeployment! · SwarmDeployment.

decideSwarmRunApproval

ArgumentTypeDescription
idID!
inputDecideSwarmRuntimeApprovalInput! · DecideSwarmRuntimeApprovalInput

Returns SwarmRuntimeRun! · SwarmRuntimeRun.

controlRuntimeAgent

ArgumentTypeDescription
projectIdID!
swarmIdString
agentIdString!
actionRuntimeAgentAction! · RuntimeAgentAction
idempotencyKeyString!

Returns RuntimeAgentLifecycleResult! · RuntimeAgentLifecycleResult.

forkRuntimeAgent

ArgumentTypeDescription
projectIdID!
swarmIdString
agentIdString!
versionString!
idempotencyKeyString!

Returns RuntimeAgentForkResult! · RuntimeAgentForkResult.

verifyRuntimeState

ArgumentTypeDescription
projectIdID!
swarmIdString
agentIdString!

Returns RuntimeStateVerification! · RuntimeStateVerification.

attestRuntimeAgent

ArgumentTypeDescription
projectIdID!
swarmIdString
agentIdString!
nonceString!

Returns RuntimeTeeAttestation! · RuntimeTeeAttestation.

registerRuntimeMcpServer

ArgumentTypeDescription
projectIdID!
swarmIdString
serverRuntimeMcpServerInput! · RuntimeMcpServerInput
idempotencyKeyString!

Returns RuntimeMcpRegistration! · RuntimeMcpRegistration.

testRuntimeModel

ArgumentTypeDescription
projectIdID!
swarmIdString
modelString
forceBoolean!

Returns RuntimeModelDiagnostic! · RuntimeModelDiagnostic.

setRuntimeSecret

acc secrets set: store one runtime secret for the project (bot tokens, policy bundles). OPENAI_API_KEY and ANTHROPIC_API_KEY are refused since 2026-09-26 (SWARM_MODEL_KEY_NOT_ALLOWED): a deployed swarm always runs through the platform inference; bring-your-own-key is an Org › Models setting.

ArgumentTypeDescription
projectIdID!
nameString!
valueString!

Returns RuntimeSecretReference! · RuntimeSecretReference.

Auth - SDK token exchange

loginWithPersonalAccessToken

Exchange a Personal Access Token for a short-lived access token. Used by the SDK to authenticate subsequent requests.

ArgumentTypeDescription
dataLoginWithPersonalAccessTokenDataInput! · LoginWithPersonalAccessTokenDataInput

Returns String!.

Auth

createPersonalAccessToken

ArgumentTypeDescription
nameString!
expiresAtDate

Returns PersonalAccessTokenCreated! · PersonalAccessTokenCreated.

deletePersonalAccessToken

ArgumentTypeDescription
idID!

Returns Boolean!.

Projects

createProject

ArgumentTypeDescription
dataCreateProjectDataInput! · CreateProjectDataInput

Returns Project! · Project.

updateProject

ArgumentTypeDescription
idID!
dataUpdateProjectDataInput! · UpdateProjectDataInput

Returns Project! · Project.

deleteProject

ArgumentTypeDescription
idID!

Returns Boolean!.

projectChatSession

Mint a single-use join ticket (plus room id, relay URL and room secret) for a project's chat. Requires project access; organization projects only. Relay-blind, not end-to-end: the platform can read project chat.

ArgumentTypeDescription
projectIdID!

Returns ProjectChatSession! · ProjectChatSession.

publicChatTicket

Mint a single-use join ticket for the hosted public chat. Requires only an authenticated caller: no org or project check. The ticket is NOT bound to a room: the platform never learns which public rooms exist or who is in them, only that this user opened chat.

Returns PublicChatTicket! · PublicChatTicket.

Services

createService

ArgumentTypeDescription
inputCreateServiceInput! · CreateServiceInput

Returns Service! · Service.

updateService

ArgumentTypeDescription
serviceIdID!
inputUpdateServiceInput! · UpdateServiceInput

Returns Service! · Service.

updateServicePriority

ArgumentTypeDescription
serviceIdID!
shutdownPriorityInt!

Returns Service! · Service.

deleteService

ArgumentTypeDescription
idID!

Returns Service! · Service.

Attestation registry (org allowlist; AF hosts, org authors)

addAttestationMeasurement

Bless a build measurement (compose_hash) in the active org's allowlist.

ArgumentTypeDescription
inputAddAttestationMeasurementInput! · AddAttestationMeasurementInput

Returns AttestationMeasurement! · AttestationMeasurement.

revokeAttestationMeasurement

Revoke a blessed measurement. Idempotent; revocation retires every identity minted from it.

ArgumentTypeDescription
idID!

Returns AttestationMeasurement! · AttestationMeasurement.

registerAttestedIdentity

Verify a server's quote (Intel DCAP roots, in-process) and record its identity. Requires the quote's measurement to be ACTIVE in the active org's allowlist and the quote's report_data to bind the pubkey.

ArgumentTypeDescription
inputRegisterAttestedIdentityInput! · RegisterAttestedIdentityInput

Returns AttestedIdentity! · AttestedIdentity.

Agent chat

createAgent

ArgumentTypeDescription
inputCreateAgentInput! · CreateAgentInput

Returns Agent! · Agent.

createChat

ArgumentTypeDescription
inputCreateChatInput! · CreateChatInput

Returns Chat! · Chat.

sendMessage

ArgumentTypeDescription
inputSendMessageInput! · SendMessageInput

Returns Message! · Message.

deleteChat

ArgumentTypeDescription
idID!

Returns Boolean!.

Observability settings

updateObservabilitySettings

ArgumentTypeDescription
projectIdID!
inputUpdateObservabilitySettingsInput! · UpdateObservabilitySettingsInput

Returns ObservabilitySettings! · ObservabilitySettings.

Templates

deployFromTemplate

ArgumentTypeDescription
inputDeployFromTemplateInput! · DeployFromTemplateInput

Returns a deployment object for the service's compute tier (provider-specific, not documented here). †

deployCompositeTemplate

ArgumentTypeDescription
inputDeployCompositeTemplateInput! · DeployCompositeTemplateInput

Returns CompositeDeploymentResult! · CompositeDeploymentResult.

Service environment variables

setServiceEnvVar

ArgumentTypeDescription
serviceIdID!
keyString!
valueString!
secretBoolean

Returns ServiceEnvVar! · ServiceEnvVar.

deleteServiceEnvVar

ArgumentTypeDescription
serviceIdID!
keyString!

Returns Boolean!.

bulkSetServiceEnvVars

ArgumentTypeDescription
serviceIdID!
vars[EnvVarInput!]! · EnvVarInput

Returns [ServiceEnvVar!]! · ServiceEnvVar.

revealServiceEnvVar

ArgumentTypeDescription
serviceIdID!
keyString!

Returns String!.

Service port configuration

setServicePort

ArgumentTypeDescription
serviceIdID!
containerPortInt!
publicPortInt
protocolString

Returns ServicePort! · ServicePort.

deleteServicePort

ArgumentTypeDescription
serviceIdID!
containerPortInt!

Returns Boolean!.

Service linking

linkServices

ArgumentTypeDescription
sourceServiceIdID!
targetServiceIdID!
aliasString

Returns ServiceLink! · ServiceLink.

unlinkServices

ArgumentTypeDescription
sourceServiceIdID!
targetServiceIdID!

Returns Boolean!.

Deployment file access (files tab)

writeServiceFile

ArgumentTypeDescription
serviceIdID!
pathString!
contentString!

Returns ServiceFileWriteResult! · ServiceFileWriteResult.

createServiceDirectory

ArgumentTypeDescription
serviceIdID!
pathString!

Returns Boolean!.

renameServiceFile

ArgumentTypeDescription
serviceIdID!
fromPathString!
toPathString!

Returns Boolean!.

deleteServiceFile

ArgumentTypeDescription
serviceIdID!
pathString!

Returns Boolean!.

Feedback

submitFeedback

ArgumentTypeDescription
inputSubmitFeedbackInput! · SubmitFeedbackInput

Returns FeedbackReport! · FeedbackReport.

GitHub deploy

beginGithubInstallationClaim

Begin a one-use GitHub user-authorization proof bound to the caller, AF organization, and exact installation id returned by GitHub's setup URL.

ArgumentTypeDescription
installationIdString!
orgIdID

Returns GithubInstallationClaim! · GithubInstallationClaim.

syncGithubInstallation

Create or grant an installation only after exchanging a GitHub user OAuth code and proving that user can access the exact App installation.

ArgumentTypeDescription
stateString!
codeString!

Returns GithubInstallationSyncResult! · GithubInstallationSyncResult.

refreshGithubInstallations

Live-pull all accessible App installations from GitHub into the local DB and return them. Slow path: UI uses this only on explicit Refresh / post-install.

ArgumentTypeDescription
orgIdID

Returns [GithubInstallation!]! · GithubInstallation.

uninstallGithubInstallation

Remove only this AF organization's installation grant and detach its services. GitHub-wide uninstall remains an installation-admin action on github.com and is reconciled by the signed deletion webhook.

ArgumentTypeDescription
installationIdID!
orgIdID

Returns Boolean!.

createGithubService

ArgumentTypeDescription
inputCreateGithubServiceInput! · CreateGithubServiceInput

Returns Service! · Service.

connectGithubRepo

ArgumentTypeDescription
inputConnectGithubRepoInput! · ConnectGithubRepoInput

Returns Service! · Service.

redeployGithubService

Trigger a new build. With no sha, builds the tip of the tracked branch (default behaviour, used by top-level Rebuild). With a sha (7-40 char hex commit SHA), rebuilds that exact commit: used by the per-row rebuild button in build history.

ArgumentTypeDescription
serviceIdID!
shaString

Returns BuildJob! · BuildJob.

† Some fields, arguments or return types are omitted from this page: provider-specific ones, or ones that belong to retired or admin-only surfaces.

On this page

OtherbeginIdentityImportcompleteIdentityImportrotateIdentitydeactivateIdentitycreateIdentityVerificationPolicyissueIdentityCardregisterIdentityCardrevokeIdentityCredentialpublishIdentityCardcreateIdentityProofRequestregisterA2aAgentCardissueA2aAccessTokenissueIdentityDelegationauthorizeCapabilityInvocationsubmitSwarmRunreplaySwarmRuncancelSwarmRunregisterSwarmDefinitionregisterSwarmDefinitionFromSpecrekeySwarmPolicyBundleissueSwarmDefinitionBootstraprevokeSwarmDefinitionBootstraprevokeOtherSwarmDefinitionBootstrapsbindSwarmDeploymentdeploySwarmRuntimestartSwarmDeploysetSwarmModelconnectSwarmDiscorddisconnectSwarmDiscordstopSwarmDeploymentscaleSwarmDeploymentdecideSwarmRunApprovalcontrolRuntimeAgentforkRuntimeAgentverifyRuntimeStateattestRuntimeAgentregisterRuntimeMcpServertestRuntimeModelsetRuntimeSecretAuth - SDK token exchangeloginWithPersonalAccessTokenAuthcreatePersonalAccessTokendeletePersonalAccessTokenProjectscreateProjectupdateProjectdeleteProjectprojectChatSessionpublicChatTicketServicescreateServiceupdateServiceupdateServicePrioritydeleteServiceAttestation registry (org allowlist; AF hosts, org authors)addAttestationMeasurementrevokeAttestationMeasurementregisterAttestedIdentityAgent chatcreateAgentcreateChatsendMessagedeleteChatObservability settingsupdateObservabilitySettingsTemplatesdeployFromTemplatedeployCompositeTemplateService environment variablessetServiceEnvVardeleteServiceEnvVarbulkSetServiceEnvVarsrevealServiceEnvVarService port configurationsetServicePortdeleteServicePortService linkinglinkServicesunlinkServicesDeployment file access (files tab)writeServiceFilecreateServiceDirectoryrenameServiceFiledeleteServiceFileFeedbacksubmitFeedbackGitHub deploybeginGithubInstallationClaimsyncGithubInstallationrefreshGithubInstallationsuninstallGithubInstallationcreateGithubServiceconnectGithubReporedeployGithubService