LangChain has launched LangSmith Fine-Tuning, a system that converts saved agent activity logs into custom-trained models without manual setup. The company introduced a companion command-line tool called smithtune to run the whole process, from data preparation to training to evaluation, in a single workflow.
smithtune works with what LangChain calls trajectories: recorded sequences of an AI agent's messages, tool calls, and results from a completed task. LangChain says its trajectory format captures exactly what a model saw at each step, including tools that became available partway through a task, which a simple export of final chat logs would miss. Users select successful trajectories, and smithtune turns them into training examples for supervised fine-tuning, a method where a model adjusts its internal settings to copy examples of correct behavior.
Training itself runs through partnerships with Fireworks and Baseten, two companies that host and manage machine learning infrastructure. Once training finishes, smithtune evaluates the resulting model and sends the results back into LangSmith for review. LangChain says models trained this way can match or exceed general-purpose AI models on specific tasks, often at lower cost and speed, and that teams can use a coding agent to run the smithtune commands directly rather than building the pipeline themselves.
Source: Introducing LangSmith Fine-Tuning.