Topic

LangGraph

All digests tagged LangGraph

Middleware for Managed Deep Agents thumbnail

· 4:42

Middleware for Managed Deep Agents

Middleware is a mechanism for extending the lifecycle of Managed Deep Agents, allowing developers to implement custom behaviors such as policy enforcement, fault tolerance, and rate limiting. The demonstration covers two primary use cases: using prebuilt middleware (like `PIIMiddleware`) to redact sensitive data before it reaches the LLM, and building custom middleware from scratch using decorators like `wrap_tool_call` for logging and auditing tool usage.

Key takeaways

  1. Middleware Functionality

    Middleware extends the agent's lifecycle to manage behaviors like policy enforcement, fault tolerance, and rate limits when interacting with tools or the LLM.

  2. PII Redaction Demo 0:01

    Using prebuilt `PIIMiddleware` automatically detects and redacts sensitive information (e.g., customer emails) from the input, preventing the data from reaching the LLM or being stored in LangSmith.

  3. Custom Middleware Development 0:03

    Custom middleware can be built using decorators (e.g., `wrap_tool_call`) and hooks to intercept and log events, such as every tool call, at specific points in the agent's process.

Watch on YouTube Full article

How Lyft Increased Its Agent Resolution Rate by 16% with LangSmith and LangGraph thumbnail

· 3:41

How Lyft Increased Its Agent Resolution Rate by 16% with LangSmith and LangGraph

Lyft addressed the challenge of scaling its customer support agent stack by replacing brittle, deterministic agents with a meta-agent architecture built on LangGraph and LangSmith. This new self-serve platform allows non-engineering personnel (PMs and ops) to deploy new agents via simple configuration and prompting, drastically reducing agent build time from six months to one to two weeks. This accelerated iteration cycle resulted in a 16% increase in the customer resolution rate.

Key takeaways

  1. Shift to Self-Service Agent Platform 2:25

    The team created a platform enabling PMs and ops to build and ship agents using domain knowledge and natural language prompting, minimizing the need for code changes (merely a config change).

  2. Architectural Improvement via Meta-Agent 3:35

    The system utilizes a meta-agent where all sub-agents are registered dynamically as nodes in the meta-agent, simplifying the composition and deployment of new agents.

  3. Significant Operational Gains

    The agent build time was reduced from six months to one to two weeks, allowing engineers to focus on complex, foundational improvements while increasing the overall resolution rate by 16%.

Watch on YouTube Full article

Share your Managed Deep Agent with your team using Slack thumbnail

· 5:04

Share your Managed Deep Agent with your team using Slack

This guide details the process of deploying a Managed Deep Agent, initially developed in LangSmith Studio, to a production environment using Slack as the primary interaction layer. The process involves running `slack init` to configure the connection, executing a deployment, completing the Slack authorization step, and finally customizing the agent's appearance and message trigger logic for optimal team integration.

Key takeaways

  1. Agent Deployment Workflow

    To connect an existing agent to Slack, run the `slack init` command, followed by a redeployment. The first deployment requires completing a Slack authorization step to link the agent to the internal workspace.

  2. Monitoring and Tracing 0:01

    When the agent is live, all user interactions (requests) are logged and traceable within the LangSmith dashboard, allowing engineers to monitor complete request traces even though the user only sees the final answer in Slack.

  3. Agent Customization 0:02

    The agent's name, description, icon, and background color can be customized by modifying the setup code in the channels directory and redeploying the agent.

  4. Message Trigger Configuration 0:03

    Two key trigger options exist: manual tagging (default) or 'trigger on all messages' (setting `trigger_on_all_messages` to true). Enabling the latter allows the agent to respond to any message in a dedicated channel, not just those directly addressed to it.

Watch on YouTube Full article

I don't prompt agents anymore... thumbnail

· 22:22

I don't prompt agents anymore...

The video clarifies that 'graph engineering' primarily refers to building **Control Graphs**, which are structured workflows or SOPs designed to make AI agents reliable and predictable. The speaker details three primary methods for implementing these graphs: using dedicated code frameworks (like `LangGraph` or Dynamic Workflow), leveraging the LLM itself as the orchestrator, or employing agent-to-agent communication patterns. Implementing robust graphs requires defining clear nodes/edges, managing state artifacts, and crucially, integrating deterministic tools like verifiers and scripts to ensure reliability.

