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.
Everything a client needs to join a project's chat room.
TRUST MODEL: relay-blind, NOT end-to-end. The chat relay only ever sees
ciphertext, but the platform issues and stores the secret, so the platform
can read project chat. True end-to-end with membership changes is MLS
(E2EE hardening roadmap item 1) and is not built.
Field
Type
Description
room
String!
Relay room id: use verbatim; never derive it client-side.
relayWsUrl
String!
Public relay WebSocket endpoint, e.g. wss://chat.alternatefutures.ai/ws
ticket
String!
Single-use join ticket. Every (re)connect needs a fresh one.
ticketExpiresAt
String!
ISO-8601 expiry of the ticket (~30s out).
secret
String!
Per-project room secret; the client derives the AES key from it.
A single-use join ticket for the HOSTED public chat (chat.alternatefutures.ai).
TRUST MODEL: the ticket is NOT bound to a room. The platform learns WHO
opened hosted public chat and WHEN, never WHICH room or with whom: the
relay redeems it as roomClass: "public" with no room id. Passphrase rooms
stay end-to-end encrypted and opaque to the platform.
Field
Type
Description
ticket
String!
Single-use join ticket. Every (re)connect needs a fresh one.
Create-time discriminator describing the catalog flow that produced this service. One of 'docker' | 'server' | 'function' | 'template' | 'github' | 'swarm'. Null on legacy rows; the web app falls through to 'docker' for VM rows and 'function' for FUNCTION rows. Immutable after creation. 'swarm' (item D, 2026-09-18) marks the runtime service of ONE swarm, named after the team; it deploys only through deploySwarmRuntime.
swarmId
String
The swarm this service hosts, or null. Resolution order: the bound swarm (SwarmDeploymentBinding by serviceId) → the swarm of an in-flight deploy claim → the service name when flavor is 'swarm' and nothing has deployed yet. Legacy 'swarm-runtime-<team>' docker rows resolve through the binding, so every swarm service answers this.
Lifetime spend attributed to this service: compute from the settled per-deployment totals this API keeps (escrow consumed, hourly totals), inference from the org usage-log rows stamped with this serviceId by a deploy-minted token. Resolved on demand (one auth call): never select it in list queries.
templateId
ID
dockerImage
String
containerPort
Int
volumes
JSON
Persistent volumes for raw Docker images. Templates use template.persistentStorage instead. Shape: Array<{ name: string; mountPath: string; size: string }>.
healthProbe
JSON
Optional application HTTP health probe. Shape: JSON object with path (required, must start with /), optional port, expectStatus (default 200), intervalSec (default 30, clamped 10-3600), and timeoutSec (default 5, clamped 1-30). Null when no probe is configured.
Live application-level health derived from the configured healthProbe. Null until the runner has fired at least one probe.
failoverPolicy
JSON
Optional health-aware auto-failover policy. Shape: JSON object with enabled (boolean), maxAttempts (default 3, clamped 1-10), and windowHours (default 24, clamped 1-720). When enabled, the sweeper redeploys to a different provider on provider-side failures rather than plain-closing the deployment. Refused for services with persistent volumes (data-loss risk) and for application-side failures.
Live failover history derived from this service's deployment chain. Null when no failover has ever fired for this service.
internalHostname
String
hostnames
[String!]!
Public hostnames this service answers on through the platform proxy: the generated <slug>-app and <slug>-agent names under the deploy domain plus any operator-managed custom domain routed to this slug. Exactly the accept list its the standard compute tier SDL carries.
Spend attributed to one service (item D, 2026-09-18). Cents, USD.
computeCents sums the API's own settled totals for every deployment of
the service (the standard compute tier escrow consumedCents, the confidential compute (TEE) tier/the GPU compute tier totalBilledCents);
inferenceCents sums service-auth usage rows with this serviceId
(ai_inference). inferenceUnavailable is true when the auth lookup failed,
in which case inferenceCents is 0 and totalCents is compute only.
Inference is billed in fractions of a cent per request, so the *Usd fields
(2026-09-20) carry the real sums with 8 decimals; the *Cents fields are
rounded from them and read 0 below half a cent. Show the Usd fields.
Field
Type
Description
computeCents
Int!
inferenceCents
Int!
totalCents
Int!
computeUsd
Float!
inferenceUsd
Float!
totalUsd
Float!
inferenceRequests
Int!
Number of inference requests billed to this service.
inferenceOwnKeyRequests
Int!
Rows the org paid with its own provider key ($0 usage rows), counted for context.
Aggregate deploy metrics for a single service. Counts combine the live
deployment rows (current state: active + per-provider totals) with the
ServiceDeployEvent history (how many times, outcomes, last-deployed).
Extensible: new scalar fields can be added without reshaping clients.
Field
Type
Description
totalDeploys
Int!
Real user-intended deploys (excludes retry/failover/resume continuations).
totalAttempts
Int!
Every recorded deploy attempt, including retries/failovers/resumes.
succeededCount
Int!
Attempts that reached ACTIVE.
failedCount
Int!
Attempts that reached a terminal failure.
activeCount
Int!
Deployments live right now across all providers.
lastDeployedAt
String
ISO-8601 timestamp of the most recent deploy attempt, or null.
lastDeployTrigger
String
Trigger of the most recent deploy attempt (MANUAL, RETRY, FAILOVER, …).
Per-attempt result emitted by the application health runner.
Newest result is appended to ApplicationHealth.recentResults; the
buffer is capped at 20 entries per service.
Aggregated application health derived from the in-memory probe ring buffer.
The "overall" field summarises the last 3 results: "healthy" if all pass,
"unhealthy" if all fail, "starting" if mixed, "unknown" if no probes
have run yet.
Unmediated exec policy (terminal, acc ssh, acc cp). NONE = the template hard-locks the box; /ws/shell refuses even the owner. Independent of mode: READ_ONLY services may still be FULL here.
True when the template only runs on confidential compute (TEE): deploys to non-TEE providers are refused server-side (TEMPLATE_REQUIRES_TEE). The UI preselects the Confidential compute mode for these.
A model a hosted swarm agent may use. The one list the wizard's selector,
acc swarms model set, and the pre-spend guard all read. id is provider/model.
The deployed swarm's members and shape, read from its registered bundle.
Never carries prompts. Agents are in plan order.
Field
Type
Description
swarmId
String!
shape
String!
model
String
The model the hosted runtime uses for this project: one per project, from its model-provider config. Every deploy re-renders that config from the model the bundle's agents declare (2026-09-26), so after a deploy this is the agents' model; acc swarms model set overrides it only until the next deploy. Null before the first deploy.
Discord connection of a swarm: a verified bot token stored as a project
secret (never returned) plus the channel map. The map reaches the swarm's
bridge sidecar at deploy time, so pendingRedeploy says whether the running
lease already carries what is stored here.
Secret-free progress of one swarm deploy (startSwarmDeploy / swarmDeployProgress).
phase: claimed | preparing | reserving | delivering | retrying | waiting_runtime | ready | failed.
retrying (E-MVP M1): the first lease's provider kept the swarm control port closed; the lease was
closed and the same claim bids once more without that provider (deploymentId is null until then).
ready and failed are terminal (finishedAt set); errorCode/errorMessage only on failed.
Outcome of keeping the project's tool-grant bundle (SWARM_RUNTIME_POLICY_BUNDLE)
in step with a registered definition (2026-09-26). Grants are pinned to persona
digests. When a project owner or admin registers a version, every edited agent's
grants are copied under its new digest and a brand-new agent gets an entry with
no grants; the move is audited as swarm_runtime.policy_rekeyed. Other members get
the same report without a write.
Field
Type
Description
status
String!
none: the project has no bundle · empty: deny-all bundle, nothing pinned · current: every agent already keyed · rekeyed: entries written · stale: entries missing and the actor is not a project admin (a deploy will be refused) · unavailable: the secret backend or the definition could not be read
The job sentence the persona was rendered from; null when the persona was hand-written from files.
persona
String!
The persona text, verbatim: the system prompt the runtime applies (2026-09-26). Project members only; swarmRoster and the bridge credential never carry it.
The authored spec of a registered version, read back from its bundle for the
web Definition editor (E-MVP M3): shape, agents in plan order, reducer /
supervisor / maxIterations / edges as SwarmSpecInput would carry them. Each
agent carries its persona verbatim plus job, the sentence a wizard persona
was rendered from (null for a hand-written one). editable is false when the
version holds settings the editor cannot show (agent tools, skills or
sensitivity, an authority block written by hand): saving would drop them,
so the editor shows that version read-only and points at the CLI.
Median USD/hr price by GPU model within a region. Computed from the
last 24h of GpuBidObservation rows scoped to providers in this region.
Null = no recent bid for that model in this region (UI shows ": ").
cpu1Core is the median CPU bid (no-GPU probe SDLs) for a tdx.small-equivalent.
A curated region bucket as exposed to the picker UX.
The confidential compute (TEE) tier returns a single sentinel row with id=the confidential compute (TEE) tier-single-region: the
client detects this and renders the explicit single-region message
rather than the picker.
Field
Type
Description
id
String!
Stable id: us-east | us-west | eu | asia | the confidential compute (TEE) tier-single-region (sentinel).
label
String!
Human label, e.g. "US East" or "the confidential compute (TEE) tier (single-region)".
available
Boolean!
Region availability gate. Default mode (AF_REGIONS_REQUIRE_BIDS unset/0): true iff verifiedCount ≥ 1 (a verified provider exists in the bucket). Strict mode (AF_REGIONS_REQUIRE_BIDS=1): true iff verifiedCount ≥ 1 AND recentBidCount ≥ 1 (a recent bid was observed in the bucket).
verifiedCount
Int!
onlineCount
Int!
recentBidCount
Int!
Bid observations from this region in the last 24h.