Joerg Hiller
Jan 20, 2026 16:43
International HR platform Distant constructed a Code Execution Agent utilizing LangChain and LangGraph to rework guide knowledge 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 knowledge migrations that beforehand required guide scripting for every new consumer.
The system addresses a elementary constraint in enterprise AI: context home windows. Even GPT-5’s 400,000-token restrict falls far wanting what’s wanted to course of massive payroll spreadsheets, which might exceed 50MB. Feeding that knowledge immediately into an LLM produces hallucinations—a non-starter for a platform dealing with delicate employment and compliance knowledge throughout a number of jurisdictions.
Separating Reasoning From Execution
Distant’s resolution splits the workload. The LLM handles reasoning and activity planning via LangChain’s tool-calling interface. Precise knowledge manipulation occurs in a sandboxed Python surroundings working WebAssembly, the place Pandas handles the heavy lifting.
“Massive intermediate outcomes by no means cross again to the mannequin, preserving the context small,” wrote José Mussa, Employees Software program Engineer at Distant, in a technical breakdown of the system.
The workflow runs like this: prospects add uncooked knowledge 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 fairly than producing textual content.
Why Graph-Based mostly Orchestration
LangGraph’s node-and-edge structure proved essential for managing multi-step migrations. Every workflow stage—ingestion, mapping, execution, validation—turns into a discrete node with specific transitions for achievement, 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 not write customized scripts per buyer. The agent transforms numerous codecs into constant JSON schemas in hours as an alternative of days. As a result of transformation logic executes as auditable code fairly than LLM-generated textual content, the output is repeatable—important for regulatory compliance throughout employment jurisdictions.
The group extracted a number of operational rules from the construct. LLMs operate greatest as planners, not knowledge processors. Graph-based workflow construction simplifies debugging. Context tokens ought to be handled as scarce assets, with massive intermediate outcomes staying within the execution surroundings.
Increasing the Sample
Distant is now abstracting comparable patterns into reusable brokers throughout the corporate. A current prototype combines doc parsing with agentic workflows for OCR-to-JSON conversion, reportedly outperforming fundamental 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 comparable knowledge transformation challenges, Distant’s structure affords a template: let fashions suppose, let code execute, and maintain the 2 cleanly separated.
Picture supply: Shutterstock

