Joerg Hiller
Jan 20, 2026 16:43
International HR platform Distant constructed a Code Execution Agent utilizing LangChain and LangGraph to remodel guide information migrations into automated workflows.
Distant, the worldwide employment platform, has deployed an AI-powered Code Execution Agent constructed on LangChain and LangGraph to automate buyer information migrations that beforehand required guide scripting for every new shopper.
The system addresses a elementary constraint in enterprise AI: context home windows. Even GPT-5’s 400,000-token restrict falls far in need of what’s wanted to course of giant payroll spreadsheets, which might exceed 50MB. Feeding that information immediately into an LLM produces hallucinations—a non-starter for a platform dealing with delicate employment and compliance information throughout a number of jurisdictions.
Separating Reasoning From Execution
Distant’s resolution splits the workload. The LLM handles reasoning and process planning via LangChain’s tool-calling interface. Precise information manipulation occurs in a sandboxed Python surroundings working WebAssembly, the place Pandas handles the heavy lifting.
“Massive intermediate outcomes by no means go again to the mannequin, maintaining the context small,” wrote José Mussa, Employees Software program Engineer at Distant, in a technical breakdown of the system.
The workflow runs like this: clients add uncooked information exports, the agent maps out transformation steps, sandboxed code executes these transformations, and the agent iterates till output matches Distant’s worker schema. The proof of idea processed a 5,000-row Excel file, mapping entries to schema and answering queries by working code quite than producing textual content.
Why Graph-Based mostly Orchestration
LangGraph’s node-and-edge structure proved crucial for managing multi-step migrations. Every workflow stage—ingestion, mapping, execution, validation—turns into a discrete node with specific transitions for fulfillment, failure, or retry. This makes agent state clear and recoverable, borrowing patterns from distributed methods engineering.
The framework selection aligns with broader trade adoption. In line with LangChain’s 2024 state of AI report, 43% of LangSmith organizations now run LangGraph traces. The Python and JavaScript variations have crossed 130 million mixed downloads.
Manufacturing Outcomes
Distant’s onboarding groups now not write customized scripts per buyer. The agent transforms various codecs into constant JSON schemas in hours as an alternative of days. As a result of transformation logic executes as auditable code quite than LLM-generated textual content, the output is repeatable—important for regulatory compliance throughout employment jurisdictions.
The workforce extracted a number of operational ideas from the construct. LLMs operate finest as planners, not information processors. Graph-based workflow construction simplifies debugging. Context tokens must be handled as scarce sources, with giant intermediate outcomes staying within the execution surroundings.
Increasing the Sample
Distant is now abstracting related patterns into reusable brokers throughout the corporate. A current prototype combines doc parsing with agentic workflows for OCR-to-JSON conversion, reportedly outperforming primary OCR by a big margin.
The corporate plans to contribute generic enhancements again to LangChain’s open-source ecosystem. For enterprise AI groups wrestling with related information transformation challenges, Distant’s structure affords a template: let fashions suppose, let code execute, and hold the 2 cleanly separated.
Picture supply: Shutterstock
