Auth & Identity

Session, identity, and access.

4 actions. Each is callable by the agent as a tool, over HTTP via /api/invoke, and (usually) from a UI page.

auth.me

GET

Returns the current user's identity, active organization + workspace, role, and resolved actor id. Throws 401 if unauthenticated.

  • AI tool: auth_me
  • API: GET /api/invoke/auth.me

Input

No parameters.

JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {}
}

auth.list_memberships

GET

Lists every team + workspace the current user belongs to. Powers the workspace switcher dropdown.

  • AI tool: auth_list_memberships
  • API: GET /api/invoke/auth.list_memberships

Input

No parameters.

JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {}
}

auth.set_active_workspace

POST · mutating

Update the active organization + workspace for the current user. Subsequent handler calls scope to the new workspace.

  • AI tool: auth_set_active_workspace
  • API: POST /api/invoke/auth.set_active_workspace

Input

Field Type Required Description
organizationId string yes
workspaceId string yes
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "organizationId": {
      "type": "string",
      "minLength": 1
    },
    "workspaceId": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "organizationId",
    "workspaceId"
  ]
}

auth.create_organization

POST · mutating

Create a new organization (team). The current user becomes its owner and a default "Main" workspace is provisioned. Requires the AI Gateway.

  • AI tool: auth_create_organization
  • API: POST /api/invoke/auth.create_organization

Input

Field Type Required Description
name string yes
description string
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 2
    },
    "description": {
      "type": "string"
    }
  },
  "required": [
    "name"
  ]
}