The Transition of Agentic Harnesses: From Linear Chains to Code Execution

Key Takeaways
The evolution of agentic harnesses has progressed through three paradigms: Chains, Graphs, and Code. This shift marks a transition from basic experiments to robust, production-ready software architectures.
Chains represent the initial phase of linear workflows, providing low latency and compute costs for specific tasks like summarization. However, they are fragile; a single failure upstream can disrupt the entire execution flow.
Graphs introduce a structured approach with nodes and edges, allowing for conditional branching, parallelism, and state management. This enhances resilience in complex, multi-step environments.
Code harnesses treat execution as a primary function, using sandboxed environments for deterministic outputs. This method provides strong guarantees of system reliability through execution verification.
To ensure reliability, developers should consider LLM outputs as untrusted inputs, separate planning from execution, invest in observability, and choose the least complex design that meets reliability, speed, and cost requirements.
The Evolution of Agentic Systems
In recent years, the development of agents using large language models (LLMs) has significantly advanced. Initially, these systems relied on ad-hoc prompts combined with glue code. They have now matured into agentic harnesses, or structured execution frameworks, designed to enhance reliability and observability.
This evolution has been gradual, driven by the increasing demands of real-world applications. Three distinct paradigms have emerged, each reflecting a deeper understanding of how to operationalize non-deterministic intelligence into reliable software systems.
Chains: The Initial Approach
Early agentic systems were built around simple linear workflows, referred to as chains. This method was intuitive and quick to implement, allowing for rapid deployment. The workflow consisted of a sequence of prompts where the output of one step served as the input for the next.
For instance, LinkedIn’s early Generative AI agents utilized a fixed three-step chain using the LangChain framework. The steps included routing to determine the appropriate AI expert, retrieving relevant information, and generating a coherent final answer.
While this approach was fast to build, it was inherently fragile. A single mistake in the initial steps could derail the entire process due to the lack of mechanisms for error detection or recovery.
Graphs: Adding Structure
As the complexity of use cases increased, the limitations of linear chains became apparent. Developers began adopting graph-based systems, which allowed for branching, conditional logic, and retries within workflows.
Graph-based harnesses utilize nodes to represent tasks and edges to govern control flow. This shift enabled more explicit and declarative execution plans, allowing for better inspection and modification.
Graph systems led to the development of multi-agent architectures, requiring protocols for asynchronous communication between agents. Human involvement remained essential, as agents often sought clarification or feedback from operators during decision-making processes.
Code: A New Paradigm
The latest advancement in agentic systems involves treating code as the primary medium for reasoning. Instead of relying solely on natural language prompts, coding harnesses generate and execute code within a controlled environment.
This approach allows agents to produce verifiable outputs, enhancing reliability. The architecture includes components such as execution sandboxes, logging mechanisms, validation harnesses, and iterative refinement loops to ensure correctness.
LinkedIn has implemented this method to create an internal tool that enables various personnel to pose analytical questions in natural language. The agent translates these queries into SQL and Python code, executing and validating the outputs against strict criteria.
Best Practices for Robust Architectures
Regardless of the stage of development, certain principles distinguish robust agentic systems from fragile ones. These include treating LLM outputs as untrusted inputs, decoupling planning from execution, investing in observability, and fostering continuous improvement.
Choosing the Right Abstraction
Not every problem necessitates the complexity of graphs or coding harnesses. The key is to select the simplest system that reliably addresses the task at hand. Chains may suffice for straightforward tasks, while more complex workflows may require graphs or code-based solutions.
Source: InfoQ