Key takeaways

  1. Focus on Control Graphs

    The term 'graph' is often misused; the practical focus should be on **Control Graphs**—workflows that enforce SOPs for reliable agent execution. This is distinct from Knowledge Graphs or Graph of Loops (though the latter is a new, complex area).

  2. Implement Reliability Layers 20:57

    For any automated process, setting up a dedicated 'verifier' skill/agent node is critical to building confidence and ensuring the agent's output meets expected standards.

  3. Choose Your Graph Implementation Method

    Graphs can be enforced via: 1) **Code-as-Graph** (using tools like Dynamic Workflow or `LangGraph`), 2) **Large Model as Graph** (defining SOPs in text/JSON for the LLM to follow), or 3) **Agent Teams** (an orchestrator agent managing a team of specialized agents).

  4. Best Practices for Workflow Design

    To maximize reliability, always define clear inputs and outputs for each node. Use dedicated scripts/code for complex data fetching or deterministic steps rather than relying solely on the LLM.

Watch on YouTube Full article

Inside DeepWiki: How Cognition Builds Wikis for Devin at Scale thumbnail

· 17:12

Inside DeepWiki: How Cognition Builds Wikis for Devin at Scale

Jacob Teo details DeepWiki, an auto-generated codebase documentation product used as a context layer for agents like Devin. The presentation covers how DeepWiki scaled from internal tools to indexing 1.4 million repositories. Key technical advancements include evolving the wiki algorithm from a heavily orchestrated v1 to a more agentic v2, which improves robustness at massive scale. Furthermore, he outlines four principles of context engineering—Primary Sources, Context-Poisoning avoidance, Path Compression, and Unknown Unknowns—to guide future codebase intelligence systems.

Key takeaways

  1. DeepWiki's Evolution (v1 to v2) 12:28

    The wiki algorithm shifted from being highly orchestration-led (relying on tight control over model calls) to an agentic core (V2). This shift allows the system to adapt to code base abnormalities by enabling the agent to call tools for extra scaffolding, making it more robust as models improve. (7:48)

  2. Context Engineering Principles

    When building context for agents, Cognition emphasizes four principles: ensuring primary sources are trusted ground truth; avoiding context-poisoning by only providing correct information; using Path Compression to skip obvious steps and save tokens/cost; and leveraging Unknown Unknowns—providing hints the agent wouldn't find on its own. (12:40)

  3. Codebase Graphing for Scale 10:07

    To handle large enterprises with massive codebases, DeepWiki uses heuristics incorporating directory structure, symbol graphs, Git history, and runtime data to quantify file connections. This process creates a codebase graph that informs the Table of Contents (TOC), which is critical because poor TOC generation leads to a bad wiki regardless of individual page quality. (6:07)

Watch on YouTube Full article

Building Docs for Agents, Not Humans: Inside OpenWiki thumbnail

· 16:52

Building Docs for Agents, Not Humans: Inside OpenWiki

OpenWiki is an open-source Command Line Interface (CLI) designed to automatically generate and maintain repository documentation specifically optimized for consumption by coding agents. Unlike human-centric wikis, OpenWiki structures content into self-contained, highly searchable snippets using the Open Knowledge Format (OKF). It integrates deeply into a codebase via GitHub Actions, ensuring that documentation remains current with every code change while minimizing manual effort.

