Quickstart for Together AI Users
Together AI hosts a broad catalog of open-weight coding and reasoning models (Llama, Qwen, DeepSeek, Kimi, Mistral, and custom fine-tunes) over the OpenAI Chat Completions protocol (https://api.together.xyz/v1). Kompile supports Together AI natively (together provider) with live model discovery and Kompile's full opinionated harness.
Fastest setup (interactive wizard — recommended)
You don't need to remember case-sensitive Together org/Model-Name IDs or CLI flags. Run the interactive wizards once to store your key, search Together's live model catalog, and save your defaults — after that, just run kompile chat:
cd /path/to/your/repo
kompile auth login # Interactive Auth Wizard → pick Together AI (or `/auth` inside chat)
kompile chat # Launches SetupWizard on first run (or `kompile chat --setup` anytime)1. Authenticate (important: managed store only)
IMPORTANT
Together AI keys in Kompile are managed credentials only — there is intentionally no ambient TOGETHER_API_KEY environment-variable fallback (TogetherChatProvider). Always register your key once via kompile auth login (or /auth inside chat).
Direct CLI commands for scripts, CI, or multiple named accounts:
# Option A: Direct masked prompt
kompile auth login together
# Option B: Pipe from stdin (CI / scripts)
printf '%s\n' "$TOGETHER_API_KEY" | kompile auth login together --stdin
# Option C: Store a reference to an environment variable you manage yourself
export TOGETHER_API_KEY="tgp_v1_..."
kompile auth login together --from-env TOGETHER_API_KEYStore separate personal/org keys with --name:
kompile auth login together --name org --no-switch
kompile auth list2. Discover models & start chatting
Kompile fetches live models from https://api.together.xyz/v1/models and caches the last-known-good catalog in ~/.kompile/cache/model-catalogs.json. Once saved via kompile chat --setup, simply run kompile chat.
cd /path/to/your/repo
# Interactive setup wizard — selects Together AI and lets you search the live catalog
kompile chat --setupDirect CLI overrides (for scripts or one-off launches):
kompile chat --provider together --model deepseek-ai/DeepSeek-V3
# Pin a named credential to one session without changing global defaults
kompile chat --provider together \
--model Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8 \
--credential org --auth-scope sessionSwitch models mid-conversation with /model.
Non-interactive / CI turns
kompile chat --provider together --model deepseek-ai/DeepSeek-V3 \
--prompt "Generate unit tests for the parser module and verify edge cases" \
--output-format stream-json3. How resolve_model works with Together AI
Before dispatching a subagent, Kompile agents call resolve_model to verify live routes without spending tokens or triggering logins:
resolve_model action=providers: Liststogetheralongside any other registered providers.resolve_model action=models provider=together [query=Qwen]: Querieshttps://api.together.xyz/v1/modelslive, omits any model banned by/subagent-config, and returns exact case-sensitivetaskArguments(provider=together,org/Model-Name).
How your vendor of choice is resolved
Together AI model IDs are org-namespaced (deepseek-ai/DeepSeek-V3, Qwen/Qwen3-Coder-..., meta-llama/...), rather than bare first-party prefixes in ModelRouting:
- When Together is your active chat provider,
ModelRoutingkeeps Together-namespaced IDs ontogetherautomatically. - When a frontier vendor is your main agent (Claude, Codex/OpenAI, or Antigravity), pass
provider=togetherexplicitly — or configure Together in/subagent-config route/role-routeso workers automatically run on Together while your main thread stays on your lead model.
4. Recommended subagent configuration (/subagent-config)
TIP
Together AI excels as an economical subagent fleet. Never make top-tier models like Opus, Fable, Astra, or Neon a subagent unless you are sure of the cost — ban them in /subagent-config and route high-volume worker tasks (test generation, codebase sweeps, documentation, parallel audits) to Together AI.
Subagents never silently borrow the parent chat's Kompile-managed credential — pin your Together credential name (kompile auth list together) in /subagent-config route:
/subagent-config ban *opus*
/subagent-config ban *fable*
/subagent-config ban *astra*
/subagent-config ban *neon*
/subagent-config route together/deepseek-ai/DeepSeek-V3 credential=default
/subagent-config role-route coder together/Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8 credential=default
/subagent-config per-session 6
/subagent-config budget 500000
/subagent-config preload-tools read,grep,glob,edit,write,bashWhere Together AI shines in Kompile
- Cost-effective open-weight coding & reasoning: Pair Together's open-weight pricing with Kompile's
/costledger andkompile usage costreports to keep large repository refactors predictable. - Mixed-fleet workflow teams: Use a frontier model (Claude, Codex, or Antigravity) as the workflow lead and assign Together AI models to high-volume parallel
multi_taskworkers (documentation, test generation, codebase sweeps) via/workflow. - Dedicated endpoints & fine-tunes: Point
--modelat your organization's dedicated Together model ID or override--base-urlwhen routing through an internal gateway.
Resuming & importing sessions onto Together AI
Every Together AI session is persisted as a portable Kompile transcript in ~/.kompile/conversations/. You can resume previous chats directly, recover multiple windows after a restart, or import transcripts from external tools (Claude Code, Codex, Antigravity, OpenCode, Cursor, Aider, Cline, Continue) and continue them on Together AI:
# Resume Kompile sessions
kompile chat --continue # Resume last session in this project
kompile resume # Interactive multi-tab session browser
kompile resume-all # Restore all recently active terminal windows
# Import an external session and continue on Together AI
kompile session import-all
kompile chat --resume <id> --provider together --model <org/Model-Name>CrossAgentResumeCompactor automatically sizes the imported history to fit your target Together model's context window. See Import & Resume for all 11 adapters and durable subagent resume.
Common gotchas
- "No credential found" even with
TOGETHER_API_KEYexported: By design,TogetherChatProviderdoes not auto-read ambient environment variables. Runkompile auth login together --from-env TOGETHER_API_KEY(orkompile auth login together) once to bind it in Kompile's managed store. - Exact casing on Together model IDs: Together model IDs are case-sensitive (
org/Model-Name). Usekompile chat --setupor/modelto select directly from the live/v1/modelscatalog. - Structured tool discipline: Kompile's Enforcer keeps open-weight models using exact
read/edit/grep/lsptools instead of fragile shell pipelines, cutting retries and token waste.