Together Core Workflow B
Run Together AI asynchronous batch inference from validated JSONL through upload, job polling, ou…
by jeremylongshore · MIT
The skill
Run Together AI asynchronous batch inference from validated JSONL through upload, job polling, output/error download, and custom-id reconciliation. Use when bulk work can trade latency for lower cost. Trigger with "Together batch inference", "bulk Together requests", or "Together Batch API".
Together AI Batch Inference
Overview
This skill converts independent offline requests into a recoverable Batch API job and reconciles every success and failure without relying on output order.
Prerequisites
- Independent request records suitable for asynchronous processing
- A currently batch-eligible model and supported endpoint
- Stable unique
custom_idvalues and an approved output location - A request/token budget, retention policy, and job owner
Tool Discipline
Use Read, Glob, and Grep to inspect input generation, schemas, and reconciliation code. Use WebFetch for current batch eligibility and SDK response shapes. Use Write or Edit only for approved JSONL, manifests, or reconciliation logic; avoid placing sensitive prompts in diagnostic output.
Current Contract
- Each JSONL line contains a unique
custom_idand a requestbody. - Upload with
purpose="batch-api"; create withclient.batches.create()and the target endpoint. - Results can arrive in arbitrary order. Join by
custom_id. - A
COMPLETEDbatch can still have per-request failures inerror_file_id; inspect both files.
Authentication
File and batch APIs use the project-scoped TOGETHER_API_KEY as a Bearer credential. Keep remote file IDs and batch IDs as operational references, but redact the credential and sensitive request bodies.
Instructions
- Confirm requests are independent and the chosen model is currently batch eligible.
- Validate JSONL syntax, endpoint body schema, unique IDs, request count, and token bounds locally.
- Upload the file with batch purpose and record its hash and returned file ID.
- Create the job with the uploaded ID and exact API endpoint; persist the returned batch ID.
- Poll status with bounded backoff until terminal, without assuming the usual completion time.
- Download output and error files, reconcile all IDs, verify counts, and apply retention cleanup.
Approval Boundaries
Do not upload regulated or customer data without approval. Do not resubmit an ambiguous job: first reconcile the prior batch ID to avoid duplicate spend.
Output
Return input hash/count, endpoint, model, file and batch references, terminal state, success/error counts, reconciliation result, cost evidence, and cleanup disposition.
Error Handling
| Condition | Response |
|---|---|
| JSONL validation fails | Stop before upload and report offending line numbers. |
| Model is not batch eligible | Choose another model explicitly or use synchronous inference. |
| Polling deadline expires | Preserve the batch ID and hand off; do not create a duplicate. |
| IDs do not reconcile | Quarantine outputs and identify missing, duplicate, and unknown IDs. |
Examples
The example below shows the minimum redacted evidence expected from a successful invocation of this operator workflow.
input=10000; uploaded=10000; terminal=COMPLETED; success=9974; error=26; reconciled=10000
Resources
Use this skill
Connect your agent to the Skill Store MCP server and ask for it by ref: jeremylongshore/together-core-workflow-b-58593078045.
Details
- Publisher
- jeremylongshore
- Category
- Data & Analytics › Machine learning & training
- License
- MIT
- Updated
- 2026-10-19
References
More from jeremylongshore
- Agency Os Notion-as-source-of-truth dispatch board for running your work like an AI agency.
- Audit Use when the user wants a code review on recent changes — quality, spec, security, or performance…
- Background Use when the user wants to see, inspect, cancel, or prune background agents fired during prior ch…
- Bridge Use when the user wants hyperflow's behavioral rules to apply outside the terminal CLI — in Claud…