Skip to content

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.

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:

bash
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:

bash
# 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_KEY

Store separate personal/org keys with --name:

bash
kompile auth login together --name org --no-switch
kompile auth list

2. 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.

bash
cd /path/to/your/repo

# Interactive setup wizard — selects Together AI and lets you search the live catalog
kompile chat --setup

Direct CLI overrides (for scripts or one-off launches):

bash
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 session

Switch models mid-conversation with /model.

Non-interactive / CI turns ​

bash
kompile chat --provider together --model deepseek-ai/DeepSeek-V3 \
  --prompt "Generate unit tests for the parser module and verify edge cases" \
  --output-format stream-json

3. 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:

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, ModelRouting keeps Together-namespaced IDs on together automatically.
  • When a frontier vendor is your main agent (Claude, Codex/OpenAI, or Antigravity), pass provider=together explicitly — or configure Together in /subagent-config route / role-route so workers automatically run on Together while your main thread stays on your lead model.

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:

text
/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,bash

Where Together AI shines in Kompile ​

  • Cost-effective open-weight coding & reasoning: Pair Together's open-weight pricing with Kompile's /cost ledger and kompile usage cost reports 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_task workers (documentation, test generation, codebase sweeps) via /workflow.
  • Dedicated endpoints & fine-tunes: Point --model at your organization's dedicated Together model ID or override --base-url when 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:

bash
# 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_KEY exported: By design, TogetherChatProvider does not auto-read ambient environment variables. Run kompile auth login together --from-env TOGETHER_API_KEY (or kompile 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). Use kompile chat --setup or /model to select directly from the live /v1/models catalog.
  • Structured tool discipline: Kompile's Enforcer keeps open-weight models using exact read/edit/grep/lsp tools instead of fragile shell pipelines, cutting retries and token waste.

Next steps ​

Released under the Apache-2.0 License.