LangChain
Search documents
Anthropic-Style Context Editing… Now for Every LLM in LangChainJS!
LangChain· 2025-12-02 14:00
Hi there, this is Christian from Lchain. In my last video, we looked at how summarization middleware keeps your agents memory compact by rewriting the entire conversation history. But what if the problem isn't the conversation, it's the tools.Because here's the truth. Modern agents don't just talk. They call tools over and over again.And those tool results can absolutely explode your conductor window. Unlike user messages, tool outputs can be huge. I mean, we're talking about 20 pages of search results, a m ...
Product Evals (for AI Applications) in Three Simple Steps
LangChain· 2025-12-01 15:45
Evals are an important step for having confidence in the LLM application or agent that you're putting out into the real world is performing as you would expect it to and they're hard to do right. Eugene Yan is one of the people in the business who I think is the sharpest around evals and I saw this tweet from him over the weekend. After repeating myself for the nth time on how to build product evals, I figured I should write it down.It's just three basic steps. One, labeling a small data set. two, aligning ...
AI Agents in Production: Lessons from Rippling and LangChain
LangChain· 2025-11-26 18:05
AI Strategy and Implementation at Rippling - Rippling utilizes AI across its suite, including HR, payroll, IT, and finance, focusing on content summarization, standalone AI products, and AI agents [3][8] - The company fosters AI innovation through hack weeks, providing access to tools like OpenAI, Anthropic, and Google, and partnering with Langchain [10][11][12] - Rippling emphasizes a balance between top-down product strategy and bottom-up innovation, encouraging employees to identify and automate workflows with AI [14] - Rippling's AI team focuses on creating basic primitives and a foundation for other teams to innovate, offering a "paved path" from prototype to production [18] - Rippling is expanding its product capabilities in IT, finance, and global markets, incentivizing the use of AI in these areas [13][14] AI Agent Development and Challenges - Rippling views AI agents as system analysts assisting admins with day-to-day tasks, exploring their potential within the company's vast product footprint [9] - The company emphasizes the importance of real-world production data for validating AI functionality and value, along with early feedback loops from actual users [20][22] - Rippling uses internal dogfooding to test AI features, gathering immediate feedback from employees, including executives like the CEO [21][24] - Rippling is shifting from deterministic, workflow-centric agents to leveraging the reasoning and judgment capabilities of LLMs, providing ample context and toolsets [31][33] - Rippling prioritizes AI inside the product, ensuring data security and compliance with regulations like GDPR and CCPA, with rigorous responsible AI practices [40][39][43] Productivity and Internal AI Adoption - Rippling views AI as a superpower to enhance productivity across all departments, encouraging employees to identify and automate tasks [51][53] - The company has created an AI stance, provided access to tools, and established an enablement ecosystem to promote internal AI adoption [51][52] - Rippling emphasizes accountability for code quality, even when generated by AI, using AI code review tools and promoting spec-driven AI development [57][58][59]
Using skills with Deep Agents CLI
LangChain· 2025-11-25 16:30
Hey, this is Lance from Mangane. I want to talk about skills, a new concept introduced by Anthropic recently. Show how I implemented them in our deep agent CLI and then talk about the philosophy behind skills and why they're interesting.Now, this is a deep agency. I've just spun this up in my terminal. I'm going to ask the deep agent CLI to perform web research on a topic.I'm interested context engineering. It kicks off. Now, you'll see something interesting here.Based on my request, it scanned its skills d ...
Managing Agent Context with LangChain: Summarization Middleware Explained
LangChain· 2025-11-25 14:00
Hi there, this is Christian from Lchain. If you build with coding agents like cursor, you probably recognize this. The first few turns with the agents are great.But then as you keep continuing talking to the agent in the same thread, the quality slides, the decision get more fuzzy and the overall code quality drops and then cursor drops this system line context summarized. That's the moment you know you've crossed the context boundary line. So why is summarization such a big deal for context engineering.Eve ...
What are Deep Agents?
LangChain· 2025-11-24 07:14
Hey, this is Lance. I want to talk a bit about the deep agents package that we recently released. Now, the length of tasks that an agent can take every seven months.And we see numerous examples of popular longrunning agents like Claude Code, Deep Research, Manis. The average Manis task, for example, can be up to 50 different tool calls. And so, it's increasingly clear that agents are needed to do what we might consider deeper work or more challenging tasks that take longer periods of time.Hence, this term d ...
Build a Research Agent with Deep Agents
LangChain· 2025-11-20 17:02
Deep Agents Overview - Deep Agents is an open-source agent harness incorporating planning, computer access, and sub-agent delegation tools, commonly found in agents like Manis and Cloud Code [1][46] - The harness is designed to be easily adaptable with custom prompts, tools, and sub-agents [2][47] Key Features and Tools - Deep Agents provides built-in tools such as planning, sub-agent delegation, and file system operations [6][7] - The built-in tools enable interaction with the file system, shell command execution, planning via to-dos, and task delegation [8] - Custom tools, instructions, and sub-agents can be added to Deep Agents to tailor it for specific use cases [6][47] Quick Start and Research Application - The Deep Agent quick start repo offers examples for different use cases, starting with research [2][5] - The research quick start includes tools like a search tool (using Tavi search API) and an optional "think" tool for auditing agent trajectory [12][13][14] - Task-specific instructions and sub-agents can be supplied to Deep Agents for any given use case [12] Agent Loop and Middleware - Deep Agents utilizes Langraph for orchestrating the agent loop, which involves the language model (LLM) calling tools in a loop [29] - Middleware serves as hooks within the agent loop, allowing for actions like summarization when context exceeds 170,000 tokens [30][32] - Middleware can provide tools to the agent, such as file system middleware, and perform actions like summarization and prompt caching [31][34] File System and State Management - By default, Deep Agents writes to an internal in-memory state object, but it supports different backends like a sandbox or local file system [37][38] - File reading and writing operations occur within the Langraph state object, enabling easy retrieval into the LLM's context window [40] Deployment and Visualization - Deep Agents can be run in a Jupyter notebook for interactive inspection or deployed as an application using Langraph [10][44] - A UI can be connected to the local Langraph server for visualizing generated files and agent interactions [3][45]
Agents Gone Wild? Use Tool Call Limits in LangChainJS to Keep Them in Check!
LangChain· 2025-11-20 16:30
Hi, this is Christian from LChain. Have you ever built an agent that just goes nuts with your API calls. Tools can give an agent incredible power, but can also cost you a lot of money to run.In this video, I will show you how you could keep your agent under control without any hard-coded guardrails within your system prompt. Today, we're taking a look at the tool called middleware within LChain. It's a clean declarative way to set credit limits, rate limits, or usage caps on any tools your agent uses.Think ...
Building a Research Agent with Gemini 3 + Deep Agents
LangChain· 2025-11-19 17:55
Model Performance - Gemini 3 demonstrates extremely strong performance across various benchmarks, achieving state-of-the-art results in multiple areas [1] - Gemini 3 excels in tasks relevant to building agents, particularly in long horizon planning (Vending bench 2), terminal-based coding (Terminal Bench 2), and real-world contextual tasks like customer support (Sierra Tow Squared Bench) [2][3] Deep Agent Harness & Tool Utilization - The Deep Agent harness, an open-source tool, is used to test Gemini 3's agent-building capabilities, featuring built-in tools for planning, sub-agent delegation, and file system manipulation [3][4] - Gemini 3 effectively utilizes native tools within the Deep Agent harness, including file manipulation, planning, and sub-agent delegation, for tasks like research [18] - The agent successfully plans tasks, writes files, initiates sub-agents, analyzes results, updates to-dos, and generates final reports with citations [7][8] Research Task & Workflow - A research task is implemented using Gemini 3 within the Deep Agent harness, demonstrating the model's ability to perform complex tasks [5] - The research agent workflow involves creating to-dos, writing the research request to a file, initiating a sub-agent for research, analyzing results, and writing a final report [6][7] - The agent effectively uses a custom research sub-agent to isolate context, conduct in-depth research, and return results to the parent agent [15] Implementation & Customization - Gemini 3 can be easily integrated into existing workflows using Langchain and the Deep Agent harness [12][13] - The Deep Agent harness allows for customization through custom tools, instructions, and sub-agents, enabling users to tailor the agent to specific use cases [4][11] - The provided quick start repository offers instructions and code for running Gemini 3 with the Deep Agent harness, facilitating experimentation and customization [9][10]
Model Fallback Middleware (Python)
LangChain· 2025-11-18 17:00
Model Fallback Middleware Overview - Langchain's model fallback middleware enhances application reliability by providing alternative models during outages or API quota exhaustion [1] - The middleware allows fallback to models from different providers, such as switching from OpenAI to Anthropic [3] - Users can specify multiple fallback models to ensure continued functionality [3] Implementation and Demonstration - The demonstration simulates model failure using non-existent Anthropic models and successfully falls back to GPT-4 mini from OpenAI [4] - The Linksmith trace view illustrates the initial failure of the primary and fallback models before successfully using the final GPT-4 mini model [5] - The middleware is implemented using Langchain's create agent primitive [4] Benefits and Usage - The model fallback middleware helps build more resilient agents capable of handling model outages and API credit limitations [3] - It allows applications to remain functional by automatically switching to a safe and functional model [1] - Creating a custom middleware is possible, offering flexibility beyond the built-in options [2]