CreatorTrack chat agents (LIVE on prod 2026-07-07)¶
URL: https://mkdocs.justinsforge.com/memory/general/reference_creatortrack_chat_agents/
Every user picks their chat AI model via the sidebar agent picker (sliders button next to Recent) or Settings > AI model (added-models list + "Add model"). Selection persists in core.users.prefs.chat_ai.agent; resolved server-side per request in lib/llm/user-config.ts (resolveProviderForUser).
Built-in agents (all users)¶
| id | Label | Backend |
|---|---|---|
self-hosted |
CreatorTrack (default) | Copper/Qwen via creatortrack-llm.env (unchanged) |
justin-haiku |
Justin's Claude Haiku | claude-haiku-4-5 on the claude2 subscription |
justin-sonnet |
Justin's Claude Sonnet | claude-sonnet-5 on the claude2 subscription |
markai |
MarkAi | Copper API direct, https://copper-api.markcodes.org, model cyankiwi/Qwen3.6-27B-AWQ-BF16-INT4, bare token ~/.forge-secrets/markaiapi.env |
Custom models addable per user: Claude (Anthropic API key) or OpenAI-compatible (base URL + key). Keys AES-256-GCM encrypted in core.user_llm_keys, keyed by custom model id.
claude2 subscription auth (lib/llm/claude-subscription.ts)¶
- Reads
~/.claude-sub2/.credentials.json([email protected]; written by Claude Code withCLAUDE_CONFIG_DIR=~/.claude-sub2). - Auto-refreshes near expiry via OAuth refresh grant (
console.anthropic.com/v1/oauth/token, public Claude Code client id) and writes tokens back ATOMICALLY so the CLI stays in sync. - Messages API calls:
Authorization: Bearer+anthropic-beta: oauth-2025-04-20+ Claude Code identity as FIRST system block. Community pattern, not officially supported; failures surface loudly in chat. Fallback: add a BYO Anthropic key as a custom model. - Newer Claude models (Sonnet 5+) reject
temperature; the Anthropic provider sends none. - ALL workspace members can use these agents; their usage bills Justin's claude2 subscription quota.
Photos + tools¶
- Photo uploads in chat (attach/paste, max 4, 3.5MB each): vision agents only (both Claude agents + BYO); non-vision models error with a switch-model message. Stored on
app.chat_messages.attachments; images ride only the turn they're sent. - Tool surface (all agents, RLS-scoped): get/create/complete/update task, get/log habit, get_meals/log_food (food log, agent estimates macros; photos of food get itemized + logged), get_intake/log_intake (supplements/meds, auto-seeds items, source="chat"), list/create project, search/read/create page. Added 2026-07-07; smoke:
npx tsx scripts/smoke-chat-food-intake.ts.
Smoke test¶
cd ~/creatortrack && npx tsx scripts/smoke-chat-agents.ts , live-verifies claude2 token refresh + Haiku + MarkAi replies. Costs a few tokens per run.
[Claude Code]