Skip to main content
This tutorial walks through DecimalAI’s end-to-end training workflow: trace → evaluate → build dataset → fine-tune. By the end, you’ll have a fine-tuned model trained on your agent’s best production outputs. This isn’t a one-shot pipeline — it’s a flywheel. Each fine-tuned model you deploy produces new traces, which feed the next round of evaluation and training:

Prerequisites

  • DecimalAI SDK installed (pip install "decimalai[evals]")
  • An API key (DECIMAL_API_KEY)
  • An agent producing traces (see Quickstart)
  • An OpenAI or Together.AI API key for fine-tuning

1

Instrument Your Agent

Make sure your agent is instrumented and sending traces:
After running your agent on production traffic for a period, you’ll have traces in the dashboard.
You should now see: traces accumulating on the Traces page as your agent runs. If nothing appears, check startup logs — a framework flag whose package isn’t installed logs a warning and continues untraced (see the silent no-ops list at the bottom of this page).
2

Evaluate Traces

Attach evaluators to score output quality:
Traces are now scored automatically. Check the Evaluate page in the dashboard to see pass rates and trends.
You should now see: new traces arriving with eval scores attached — pass rates and per-evaluator verdicts on the Evaluate page. Scores apply to traces recorded after install(evals=...) ran; earlier traces stay unscored.
3

Review the Eval Dashboard

In the dashboard, navigate to Evaluate:
  • Pass Rate: What percentage of traces are passing your evaluators
  • Score Distribution: Histogram of scores across all traces
  • Evaluator Breakdown: Which evaluators catch the most failures
Use the verdict filter to isolate failing traces and understand what’s going wrong.
4

Build a Dataset

Navigate to Datasets in the sidebar, then click “Build Dataset”:
  1. Select agent: Choose support-agent
  2. Filter by manifest: Use the latest manifest version (ensures current agent config)
  3. Filter by eval verdict: Select only pass verdicts
  4. Choose format: SFT (supervised fine-tuning)
  5. Click Build
DecimalAI converts multi-turn agent traces into the chat completion format:
Each multi-turn conversation becomes one training example. Tool calls and results are preserved so the fine-tuned model learns when and how to use tools.
You should now see: a new dataset version with a non-zero row count on its detail page. A 0-row build means your filters matched nothing — most often the eval-verdict filter with no scored traces yet (step 2), or a manifest filter pinned to a version your traffic predates.
5

Launch Fine-Tuning

From the dataset detail page, click “Train”:
  1. Select provider: OpenAI, Together.AI, or Gemini
  2. Enter credentials: API key for the training provider
  3. Configure: Choose base model, training epochs
  4. Launch
The platform submits the job and polls for completion. Training metrics (loss, validation) are stored for review.Supported Providers:
6

Alternative: Pull Data for External Training

Prefer to train locally or with your own infrastructure? Pull the dataset via SDK or CLI:
Push to HuggingFace Hub for use with Axolotl, Unsloth, or TRL:
Now use the data in any training framework:
7

Deploy and Iterate

Update your agent to use the fine-tuned model. DecimalAI will:
  1. Detect the manifest change (model changed) and register a new version
  2. Generate a compatibility report for existing traces
  3. Continue evaluating new traces from the fine-tuned model
  4. Build the next dataset from improved outputs
This creates a continuous improvement loop: better model → better traces → better training data → even better model.

If a step produced nothing

The pipeline degrades quietly rather than crashing — an uninstrumented agent, an unscored trace, or an empty dataset build all look like success until you check the counts. The usual causes: The SDK is deliberately fail-open: a misconfiguration degrades quietly instead of crashing your agent. These are the six places that bites, in the order people hit them.
Browsing or previewing a skill on the public registry doesn’t make it routable — you have to adopt it into your org first. Either way works — Use (router.use("name") or the Use button) creates a linked pointer that tracks the author’s updates, and Fork (router.fork("name"), or router.install("name") to also write it to disk, or the Fork button) creates an editable copy you own. The Skill Router offers both. If you use per-agent assignments, also assign it to the requesting agent. Until you Use or Fork it, the skill never appears in your agent’s menu, with no warning anywhere.
By default build_prompt_fragment injects one-line menu rows (name + description). The skill’s actual instructions reach the model only if you pass inject_body=True to the SkillRouter (smart-routed queries), or enable the load_skill tool so the model can pull bodies on demand. Menu rows count as offered — usage panels show rung-labeled counts for them, and activation isn’t measurable for bare prompt-injection usage. If a skill “isn’t working,” check whether its body ever actually reached the model.
The on-demand body loader is opt-in: pass enable_skill_loader=True to install() on the openai_agents or pydantic_ai adapters. On the anthropic adapter there is no tool loop — enable_skill_loader=True there injects the skill menu into system (the offered rung only); add init(inject_skill_body=True) if you want full bodies delivered, and note enable_load_skill_tool is accepted but dormant. Kill-switch: init(load_skill_tool=False) or DECIMALAI_LOAD_SKILL_TOOL=0.
decimalai.init(langchain=True) (and every other framework flag) logs a warning and continues untraced when the framework package isn’t importable — your agent runs, nothing is recorded. The same applies to DECIMAL_AUTO_TRACE (auto-init warns and skips) and to the raw-provider flags (openai=True etc.), which soft-skip when the matching OpenInference instrumentor is absent. Fix: for a framework flag, install the matching extra, e.g. pip install "decimalai[langchain]"; for a raw-provider flag, install the instrumentor package the startup warning names, e.g. pip install openinference-instrumentation-openai (the [openai] extra covers only the provider SDK, not the instrumentor). Then re-check startup logs.
Adapters only inject skills into prompt shapes they can safely rewrite. On openai_agents, an agent whose instructions is a user-supplied callable is left untouched; on langchain, a prebuilt PromptValue (or any unrecognized prompt shape) passes through unchanged. The agent runs normally — with zero skills injected and no error raised.
The regression check needs two things before it can say anything real: a baseline manifest (recorded automatically on the Action’s first run, or by decimalai.init() running in production) and ingested traces to measure blast radius against. A fresh workspace legitimately reports “first run — no baseline” and then near-zero affected traces. That’s honesty, not breakage — reports gain weight over days as production trace volume accumulates.

You’ve done it

Instrumented an agent and collected production traces
Scored traces with evaluators and a manifest compatibility check
Built a versioned SFT dataset filtered to keep + pass traces
Exported to HuggingFace and fine-tuned a model
Closed the loop — deployed the fine-tuned model, which produces traces for the next iteration

What Makes This Unique

Most platforms stop at evaluation. DecimalAI connects:
  • Manifest compatibility ensures training data matches your current agent config
  • Eval scoring ensures only high-quality outputs enter training data
  • Automatic format conversion handles the complex multi-turn, tool-using conversation structure
  • HuggingFace Hub integration means one-click compatibility with every open-source trainer
  • The loop repeats — each fine-tuned model feeds the next iteration

Next Steps

Datasets Guide

Filter strategies, version pinning, and export formats in depth.

Replay Guide

Regenerate training data by replaying historical inputs against the new model.

Evaluations

Configure quality gates so only high-signal traces enter datasets.

Manifests

How compatibility is computed when you change the agent.