AuthRight Studio reference

Configuration, Case layout, and the local HTTP API. To install and open a first Case, start with AuthRight Studio.

Configuration

Models, API keys, and the HTTP proxy are configured only in the web UI (Settings → Models and Settings → Proxy) and saved in ~/.authright/studio/config.yaml. The command line does not set them, and Studio does not read provider API keys from the environment.

Terminal
$chmod 600 ~/.authright/studio/config.yaml

Studio stores named model profiles (provider + model + optional key/baseUrl). One profile is active for the next chat generation. Manage profiles and the Studio-global HTTP proxy from the left-rail Settings control (opens a preferences-style dialog with Models and Proxy). Switch the active ready profile from the Model control in the chat composer (next to Send)—the left rail does not repeat the active model label.

Legacy flat provider / model files migrate once to version: 2 on load. With no saved ready profile, Studio stays on the first-run setup screen until you save one in Settings.

Global config file

Path: ~/.authright/studio/config.yaml

(Same tree as Case folders: ~/.authright/studio/cases/ on disk.)

version: 2
activeProfileId: openai-mini
# Optional Studio-global outbound proxy for LLM provider calls (not browser→Studio):
# httpProxyEnabled: true
# httpProxyUrl: http://127.0.0.1:7890
profiles:
  - id: openai-mini
    label: GPT-4o mini
    provider: openai
    model: gpt-4o-mini
    # apiKey: sk-...                 # written by Settings → Models
    # baseUrl: https://api.openai.com/v1   # usually only for openai-compatible / overrides
  - id: claude-sonnet
    label: Claude Sonnet
    provider: anthropic
    model: claude-sonnet-4-6

LLM HTTP API (local Studio only)

MethodPathRole
GET/api/llmPublic status: effective model, profiles[], activeProfileId, modelConfigured (never apiKey)
POST/api/llm/profilesCreate profile
PATCH/api/llm/profiles/:idUpdate profile (apiKey write-only)
DELETE/api/llm/profiles/:idDelete profile (reassigns active when needed)
POST/api/llm/active{ "profileId" } — switch active ready profile
POST/api/llm/testTest connection without saving
PATCH/api/llmBridge: update the active profile in place

Launch flags

Primary bin: authright-studio.

authright-studio [options]

  --port <number>        Bind port (default 4317; no silent port hop)
  --host <address>       Loopback bind (default 127.0.0.1)
  --no-open              Do not open a system browser
  -V, --version          Print version

Cases always live under ~/.authright/studio/cases/.


Providers and default models

Choose these in Settings → Models. The API key is saved in config.yaml.

ProviderSDK packageDefault model (official)
openai@ai-sdk/openaigpt-4o-mini
openai-compatible@ai-sdk/openai + required base URLgpt-4o-mini
anthropic@ai-sdk/anthropicclaude-sonnet-4-6
deepseek@ai-sdk/deepseekdeepseek-flash
gemini@ai-sdk/googlegemini-3.8-flash
grok@ai-sdk/xaigrok-4.7

DeepSeek presets base URL https://api.deepseek.com unless the profile sets another. Other DeepSeek IDs: deepseek-v4-pro. Legacy deepseek-chat / deepseek-reasoner were retired 2026-07-24. Settings accepts google as gemini and xai as grok.


Cases and disk layout

A Case is one IAM Decide container: a local folder plus a bound chat thread.

Creating a Case creates:

  1. A folder under the cases root (default ~/.authright/studio/cases/<id>-<slug>/)
  2. A chat thread bound to that Case

All AuthRight I/O for that Case uses the Case folder as cwd. Artifacts live only under that folder’s .authright/.

Metadata store: ~/.authright/studio/cases.json (alongside cases/). On first start, Studio migrates legacy tasks/ + tasks.json into cases/ + cases.json when present.

~/.authright/studio/
  config.yaml                 # optional global LLM config
  cases.json                  # Case list (id, title, titleSource, pinned, folderPath, threadId)
  memory/
    mastra.db                 # Mastra chat memory (threadId = Case thread)
  ui/
    studio-ui.db              # Activity progress, decide cards
  cases/
    case-xxxxxxxx-my-title/   # one Case folder
      .authright/             # after init / Decide
        brief/brief.yaml
        changes/AUTH-…/
        docs/YYYYMMDDTHHMMSSZ.md

Chat continuity is local-first: Mastra Memory (LibSQL file DB) keeps the last ~30 turns in agent context for the Case threadId, and Studio hydrates the chat UI from GET /api/cases/:id/history on open/restart. Deleting a Case (Delete in the Cases-rail ⋯ menu, or DELETE /api/cases/:id) removes that Case’s metadata row, folder, Memory thread/messages, and UI store rows. .authright/ on disk remains the source of truth for Decide artifacts while the Case exists.

Cases HTTP API (local Studio only)

