Topic

LangChain Academy

All digests tagged LangChain Academy

Building a Harness with Jev thumbnail

· 9:15

Building a Harness with Jev

This talk introduces Jev, a new System 1 model from TypeSafe AI, designed for fast, structured decision-making. Unlike traditional LLMs (System 2), Jev does not generate text but instead evaluates a state and questions to return typed answers and probabilities, making it significantly faster (up to 200x) and cheaper (up to 400x) for classification-style tasks. Jev can be integrated into agent harnesses via LangChain's TypeSafe integration to enhance model routing, implement auto-mode for risk assessment, and function as a highly efficient judge for online evaluations.

Key takeaways

  1. Jev as a System 1 Model 2:18

    Jev is a System 1 model that evaluates a state and questions to return typed answers and probabilities, rather than generating text. This makes it ideal for specialized, structured decision tasks.

  2. Performance Advantage 2:45

    Jev is claimed to be 20 to 200 times faster and 40 to 400 times cheaper than LLMs for classification-style tasks.

  3. Three Question Types 6:30

    Jev can answer three types of questions: Choice (multiple choice), Score (on a scale), and Boolean (yes/no). It can process multiple questions from a single state in parallel.

  4. Use Case: Model Routing 8:00

    Jev can assess a given prompt against criteria to help decide whether a fast/cheap model or a more powerful/expensive model should be used, optimizing agent performance.

  5. Use Case: Jev as a Judge

    Jev can score an agent's answer against a provided rubric (e.g., correctness, grounding) for online evaluations, offering a cheaper, faster, and more consistent alternative to LLM-as-a-judge methods.

Watch on YouTube Full article

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

LangChain Academy Tutors: Learn LangChain with Your Coding Agent thumbnail

· 6:00

LangChain Academy Tutors: Learn LangChain with Your Coding Agent

This video introduces LangChain Academy Tutors, a novel method for structured learning of LangChain concepts using custom skills integrated into coding agents. The tutor skill guides users through course materials, quizzes, and labs, providing immediate feedback and allowing customization of the teaching style. Setup requires Node.js installation and utilizing the LCA tutors repository to configure the agent with the specific tutor skill.

Key takeaways

  1. Tutor Functionality 3:30

    The LangChain Academy Tutor can teach course material, walk through labs/quizzes, answer questions, and set up environments. Users can adjust the teaching style (e.g., 'fairly often' check-ins vs. a 'lecturer' style) to match their learning preference.

  2. Setup Requirements 2:30

    To use the tutor, users must have Node installed (from node.js.org). The skill is housed in the LCA tutors repository and needs to be configured for access by chosen coding agents.

  3. Agent Invocation 4:10

    The tutor can be invoked using a command structure, such as `/LCA deep agents`, where the naming convention follows the course name (e.g., `deep agents`).

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

/goal: Building big features with dcode thumbnail

· 8:02

/goal: Building big features with dcode

The video introduces `dcode`, an open-source, model-agnostic coding agent, and its new `/goal` command. This feature enables long-running, persistent tasks by wrapping the standard agent loop in a 'goal loop.' Instead of relying on single-shot requests for large features (like meaty PRs), `/goal` establishes visible acceptance criteria that guide the agent's work over hours. The demonstration shows how to use this mechanism to add native browser control to `dcode`, allowing the user to steer, amend requirements, and inspect progress using tools like LangSmith tracing.

Key takeaways

  1. The /goal Command 2:50

    The `/goal` command provides a long-running, persistent objective for agents tackling large tasks. It shifts alignment work upfront, making it visible and allowing mid-run tailoring of requirements (3:46).

  2. Goal Loop Mechanism 0:35

    The goal loop wraps the agent's inner action loop. The outer loop continuously checks if actions satisfy the durable acceptance criteria; if not, the goal remains active until evidence satisfies all requirements (0:17).

  3. Steering and Amending Goals 4:40

    Users can inspect the current state with `/goal show` or update/correct requirements mid-run using `/goal amend`, which interprets the message within the context of the active goal (3:46).

Watch on YouTube Full article