$ pip install teich # or: uvx teich --help$ teich init my-project && cd my-project# add prompts to prompts.jsonl, set OPENAI_API_KEY$ teich generate -c config.yaml --resume✓ raw traces · training rows · tools.json · dataset card → output/$ teich studio # configure runs in the browser$
$ teich extract claude --model fable-5 --out data✓ anonymized sessions staged · README.md written upload to Hugging Face? (y/N)$ teich extract cursor --sessions-dir ~/Cursor/User/workspaceStorage$ teich convert data --out teich-training.jsonl✓ standalone OpenAI-style rows: prompt · messages · tools · metadata$
Why it exists
Most SFT pipelines flatten agent data too early.
That loses tool schemas, tool results, reasoning boundaries and the exact assistant spans you meant to train on. teich keeps the data structured until the last practical moment.
Generate traces
Run Codex, Pi, Claude Code, Hermes or plain chat agents against your prompts and real GitHub repos. Resume interrupted batches.
Extract local sessions
Turn the Claude Code, Codex, Cursor, Pi and Hermes sessions already on your machine into an anonymized dataset with one command.
Normalize everything
Raw traces, JSONL, Hugging Face datasets and in-memory Dataset objects become OpenAI-style messages plus tools, with provenance intact.
Render with your template
Rows are rendered through the target tokenizer's chat template, including live Gemma 4, Qwen 3.6 / 3.8 and Granite 4.2 thinking modes.
Mask the loss correctly
Typed supervision spans are recorded before tokenization and applied after TRL or Unsloth tokenizes, so labels land exactly on assistant turns.
Audit the run
Dropped, oversized, trimmed, malformed and fully-masked rows are reported instead of silently vanishing into your training set.
Train on our data in two calls
prepare_data() then mask_data().
Point it at any dataset on this site. It renders through your tokenizer's chat template, records supervision spans, and applies response-only labels after the trainer tokenizes.
from teich import prepare_data
train_dataset = prepare_data(
"TeichAI/Claude-Opus-4.6-Reasoning-887x",
tokenizer,
max_length=32768,
oversized_policy="trim_followups",
tokenize=True,
chat_template_kwargs={
"enable_thinking": True,
"preserve_thinking": True,
},
)from teich import mask_data
trainer = mask_data(
trainer, # your TRL / Unsloth SFTTrainer
tokenizer=tokenizer,
train_on_reasoning=True,
train_on_final_answers=True,
train_on_tools=True,
)
trainer.train()Pipeline
- prompts / traces / JSONL / HF datasets
- load_traces() · prepare_data()
- normalized messages + tools
- chat template rendering
- supervision spans
- SFTTrainer tokenization
- mask_data()
- audited input_ids + labels
Documentation
Everything is written down.
Made with teich
Datasets we generated with it
Agent traces from DeepSeek, Ox Alpha, Claude Fable 5 and more, straight out of the same pipeline.
Ox Alpha
Ox-Alpha Pi Agent Coding Traces
Ox-Alpha-Pi-Traces
This directory contains raw agent trace files generated by teich. JSONL files: 2247 Model metadata: stealth/ox-alpha Domains and prompt distribution Topic Traces Games & simulation (headless) 196 Frontend & Node-testable web 159 Health…
Ox Alpha
Ox Alpha Chat Traces
Ox-Alpha-10k
10,005 single-turn prompts for text-response teacher generation Each row carries id, category, subcategory All data was gathered using stealth/ox-alpha via OpenRouter (reasoning effort high) Topic distribution Category Rows Share Coding…
DeepSeek V4 Pro
DeepSeek v4 Pro Agent Traces
DeepSeek-v4-Pro-Agent
This directory contains raw agent trace files generated by teich. All assistant responses were generated by deepseek/deepseek-v4-pro. JSONL files: 4006 Training-ready tools A complete configured tools schema snapshot is embedded in the…
DeepSeek V4 Flash
DeepSeek v4 Flash Chat
DeepSeek-v4-Flash-Chat
Teich Test This directory contains newline-delimited JSON training examples generated by teich. All assistant responses were generated by deepseek/deepseek-v4-flash. Rows: 6313 Format Each file is newline-delimited JSON where every line…