Key takeaways

  1. Built for Agents, Not Humans 5:04

    OpenWiki's core thesis is that since agents are increasingly writing code, the documentation must be structured for agent retrieval. This means content must consist of self-contained snippets with predictable headings and optimized context window usage, rather than long narrative pages.

  2. Automatic Maintenance via CI/CD

    The CLI facilitates automatic documentation updates by writing a GitHub Actions workflow. This action runs periodically (e.g., daily), checks the Git history, and uses an agent to generate or update the wiki based on code changes, minimizing manual intervention.

  3. Adoption of Open Knowledge Format (OKF) 11:48

    The system adopts OKF (Google's Open Knowledge Format) by adding a deterministic YAML front matter to every markdown file. This includes fields like `type`, `title`, and `description`, which significantly improves retrieval, filtering, and searching capabilities for agents.

  4. Performance Gains in Benchmarks 15:00

    Early evaluations using the DeepSWE benchmark show that OpenWiki usage leads to fewer tool calls, fewer searches, and a significant drop in token consumption for coding agents while maintaining or improving results.

Watch on YouTube Full article

How Harmonic 4x'd User Retention by Building on Deep Agents thumbnail

· 16:25

How Harmonic 4x'd User Retention by Building on Deep Agents

Harmonic transitioned its natural language interface, Scout, from a brittle query parsing graph to an architecture built on Deep Agents and a simple model-plus-tools loop. This shift quadrupled week one to week four user retention. The core technical lesson is that robust agent design requires managing context via a 'harness contract,' ensuring that all artifacts (like visualizations or large search result sets) are visible to the model—either in the message list or offloaded through file system tools—to prevent the UX from becoming an invisible black box.

Key takeaways

  1. Deep Agents significantly boost retention 2:04

    Switching to Deep Agents resulted in a fourfold increase in week one to week four user retention for Scout. (1:24)

  2. The agent architecture simplified from graphs to loops 4:01

    Scout evolved from complex, multi-node query parsing graphs (LangGraph) into a simpler model and tools loop, mediated by middleware. (2:41)

  3. Context management is handled by the harness 8:16

    Deep Agents manage context overload using mechanisms like compaction for long message lists and file system abstraction to store large results, returning only pointers to the model. (4:56)

  4. UX must respect the agent's context contract 11:44

    For a product UX to be useful, any rendered element (e.g., charts) must either reside in the message list or be discoverable by the model via tools/file system pointers; otherwise, it is invisible to the agent. (7:04)

Watch on YouTube Full article

Building Deep Agents and Deploying in Production thumbnail

· 15:40

Building Deep Agents and Deploying in Production

Deep Agents are defined as a sophisticated 'harness' built around foundational LLMs, providing the necessary infrastructure—beyond just the model itself—to make agents reliable and useful in production. The system integrates core primitives like memory, tools, file systems (acting as scratchpads), and middleware hooks. For deployment, critical considerations include implementing durable execution via checkpointing, managing short and long-term memory stores, establishing robust Role-Based Access Control (RBAC) for tool access, and designing for human oversight (human in the loop).

Key takeaways

  1. Deep Agents are a 'Harness' 0:27

    An agent is conceptualized as an LLM plus a harness. The harness encompasses all infrastructure—including system prompts, memory management, tools, file systems, and middleware—that makes the model reliable for a given task. (0:27)

  2. Deep Agents Architecture 6:58

    Deep Agents represent the highest level of abstraction in the LangChain stack, built on top of LangGraph, which provides the core composable nodes and edges necessary for complex agent workflows. (4:18)

  3. Production Reliability Requirements

    For production deployment, agents must handle long-running tasks using durable execution (checkpointing) to recover from failures at any step, manage short/long-term memory across sessions, and incorporate human approval loops. (9:48)

Watch on YouTube Full article

How Bridgewater Built Pat, The AI Pocket Analyst Tool | Interrupt 26 thumbnail

· 25:45

How Bridgewater Built Pat, The AI Pocket Analyst Tool | Interrupt 26

Bridgewater Associates introduced PAT (Pocket Analyst Tool), an internal AI analyst capable of performing deep exploratory research in minutes—a task that would take human analysts days or weeks. The tool leverages five decades of codified investment logic and proprietary data to build an 'artificial investor.' Architecturally, PAT is designed not as a generic agent but as a specialized system using LangGraph for state management. Key technical differentiators include integrating human-like inspection into time series search (boosting accuracy from 50% to 90%), enabling parallel code generation across multiple sub-agents, and enforcing correctness by treating agentic coding as a deterministic compiler problem rather than an unpredictable LLM task.

Key takeaways

  1. AI Advantage through Institutional Knowledge

    Bridgewater's 50 years of written-down investment logic provides a unique, structured data trove that allows them to build specialized AI agents, rather than starting from scratch. This deep context is critical for the tool's success.

  2. Human-Like Data Inspection 17:04

    The search agent incorporates human reasoning by checking not just the name of a time series, but also its frequency, currency, and whether values align with prior expectations. This elevated accuracy from approximately 50% to 90%.

  3. Deterministic Code Generation

    The architecture treats coding agents as a compiler problem, ensuring that the process is fully deterministic and reliable. This involves running code through static analysis and validation agents to enforce correctness.

  4. Autonomous Learning via 'Teach' Button 25:24

    PAT improves continuously by allowing users to click the 'Teach button.' This process generates a benchmark that is expected to fail, which then triggers an agent to iterate on context or harnesses until the benchmark passes, resulting in a pull request (PR) for system improvement.

Watch on YouTube Full article

The Agent Development Lifecycle 101 by Harrison Chase thumbnail

· 45:17

The Agent Development Lifecycle 101 by Harrison Chase

The Agent Development Lifecycle outlines a systematic approach for moving AI agents from isolated demos to reliable production systems. The process is broken down into five stages: Build, Test, Deploy, Monitor, and Govern. Key focus areas include ensuring agent reliability at scale by implementing durable execution, managing complex state via virtual file systems, and using advanced observability tools like tracing and online evaluation (evals) to detect failures and drive continuous improvement.

Key takeaways

  1. Systematic Iteration is Key 3:50

    Successful teams treat agents not as one-off projects but as systems requiring systematic iteration across the entire lifecycle: build, test, deploy, monitor, and improve. The primary challenge in shipping agents reliably at scale is ensuring consistent behavior.

  2. Agent Development Components 5:50

    The core components are Build (frameworks/harnesses), Test (data sets, metrics, benchmarks like Terminal Bench 2), Deploy (durable execution, sandboxes), Monitor (tracing, online evals), and Govern (cost control, tool access management).

  3. The Role of Tracing and Observability 17:06

    Tracing is fundamental for debugging agents, allowing developers to see the inputs and outputs at every step (including tool calls) to understand why an LLM or agent failed. Online evals extend this by scoring production traces without needing ground truth.

  4. Self-Improving Agents 31:30

    Advanced platforms, like LangSmith Engine, are beginning to automate the improvement loop. They run in the background over existing traces, clustering issues and suggesting fixes (code or prompt changes), thereby drastically lowering the burden of operating agents at scale.

Watch on YouTube Full article

60% Faster Time-to-Interview: Transforming Hiring with AI Agents with LangChain thumbnail

· 18:05

60% Faster Time-to-Interview: Transforming Hiring with AI Agents with LangChain

LinkedIn details the architecture of a hiring agent built with LangChain and LangGraph that successfully cut time-to-interview by 60% for small businesses. The system evolved from static workflows to an advanced agentic control model utilizing a central planner within a plan-execute-replan loop. Key architectural components include specialized memory types (conversational and experiential), middleware hooks for PII detection, and rigorous 'harness engineering' techniques—such as state flag chaining and one-shot tool guards—to ensure the probabilistic nature of LLMs results in a dependable product.

Key takeaways

  1. Hiring is an Agent Problem

    The hiring process is inherently iterative (plan, act, observe, adapt), requiring continuous adaptation rather than being a one-shot task. This necessitates an agentic approach.

  2. Architectural Evolution to LangGraph 0:03

    The system progressed from hard-coded static workflows (if/then) to sequential LangChain chains, culminating in LangGraph for its true agentic control model featuring a central planner and plan-execute-replan loop.

  3. Choosing LangGraph 0:05

    LinkedIn selected LangGraph over 89 evaluated frameworks because it complements existing infrastructure, builds upon core LangChain primitives (runnables, tools), and allowed for zero rewrite adoption.

  4. Achieving Determinism via Harness Engineering 0:10

    To make the agent dependable, LinkedIn implemented advanced 'harness engineering' techniques, including context management (checkpoint trimming), output format determinism (template confirmation/fallbacks), and node-change determinism (state flag chaining and one-shot tool guards).

Watch on YouTube Full article