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.
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-6LLM HTTP API (local Studio only)
| Method | Path | Role |
|---|---|---|
GET | /api/llm | Public status: effective model, profiles[], activeProfileId, modelConfigured (never apiKey) |
POST | /api/llm/profiles | Create profile |
PATCH | /api/llm/profiles/:id | Update profile (apiKey write-only) |
DELETE | /api/llm/profiles/:id | Delete profile (reassigns active when needed) |
POST | /api/llm/active | { "profileId" } — switch active ready profile |
POST | /api/llm/test | Test connection without saving |
PATCH | /api/llm | Bridge: 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 versionCases always live under ~/.authright/studio/cases/.
Providers and default models
Choose these in Settings → Models. The API key is saved in config.yaml.
| Provider | SDK package | Default model (official) |
|---|---|---|
openai | @ai-sdk/openai | gpt-4o-mini |
openai-compatible | @ai-sdk/openai + required base URL | gpt-4o-mini |
anthropic | @ai-sdk/anthropic | claude-sonnet-4-6 |
deepseek | @ai-sdk/deepseek | deepseek-flash |
gemini | @ai-sdk/google | gemini-3.8-flash |
grok | @ai-sdk/xai | grok-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:
- A folder under the cases root (default
~/.authright/studio/cases/<id>-<slug>/) - 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.mdChat 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)
| Method | Path | Role |
|---|---|---|
GET | /api/cases | List Cases (title, titleSource, pinned, …) |
POST | /api/cases | Create Case ({ "title" } optional; UI sends IAM Decide) |
GET | /api/cases/:id | One Case |
PATCH | /api/cases/:id | { "title"? } and/or { "pinned"? } |
DELETE | /api/cases/:id | Full Case cleanup (folder + Memory thread + UI stores + metadata) |
GET | /api/cases/:id/history | Chat 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
| Surface | Purpose |
|---|---|
| Left rail | Brand 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 |
| Right | Matching 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):
| Path | Meaning |
|---|---|
/ | 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+httpProxyUrlfor outbound LLM provider calls from the Studio server (not browser→Studio). Save viaPATCH /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
activeProfileIdfor 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-compatibleuses 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/healthnever return key values—onlyapiKeyConfigured, 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.
Troubleshooting
| Symptom | Action |
|---|---|
user_action_required: @authright/studio is not installed | npm i -g @authright/studio@latest |
| Port already in use | authright-studio --port 4320 |
| Health says model not configured | Open Settings → Models and save a provider, model, and API key |
openai-compatible fails at start | In Settings → Models, set a Base URL on that profile |
| Chat errors after health OK | Confirm key matches provider; check model id |
| Wrong Case folder mutations | Ensure the correct Case is selected; tools bind cwd from Case context |
Inspect runtime config (no secrets printed for key value):
Related
- AuthRight Studio — open a first Case
- Models — Settings → Models
- Proxy — Settings → Proxy
- Cases
- Installation