MethodPathRole
GET/api/casesList Cases (title, titleSource, pinned, …)
POST/api/casesCreate Case ({ "title" } optional; UI sends IAM Decide)
GET/api/cases/:idOne Case
PATCH/api/cases/:id{ "title"? } and/or { "pinned"? }
DELETE/api/cases/:idFull Case cleanup (folder + Memory thread + UI stores + metadata)
GET/api/cases/:id/historyChat messages + progress for reopen

Studio tools confine writes to .authright/. Durable plan locks go through Studio Decide (assign open slots, confirm the plan, then ready) — not by hand-editing lock files in chat.


UI surfaces

SurfacePurpose
Left railBrand header; full-width New Case; optional Pinned section; collapsible Cases list (⋯ Rename / Pin / Delete); footer Settings
Center (Case open)Matching Case title/path header (click title to rename) + CopilotKit chat; empty threads show a welcome section (not a mock assistant bubble)
Center (no Cases, model ready)Zero-Case welcome + composer (no Case title/folder header); first send creates a Case
RightMatching Activity header + tool steps / paths

There is no top application bar. Light UI uses AuthRight brand colors (teal #205a5e, warm paper background).

Browser paths

Workbench selection uses the browser address bar (separate from the HTTP Case API under /api/cases):

PathMeaning
/No active Case. With a ready model and an empty Case list, the zero-Case welcome + composer. With Cases present, Studio selects the first Case and moves to /c/<caseId>.
/c/<caseId>That Case is selected when it exists. Refresh reopens it. A missing or stale id falls back to the first remaining Case, or to / when none remain.

Deleting the open Case advances to the first remaining Case URL, or to / when the list is empty. See Cases.

First-run / model gate

Until a provider + model + API key are configured (modelConfigured):

  • With no Cases yet, Studio uses a focused first-run layout: Cases / Activity side panels are hidden (no topbar), and a single setup hero owns the Configure model CTA.
  • With existing Cases, the three-column workbench returns; chat stays gated until a model is configured.

After a successful save that unlocks the model, Studio toasts “Model ready” and restores the normal Cases workbench. When the model is ready and you still have zero Cases, that workbench shows the zero-Case welcome + composer in the center (not the focused setup hero).

Settings dialog and chat switcher

  • Left-rail footer Settings opens a preferences-style dialog (not a drawer) with sidebar categories Models | Proxy.
  • Models: profile library (add / edit / delete / Test connection / Save). It does not show the active model name (that lives in the chat composer).
  • Proxy: Studio-global httpProxyEnabled + httpProxyUrl for outbound LLM provider calls from the Studio server (not browser→Studio). Save via PATCH /api/llm/proxy. Public status returns enablement + a redacted host:port display—never proxy passwords.
  • In an open Case, the chat input control row has a compact Model picker next to Send; it lists ready profiles and switches activeProfileId for the next turn (does not cancel an in-flight turn). Manage models… opens Settings on Models.
  • Curated model dropdowns per provider (with Custom model id…). openai-compatible uses free-text model id + required Base URL.
  • API key is write-only: leave blank to keep the existing env/file key. GET /api/llm / /api/health never return key values—only apiKeyConfigured, per-profile ready flags, sources, and non-secret proxy fields.
  • Test connection probes draft model settings without saving (and may send draft proxy fields). Success shows Connection verified.
Terminal
$curl -s http://127.0.0.1:4317/api/llm | jq .
# Create a profile:
$curl -s -X POST http://127.0.0.1:4317/api/llm/profiles \
-H 'content-type: application/json' \
-d '{"provider":"openai","model":"gpt-4o-mini","label":"GPT-4o mini"}' | jq .
# Save Studio-global HTTP proxy:
$curl -s -X PATCH http://127.0.0.1:4317/api/llm/proxy \
-H 'content-type: application/json' \
-d '{"httpProxyEnabled":true,"httpProxyUrl":"http://127.0.0.1:7890"}' | jq .
# Switch active ready profile:
$curl -s -X POST http://127.0.0.1:4317/api/llm/active \
-H 'content-type: application/json' \
-d '{"profileId":"openai-mini"}' | jq .
# Probe without persisting:
$curl -s -X POST http://127.0.0.1:4317/api/llm/test \
-H 'content-type: application/json' \
-d '{"provider":"openai","model":"gpt-4o-mini"}' | jq .

Troubleshooting

SymptomAction
user_action_required: @authright/studio is not installednpm i -g @authright/studio@latest
Port already in useauthright-studio --port 4320
Health says model not configuredOpen Settings → Models and save a provider, model, and API key
openai-compatible fails at startIn Settings → Models, set a Base URL on that profile
Chat errors after health OKConfirm key matches provider; check model id
Wrong Case folder mutationsEnsure the correct Case is selected; tools bind cwd from Case context

Inspect runtime config (no secrets printed for key value):

Terminal
$curl -s http://127.0.0.1:4317/api/health | jq .

On this page