Channel

LangChain

Digests from LangChain

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

Catch Agent Regressions Before You Ship: Evals for Managed Deep Agents thumbnail

· 8:57

Catch Agent Regressions Before You Ship: Evals for Managed Deep Agents

This session details how to implement robust evaluation (evals) for Managed Deep Agents to prevent performance regressions as the agent's capabilities grow. The process involves using Harbor, which ensures each evaluation runs in a fresh container. Evals are structured into an environment (data/state), a job (instruction), and a check (verifier). The workflow is scaffolded using `mda evals init`, which can be automated by handing the task to a coding agent (e.g., Claude Code). Results and traces are managed and monitored in LangSmith, allowing for continuous evaluation and integration into nightly CI pipelines.

Key takeaways

  1. Purpose of Evals

    Evals serve two primary goals: catching regressions (ensuring changes don't break existing features) and 'hill climbing' (actively improving agent capabilities). The focus is on defining and catching regressions.

  2. Harbor's Role in Evaluation

    Harbor is bundled into Managed Deep Agents and is crucial because it builds an image around the agent, ensuring every eval runs in a fresh container. It also manages test execution to prevent environment pollution.

  3. Anatomy of an Eval 2:15

    An evaluation consists of three parts: the environment (the starting data/state), the job (the instruction, defined in a markdown file), and the check (the verifier that determines if the job was completed adequately).

  4. Automating Eval Scaffolding 2:36

    The command `mda evals init` scaffolds the necessary files (e.g., `task.md`, `Dockerfile`, tests). Using the `-i` flag allows the work to be handed off to a coding agent, which generates the initial eval suite.

  5. Production Monitoring

    Evals can be managed in production by running them nightly within a CI system. Results are logged into LangSmith, allowing developers to continuously track agent performance and stability.

Watch on YouTube Full article

Score Every Production Trace with an LLM Judge, from Your Terminal (LangSmith CLI) thumbnail

· 5:08

Score Every Production Trace with an LLM Judge, from Your Terminal (LangSmith CLI)

This walkthrough demonstrates how to implement automated, large-scale evaluation of AI agents using an LLM-as-a-judge within LangSmith. By setting up an online evaluation, developers can programmatically score incoming chat traces (e.g., checking for user frustration) without manually reviewing thousands of interactions. The process involves using a coding agent to install LangSmith skills and configure the evaluation, followed by managing the sampling rate to control costs.

Key takeaways

  1. Online LLM-as-a-Judge Setup

    Online evaluations allow an LLM to automatically score incoming agent traces based on a defined prompt and rubric (e.g., detecting user frustration). The output is a score and reasoning attached directly to the trace.

  2. Using LangSmith CLI for Automation 0:01

    A coding agent can be instructed to use the LangSmith CLI to create and manage the LLM judge evaluator, automating the setup process.

  3. Cost Management via Sampling Rate 0:04

    The sampling rate can be updated (e.g., from 100% to 50%) to reduce evaluation costs while maintaining continuous monitoring.

Watch on YouTube Full article

Turn Flagged Traces Into a Dataset in 3 Minutes with the LangSmith CLI thumbnail

· 3:36

Turn Flagged Traces Into a Dataset in 3 Minutes with the LangSmith CLI

This walkthrough demonstrates a scalable workflow for analyzing high volumes of production traces by leveraging the LangSmith CLI and a coding agent. The process uses a 'perceived error' evaluator to flag potential failures, which are then systematically classified into defined issue types (e.g., flawed plan, context explosion). The final output is a structured, native thread dataset in LangSmith, organized into separate dataset splits for each issue type, making the failures readily available for evaluation metrics or post-training data.

Key takeaways

  1. Automated Failure Identification

    Use the 'perceived error' evaluator to flag threads containing evidence of agent mistakes or misunderstandings, transforming manual review into a data-driven process.

  2. Systematic Failure Classification 2:04

    Define specific agent issue types (e.g., Agent looping, flawed plan) and use a coding agent to classify hundreds of flagged threads into these categories.

  3. Building Structured Datasets

    The workflow culminates in creating a native thread dataset in LangSmith, ensuring a dedicated dataset split for every identified issue type. This provides a sorted, reusable corpus of failures.

Watch on YouTube Full article

Inside Clay's Eval Stack: 300M Agent Runs, One LangSmith Pipeline thumbnail

· 13:01

Inside Clay's Eval Stack: 300M Agent Runs, One LangSmith Pipeline

Clay detailed its agentic stack, featuring Claygent (go-to-market research) and Sculptor (go-to-market engineering workflow orchestration). The discussion emphasized that scaling agents to millions of runs requires a robust evaluation philosophy. Key architectural shifts include adopting a data lake for unified first/third-party data access, implementing comprehensive multi-stage evaluations (from local dev to CI), and leveraging large context models (like Fable) to enable complex, self-iterating agent loops.

Key takeaways

  1. Agentic Systems are Becoming Interfaces

    Clay is evolving into an 'agent interface,' making all parts of the product available via CLI and public API. This creates a flywheel where internal and external agents share the same tools, allowing failures in tool invocation to provide user signal for continuous improvement.

  2. Evals are Non-Negotiable for Scale 3:23

    With billions of runs, comprehensive evaluation suites are critical. Clay's philosophy mandates different levels of testing: low-lift local dev checks, and staging/CI environments that mirror production harnesses.

  3. Data Lake Foundation for Agents

    To handle disparate data sources (LangChain traces, Snowflake, Postgres, ClickHouse), Clay is moving to a data lake architecture. This allows agents to run wild on unified first-party and third-party data while enabling safe shadow builds.

Watch on YouTube Full article

Accelerate agent improvement with LangSmith Engine thumbnail

· 3:25

Accelerate agent improvement with LangSmith Engine

LangSmith Engine automates agent improvement by analyzing large volumes of production traces (e.g., 20,000 traces). It identifies recurring issues—such as agents sending outreach to disqualified prospects without warning—and proactively proposes code changes and updated instructions. Furthermore, it automatically generates evaluation datasets from failing runs, allowing engineers to test proposed fixes against historical failures before deployment.

Key takeaways

  1. Automated Issue Identification

    Engine reviews production traces to surface recurring problems (e.g., agent outreach despite CRM flagging a prospect as disqualified), grouping related issues across multiple agent runs.

  2. Proposed Fixes and Instructions 2:05

    Beyond identifying the error, Engine drafts concrete changes: modifying tools (e.g., adding a 'confirmed disqualified' flag) and refining system prompts to include exceptions (e.g., requiring explicit confirmation before sending).

  3. Automated Evaluation Dataset Creation 2:40

    Engine handles the tedious process of growing evaluation datasets by formatting failing production runs into examples, including reference outputs detailing how the agent should have behaved.

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

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

LangSmith Preview Builds: Test agent changes before production thumbnail

· 8:01

LangSmith Preview Builds: Test agent changes before production

LangSmith Preview Builds extend standard software development workflows to AI agents. By automatically creating a temporary deployment for every GitHub Pull Request (PR), teams can test agent changes and validate functionality in a production-like environment without impacting the main branch. This system ensures that agents are thoroughly tested on preview branches before being merged, while also guaranteeing automatic teardown of the temporary deployment upon PR merge.

Key takeaways

  1. Preview Builds for Agents

    LangSmith automatically generates a temporary deployment for every pull request, allowing teams to test agent changes safely before they reach production. This brings standard software development workflows (PR testing) to AI agents.

  2. Local Testing and Validation

    Agents can be tested locally using `langgraph dev`, which automatically opens LangSmith Studio for validation. Changes made in the local project are reflected in the preview deployment.

  3. Automated Revisioning

    The system supports continuous iteration: every new commit added to a PR triggers a new revision of the preview deployment, allowing for granular testing before final merge.

  4. Automatic Cleanup (DevEx)

    Once the pull request is successfully merged into the main branch, LangSmith automatically tears down and removes the temporary preview deployment, ensuring clean resource management.

Watch on YouTube Full article

Managed Deep Agents - Tools thumbnail

· 6:21

Managed Deep Agents - Tools

This video details how to extend the functionality of a managed deep agent by implementing custom tools. Tools allow agents to interact with external systems (like databases or proprietary APIs) beyond built-in capabilities. Custom tools are defined as standard Python/TypeScript functions decorated with `@tool` and require detailed docstrings, which guide the Large Language Model (LLM) on how and when to use them.

Key takeaways

  1. Purpose of Tools

    Tools give agents capability by allowing interaction with the outside world, such as looking up data in databases or taking actions via external APIs. Built-in tools (e.g., web search) are provided by the underlying model, while custom tools address specific organizational needs.

  2. Defining Custom Tools

    In Python, a custom tool is defined as a function decorated with `@tool` from `LangChain tools`. The function's name becomes the tool name, its parameters are what the LLM must fill out, and the docstring serves as the primary description for the agent.

  3. Integration Process 2:00

    To use a custom tool, define it in a separate file (e.g., `tools/lookup.py`), and then import and pass the function reference into the agent definition script.

Watch on YouTube Full article

Managed Deep Agents - Skills thumbnail

· 8:29

Managed Deep Agents - Skills

Skills allow managed deep agents to access specialized contexts and executable scripts dynamically, moving beyond static instructions. Skills are defined in a structured folder (`skills`) using `skill.md` files, which utilize 'progressive disclosure'—only basic information is given to the LLM initially. This system enables agents to perform complex tasks, such as asking follow-up questions or running Python scripts, and allows for centralized management of these skills via Context Hub without requiring code redeployment.

Key takeaways

  1. Skills vs. Instructions

    While instructions are always visible in the agent context, skills provide specialized, optional contexts that the agent can read or execute only when needed (progressive disclosure).

  2. Skill Definition Structure 2:05

    Each skill resides in a dedicated folder under `skills/` and requires a `skill.md` file. This file must contain front matter fields: `name` (the skill name) and `description` (what is shown to the LLM).

  3. Executing Scripts 5:40

    Skills can contain executable scripts (e.g., Python files like `hello.py`). The agent can identify, read, execute these scripts, and use their output as part of its response.

Watch on YouTube Full article

Managed Deep Agents - Instructions and Context Hub thumbnail

· 5:40

Managed Deep Agents - Instructions and Context Hub

This video details how 'Instructions' define the behavior of Managed Deep Agents. These instructions are stored in a dedicated Context Hub, allowing developers to modify agent behavior directly through the UI without needing to redeploy code. The process involves syncing local changes (e.g., modifying `instructions.md`) with the production Context Hub via commands like `mda deploy`, and understanding how conflicts between local and deployed instructions can be resolved.

Key takeaways

  1. Instructions Define Agent Behavior

    Instructions are the core component defining an agent's behavior, typically placed within the system prompt. Changing these instructions immediately impacts the agent's output (e.g., changing response language from Italian to Spanish).

  2. Context Hub for Non-Code Changes 2:05

    The Context Hub allows agents to be updated by modifying instructions in a UI, which automatically propagates changes to the deployed agent without requiring code redeployment.

  3. Syncing Local and Production Instructions 3:50

    When running `MDA deploy`, if the Context Hub has been manually edited (e.g., in production), the deployment process pauses, allowing the user to choose whether to override the hub-edited instructions with the local version or vice versa.

Watch on YouTube Full article

Managed Deep Agents - Quickstart thumbnail

· 8:11

Managed Deep Agents - Quickstart

This quickstart guides users through scaffolding, configuring, testing, and deploying a Managed Deep Agent (MDA). The process involves using the MDA CLI to initialize a project structure, setting up API keys for model providers (e.g., OpenAI), defining agent instructions (`instructions.mmd`), and integrating tools like web search. Testing is done locally via `MDA dev` in LangSmith Studio before deploying the final version to the production environment.

Key takeaways

  1. Project Scaffolding 0:25

    Use `uv tool install managed deep agents` followed by `MDA innit <project-name>` to scaffold the agent project. This creates necessary files like `agent.py`, `instructions.mmd`, and populates environment variables.

  2. Agent Configuration 2:05

    The agent's behavior is defined in `instructions.mmd`. Model selection (OpenAI, Google, Anthropic) and tool definitions (e.g., web search) are configured within the project files.

  3. Local Development Cycle 3:20

    To test locally, run `uv sync` to install dependencies, followed by `MDA dev`. This spins up a local LangSmith Studio environment for iteration and testing.

  4. Production Deployment 4:40

    Deployment requires a paid Langsmith account. The process syncs context to the Context Hub—a centralized location for instructions and skills that can be edited via UI without redeployment.

Watch on YouTube Full article

Introducing: LangSmith Tuned Evaluators thumbnail

· 4:11

Introducing: LangSmith Tuned Evaluators

LangSmith Tuned Evaluators provide an automated, cost-effective way to attach quality feedback (signals) directly to production traces and threads for AI agents. These out-of-the-box evaluators analyze agent interactions—such as identifying perceived errors or misunderstandings—and surface failure modes that traditional system error logging misses. LangChain manages the entire evaluation pipeline, including prompt writing, judge model management, and inference infrastructure, allowing teams to focus on agent improvement workflows.

Key takeaways

  1. Automated Quality Feedback

    Tuned Evaluators automatically attach useful feedback signals to production traces and threads, helping identify agent behavior that needs attention (e.g., misunderstood user intent or contradictory answers).

  2. Perceived Error Detection

    The initial evaluator, Perceived Error, analyzes multi-turn conversations to detect potential mistakes by the agent, even when no explicit system error occurs. This signal can be derived from subtle patterns like unresolved outcomes or user pivots.

  3. Turnkey Management

    LangChain handles the entire evaluation lifecycle end-to-end: writing/testing prompts, managing judge models, benchmarking, and running inference infrastructure, eliminating the need for users to manage complex components. (See 0:28)

  4. Implementation Steps 0:12

    To use Tuned Evaluators, an organization admin must first enable the feature in LangSmith settings. After enabling, the evaluator can be attached to specific tracing projects.

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

Keep model costs in check with LangSmith LLM Gateway thumbnail

· 4:33

Keep model costs in check with LangSmith LLM Gateway

The LangSmith LLM Gateway solves critical governance and cost control issues arising from decentralized usage of multiple Large Language Models (LLMs) across an organization. By acting as a single, centralized endpoint between development teams and various model providers (e.g., OpenAI, Anthropic), the gateway enforces real-time spend limits and rate controls before requests are processed. This allows organizations to maintain a live audit trail of token usage, cost, and model access without requiring code changes in existing applications.

Key takeaways

  1. Centralized Cost Governance 0:15

    The Gateway provides a single point of control for enforcing spend limits and rate limits across all connected LLM providers, preventing unexpected cost spikes that occur when multiple teams use various keys and models.

  2. Non-Invasive Integration 0:40

    Implementing the gateway only requires updating the base URL and API key within existing SDKs (Python, TypeScript), meaning developers do not need to modify their application's core request or response handling logic.

  3. Granular Control and Auditability 1:05

    Cost controls can be applied globally for the organization, or granularly by individual API key, user, or workspace. This provides a live audit trail detailing which model, key, and number of tokens were used, replacing reliance on provider invoices.

Watch on YouTube Full article

How Unify cut its AI agent costs 95% in two weeks thumbnail

· 1:08:24

How Unify cut its AI agent costs 95% in two weeks

Unify's agent platform automates go-to-market tasks by giving sales representatives 'an engineer in their back pocket.' The discussion details how Unify achieved a 90-95% cost optimization within two weeks of launch. Key architectural insights include optimizing for prompt caching hit rates, designing subagents as simple function calls, and implementing robust data handling over tabular data using virtualized Pandas-like interfaces. Furthermore, the talk emphasizes advanced evaluation techniques (DQA sets) and stateful, durable cloud execution environments like Monty to ensure scalability and cost control.

Key takeaways

  1. Cost Optimization via Prompt Caching 30:25

    Achieving a high prompt cache hit rate is critical for cost-effectiveness. The limit is approximately 15 requests per second (RPS) within OpenAI's cache, and developers must implement strategies to maximize hits, as providers won't solve this distribution problem for you.

  2. Subagents are Function Calls 25:50

    Architecturally, Unify treats a subagent not as a complex process, but simply as an arbitrary function call. This simplifies the system and allows for efficient execution patterns like mapping over rows.

  3. The Importance of Planning Steps 38:20

    Adding an initial planning step (e.g., using GPT-4) to the agent workflow significantly improves quality and efficiency by forcing the model to scout multiple potential trajectories before executing.

  4. Durable Cloud Execution

    To run agents in a cloud environment without full VMs, using specialized tools like Monty (a Python REPL that suspends) is crucial for maintaining statefulness and strong tenancy.

  5. Adversarial LLM Judging

    When using an LLM as a judge, it must be from a different model family than the original agent model to avoid 'mode collapse' or groupthink, ensuring an adversarial evaluation.

Watch on YouTube Full article

Building Governed Agents: A Framework for Cost, Control and Compliance thumbnail

· 52:28

Building Governed Agents: A Framework for Cost, Control and Compliance

As autonomous agents scale in production environments, they introduce significant governance challenges related to cost control, data security, and regulatory compliance. This presentation outlines the necessity of implementing centralized runtime controls—such as an LLM Gateway—across the entire Agent Development Lifecycle (ADLC). Centralized governance is critical for managing unpredictable spend, ensuring reliability through fallbacks and rate limits, and maintaining consistent policy enforcement across diverse agent interactions (LLM calls, tool use, and inter-agent communication).

Key takeaways

  1. The Three Pillars of Agent Governance 5:40

    Production agents introduce three main pressure points: Cost (unpredictable spend from looping/context growth), Reliability (need for fallbacks and clear failure behavior), and Compliance (consistent policy enforcement required by regulated industries).

  2. Centralized Runtime Controls are Essential 8:30

    Governance must be implemented as a central infrastructure layer, rather than being bolted on application-by-application. This centralized approach manages interactions with external services (LLMs, tools) and ensures visibility across the entire system.

  3. Comprehensive Risk Management is Required 12:30

    Governance controls must cover four distinct interaction points: LLM calls (cost/data risk), Tool calls (unintended actions/permissioning), MCP calls (data leaving infrastructure), and Agent-to-Agent calls (identity and compounding errors).

  4. Compliance Requires Multi-Layered Guardrails 23:20

    For regulated industries, governance must address specific regulations like GDPR, CCPA, HIPAA, and the EU AI Act. This involves implementing guardrails for PII/secrets detection, role definition, and audit logging.

Watch on YouTube Full article

Build a social media agent with Managed Deep Agents thumbnail

· 12:49

Build a social media agent with Managed Deep Agents

This tutorial demonstrates building an autonomous social media agent using LangChain's Managed Deep Agents (MDA). The resulting agent monitors Hacker News and X (Twitter) to generate daily drafts of post ideas, which are then delivered directly to the user via Slack. The process covers setting up the project structure, defining custom tools, implementing specialized skills, configuring persistent memory across sessions, scheduling autonomous execution, and deploying the system to a production channel.

Key takeaways

  1. Agent Initialization and Setup 2:00

    The process begins by installing dependencies using `UV tool install managed deep agents` and initializing the project with `MDA init social post assistant`. The agent's entry point (`agent.py`) is configured, specifying model properties (e.g., changing to `GPT-5.6 Luna` for cost efficiency) and defining access tools.

  2. Tooling and Data Integration 3:50

    Custom tools are built to interact with external APIs: a tool to search Hacker News (using Algolia API) and two tools for X/Twitter (`get X user timeline` and `search X posts`). Authentication requires defining bearer tokens in the `.env` file.

  3. Advanced Agent Configuration 5:50

    The agent's behavior is governed by a core instruction file (`instructions.md`) and specialized, modular knowledge packages called 'Skills.' A skill (e.g., `draft posts`) provides dynamic instructions for specific tasks like drafting or revising content.

  4. Persistence and Automation 7:50

    To maintain context across different runs, a memory file (`memory.py`) is set with the scope to 'agent.' The agent's autonomy is established by creating a schedule (e.g., `morning drafts.py`) using cron expressions to run daily at 9:00 a.m. Pacific time.

  5. Deployment and Connectivity 9:40

    The agent is tested locally via `MDA dev` (which opens the agent in LangSmith Studio) before deployment using `MDA deploy`. Slack integration requires running `mda channel add slack`, generating a manifest, and setting up necessary environment variables (Slack signing secret and bot token).

Watch on YouTube Full article

Create an agent that can browse the web with Managed Deep Agents and Browserbase's Stagehand thumbnail

· 10:39

Create an agent that can browse the web with Managed Deep Agents and Browserbase's Stagehand

This video demonstrates building a production-ready web browsing agent by integrating Managed Deep Agents (LangSmith) with Stagehand v4 and BrowserStack. The resulting agent can interact with live websites—performing actions like scrolling, clicking, and navigating—using specialized tools exposed by Stagehand to connect the AI model to scalable browser infrastructure.

Key takeaways

  1. Agent Architecture Overview

    The solution uses Managed Deep Agents as the core agent harness (LangSmith), which is augmented with tools from Stagehand v4. Stagehand, in turn, connects to web browsing infrastructure provided by BrowserStack for production-grade scalability.

  2. Stagehand V4 Tools 3:57

    The agent is given three core tools from Stagehand: `screenshot` (visually inspects the rendered page), `snapshot` (inspects the active page and hydrates element IDs for simple interactions), and `run` (accepts snapshot actions or JavaScript via the Playwright-shaped page API, ideal for multi-step workflows).

  3. Development Workflow (Local vs. Production) 6:00

    The development process involves running `mda dev` locally to test the agent in a managed deep agent studio environment. For production, the deployment is finalized using `mda deploy`, which creates a serverless deployment within LangSmith's Context Hub.

Watch on YouTube Full article