Hugging Face and Factory Turn AI Coding Agent Logs Into Open Training Data

Factory and Hugging Face team up to let developers upload Droid agent traces directly to the Hub, fueling an open dataset push for next-gen coding models.

·
·
Hugging Face and Factory Turn AI Coding Agent Logs Into Open Training Data
Read5 min
TypeNews
SubtopicCode Agents
  • Factory Droid + HF integration: Droid session files from ~/.factory/sessions can now be uploaded directly to Hugging Face Datasets with no preprocessing.
  • New Traces viewer: The Hub auto-detects JSONL trace formats and renders sessions, tool calls, and model responses in a dedicated UI via Data Studio.
  • Five agents supported: Claude Code, Codex, Factory Droid, Pi, and Hermes Agent all have native trace format support on the Hub.
  • Training data play: The real goal is building an open corpus of real agent sessions to train next-generation open coding models — a resource currently locked inside closed companies.
  • Privacy risk: Trace files can contain secrets, private code, and personal data — review and redact before any public upload.
  • Growing ecosystem: Projects like Trace Commons and NVIDIA's Open-SWE-Traces (207K+ trajectories) show momentum toward open agent trace datasets on the Hub.

Every time a coding agent works through a task , reading files, running bash commands, calling tools, backtracking on a bad plan , it leaves behind a detailed log of that reasoning. Until now, those logs sat in a hidden folder on your machine and went nowhere. Factory and Hugging Face are changing that with a new integration that turns your Factory Droid session files into shareable, browsable datasets on the Hub.

What just shipped

You can now upload traces from agents like Claude Code, Codex, Pi, and Factory Droid directly to Hugging Face Datasets. The Hub auto-detects trace formats and tags your dataset as "Traces", with a dedicated viewer for browsing sessions, turns, tool calls, and model responses. The whole thing is zero-friction: these trace files are supported out of the box, so you can upload them without modifying or converting them first.

Here is where each agent stores its sessions locally:

AgentLocal session directory
Claude Code~/.claude/projects
Codex~/.codex/sessions
Factory / Droid~/.factory/sessions
Pi~/.pi/agent/sessions

Uploading is a two-command process using the Hugging Face CLI:

hf upload <username>/<dataset-name> ~/.factory/sessions . --repo-type dataset
# or keep it in sync as new sessions land:
hf buckets sync ~/.factory/sessions hf://buckets/<username>/<bucket-name>/factory

Datasets show traces in Data Studio; buckets let you open individual .jsonl files directly. Once a trace is in a dataset, the trace viewer shows the session timeline, prompts, assistant messages, tool calls, and results.

Screenshot of the Hugging Face agent trace viewer showing a Claude session with bash tool calls and results

What Factory Droid actually is

Factory Droid is an enterprise-grade AI coding agent that lives in your terminal and handles end-to-end development workflows. Like Claude Code and Codex, it is a terminal-based agent with MCP support for connecting to external tools, subagents for specialized tasks, and slash commands. But unlike those tools, one Factory subscription gives you access to both Anthropic and OpenAI models, so you do not have to switch platforms when you need a different model's strengths. Droid achieves 58.8% on Terminal-Bench, a benchmark of 80 real-world software tasks spanning coding, build systems, data workflows, and security.

The real bet: open traces as training data

The headline is a viewer. The actual story is data. The data behind how coding agents work should be a commons, not a moat. Every coding-agent session is a record of how these tools really work , and today that data goes to a few companies. This integration is a direct push against that dynamic.

Agent traces are not just logs. They are step-by-step records of how a model reasons through a real task: what it tried, what failed, what it corrected, and what finally shipped. That kind of data is extremely hard to synthesize and extremely valuable for training the next generation of coding models. Multi-turn tool-calling trajectories are used for training AI agents. Each sample is a real agent conversation with step-by-step reasoning and actual tool execution results.

The ecosystem around this is already taking shape:

  • Trace Commons is one open, public dataset of coding-agent sessions , the back-and-forth between a developer and an AI coding agent, including prompts, model responses, tool calls, and command output , contributed voluntarily as an open resource for studying, evaluating, and building on how these agents actually work.
  • NVIDIA's Open-SWE-Traces dataset consists of 207,489 total trajectories across two LLMs and agent scaffolds, intended for fine-tuning and distillation of coding agents.
  • Your agent traces are training data. There is now an open protocol for crowdsourcing AI agent session traces.

One important caveat before you upload

Trace files can include prompts, tool inputs, command output, local paths, screenshots, secrets, private code, and personal data. Review and redact traces before publishing them publicly, or keep the dataset or bucket private if you are not sure what is inside. For Pi Agent sessions, a dedicated tool called pi-share-hf can help automate that scrubbing. Every trace in Trace Commons was donated only from a public, open-source repository, was anonymized on the contributor's own machine before upload, and was reviewed by the contributor before it was submitted.

Why this matters for open models

The gap between open and closed coding models has been closing fast. A year ago, the conventional wisdom was simple: if you wanted a model capable of serious agentic coding work, you used Claude or GPT and accepted the API bill. Open-source options were interesting experiments, not production choices. That calculus has shifted. In 2026, open-weight LLMs for agentic coding are being deployed inside real engineering pipelines at real companies.

But training those models requires the right kind of data. Synthetic traces can only go so far , they do not capture the messy, iterative reality of real development sessions. The Factory + Hugging Face integration is a bet that crowdsourced, real-world agent traces from actual developers working on actual codebases will be the fuel that pushes open coding models to the next level. The infrastructure is now in place. Whether the community shows up to fill it is the open question.

Comments

avatar