`POST /graphql`
Canonical agent and CLI endpoint. Use bearer-token auth and treat it as the default direct machine path.
The SaaS-replacement platform
Shared system for teams and agents. Official CLI + GraphQL surface.
GraphQL transport and schema
The CLI is the default public machine interface, but the GraphQL API is the backend contract underneath it. The material below shows transport details, real schema excerpts, and direct query patterns.
Table of contents
Jump directly to the part you need.
Transport
GraphQL is not a separate product surface from the CLI. It is the backend contract the CLI and other machine-facing integrations rely on.
Proof bundle
Canonical agent and CLI endpoint. Use bearer-token auth and treat it as the default direct machine path.
Session-authenticated admin endpoint used by browser-backed human workflows. Do not treat it as the default agent path.
Use `/health`, `/auth/...`, and `/attachments` for health checks, login bootstrap, and upload flows that are not modeled as GraphQL.
The router exposes GraphQL playground routes only outside production environments.
Schema excerpts
Use the schema file directly when you need concrete query and mutation roots. The excerpts below are trimmed from the canonical `internal/graphql/schema/schema.graphql` file.
Proof bundle
These queries show the main read surfaces exposed through GraphQL.
type Query { me: Principal! workspace(id: ID!): Workspace workspaces: [Workspace!]! teams(workspaceID: ID!): [Team!]! cases(workspaceID: ID!, filter: CaseFilter): CaseConnection! queues(workspaceID: ID!): [Queue!]! conversationSessions(workspaceID: ID!, filter: ConversationSessionFilter): [ConversationSession!]! knowledgeResources(workspaceID: ID!, filter: KnowledgeResourceFilter): [KnowledgeResource!]! extensions(workspaceID: ID!): [InstalledExtension!]! agents(workspaceID: ID!): [Agent!]!}
These mutations show how work records, knowledge, and extensions are changed through the backend contract.
type Mutation { createQueue(input: CreateQueueInput!): Queue! createFormSubmission(input: CreateFormSubmissionInput!): FormSubmission! addConversationMessage(sessionID: ID!, input: AddConversationMessageInput!): ConversationMessage! escalateConversation(sessionID: ID!, input: EscalateConversationInput!): Case! createKnowledgeResource(input: CreateKnowledgeResourceInput!): KnowledgeResource! updateKnowledgeResource(id: ID!, input: UpdateKnowledgeResourceInput!): KnowledgeResource! installExtension(input: InstallExtensionInput!): InstalledExtension! activateExtension(id: ID!): InstalledExtension!}
Direct query pattern
Use direct GraphQL only when the CLI is too high-level or when an integration already operates over HTTP. The examples below are intentionally minimal and align with the current public repo.
This is the same minimal `__typename` example shown in the platform repo documentation.
$ curl -sS https://api.your-app-domain/graphql \ -H "Authorization: Bearer hat_YOUR_TOKEN_HERE" \ -H "Content-Type: application/json" \ -d '{"query":"query { __typename }"}'
If the goal is to inspect the product shape rather than to embed the backend directly, the CLI remains the better first tool.
$ mbr spec export --json$ mbr queues list --workspace ws_preview --json$ mbr knowledge list --workspace ws_preview --search policy --json
When to use GraphQL
The CLI is easier to reason about for most agent tasks because it groups auth, context, idempotency, and operational verbs into one explicit surface.
References
Each link goes to the next authoritative page, reference, or support surface.
Move Big Rocks
Start from /agents, use
/docs/cli as the official product
tour, inspect /resources for
source and proof, and review /security
before making deployment or data-handling decisions.