LangChain Deep Agents: The Easiest Way to Build Reliable AI Agents

Building AI agents that can handle complex, multi-step tasks has never been easier. LangChain’s Deep Agents is a powerful agent harness that brings together everything you need to build reliable, production-ready LLM-powered agents — all in one package.

What Is Deep Agents?

Deep Agents is a standalone Python library built on top of LangChain’s core building blocks. It uses the LangGraph runtime for durable execution, streaming, human-in-the-loop interactions, and more. Think of it as an “agent harness” — the same core tool-calling loop as other agent frameworks, but with built-in capabilities that make agents reliable for real-world tasks.

Whether you’re building a coding assistant, a data analyst, or a research agent, Deep Agents gives you the infrastructure to do it right from day one.

Quickstart

Getting started is straightforward. Install the library and create your first agent in just a few lines:

# pip install -qU deepagents langchain-google-genai
from deepagents import create_deep_agent
def get_weather(city: str) -> str:
"""Get weather for a given city."""
return f"It's always sunny in {city}!"
agent = create_deep_agent(
model="google_genai:gemini-3.5-flash",
tools=[get_weather],
system_prompt="You are a helpful assistant",
)
# Run the agent
agent.invoke(
{"messages": [{"role": "user", "content": "what is the weather in sf"}]}
)

Core Capabilities

Deep Agents comes with six major built-in capabilities:

  • Take actions in an environment — Invoke tools, read and write files, and execute code.
  • Connect to your data — Load memories, skills, and domain knowledge at the right moment.
  • Manage growing context — Summarize history and offload large results across long runs.
  • Parallelize tasks — Delegate to general or specialized subagents running in isolated context windows.
  • Stay in the loop — Pause for human approval at critical decision points.
  • Improve over time — Update memory, skills, and prompts based on real usage.

Execution Environment

Tools and MCP Support

Pass custom functions, LangChain tools, or tools from any MCP (Model Context Protocol) server using the tools= parameter. Deep Agents fully support MCP, letting you connect to databases, APIs, file systems, and more through a standard interface.

from deepagents import create_deep_agent
agent = create_deep_agent(
model="anthropic:claude-sonnet-4-6",
tools=[search, fetch_page, run_query],
)

Virtual Filesystem

The harness provides a configurable virtual filesystem backed by pluggable backends — in-memory state, local disk, LangGraph store, or custom backends. It supports operations like ls, read_file, write_file, edit_file, glob, and grep.

Filesystem Permissions

Declarative permission rules control which files and directories the agent can read or write. You can restrict agents to specific directories, protect sensitive files like .env, and give subagents narrower access than the parent agent.

Code Execution

Deep Agents supports two modes of code execution:

  • Sandbox backends — Expose a shell execute tool for isolated command execution. Ideal for installing dependencies, running tests, or calling CLIs.
  • Interpreters — Add an eval tool running JavaScript in a scoped QuickJS runtime. Great for lightweight data transformations and programmatic tool calling.

Context Management

Skills

Skills package specialized workflows, domain knowledge, and custom instructions for your agent. They follow the Agent Skills standard and use progressive disclosure — the agent reads skill frontmatter at startup and only loads full skill content when a task needs it, keeping startup context compact.

Memory

Memory gives your agent persistent context across conversations — coding style, preferences, conventions, and project guidelines. Memory uses AGENTS.md files and can be updated based on interactions, so preferences carry forward without restating them each session.

Summarization and Context Offloading

The harness automatically compresses conversation history and large intermediate results, isolates subagent work, and uses long-term storage to carry information across threads — all to support multi-step tasks that exceed a single context window.

Prompt Caching

For Anthropic models, Deep Agents automatically applies prompt caching to static sections of the system prompt — base agent instructions, memory, and skill content. This reduces both latency and cost on long-running agents, with no configuration required.

Delegation: Task Planning and Subagents

Deep Agents includes a built-in write_todos tool for structured task tracking with status states (pending, in_progress, completed), giving agents a lightweight planning layer for long-running work.

The subagent system allows the main agent to spin up ephemeral child agents for isolated or parallel tasks. Each subagent gets fresh context, runs autonomously to completion, and returns a single final report — keeping the parent agent’s context clean and token-efficient.

Human-in-the-Loop

Deep Agents integrates with LangGraph interrupts so you can pause for human approval on sensitive tool calls. Use the interrupt_on parameter to specify which tools require a checkpoint:

agent = create_deep_agent(
model="anthropic:claude-sonnet-4-6",
tools=[edit_file, deploy],
interrupt_on={"edit_file": True}, # Pause before every file edit
)

This gives you a runtime safety layer for destructive operations, expensive API calls, and interactive debugging.

Observability with LangSmith

Deep Agents integrates seamlessly with LangSmith for tracing requests, debugging agent behavior, and evaluating outputs. When you’re ready to move to production, LangSmith provides full deployment and monitoring options.

Getting Started

Deep Agents is the right choice if you want a batteries-included agent framework that handles the hard parts — context management, memory, subagent delegation, and human oversight — so you can focus on building what matters.

Source: LangChain Deep Agents Documentation

Dataverse Long-Term Data Retention

Mastering Data verse Long-Term Data Retention: A Quick Guide

Managing database growth in Microsoft Dataverse just got easier with long-term data retention policies. Instead of permanently deleting your historical “cold” data or letting it bloat your active environment, you can securely archive it.

Here is everything you need to know to set up a data retention policy in Dataverse.

📋 Phase 1: The Prerequisites

Before you can schedule a retention policy, you need to prepare your tables and data criteria.

  • Enable the Parent Table: Go to the properties of your target table in Power Apps, expand Advanced options, and check Enable long term retention.
  • Note: Turning this on automatically enables all related child tables (like notes or tasks). It takes about 15–30 minutes to activate.
  • Create a Criteria View: Dataverse uses standard system views to determine which records get archived.
  • Best Practice: Build a dedicated view (e.g., “Cases Closed Before 2015”). Microsoft strongly recommends testing this view with a TOP N statement (like TOP 10) first to ensure your query pulls exactly what you expect before applying it to millions of rows.

⚙️ Phase 2: Setting Up the Policy

Once your tables are enabled and your view is ready, an administrator can deploy the policy:

  1. Sign into Power Apps and navigate to Retention policies on the left menu.
  2. Select New retention policy.
  3. Fill out the required details:
  • Table: Select your root parent table.
  • Name: Give your policy a clear name.
  • Criteria: Choose the Dataverse view you tested earlier.
  • Schedule & Frequency: Choose a start date and set how often it should run (Once, Daily, Weekly, Monthly, or Yearly).
  1. Hit Save.

⚠️ Critical Gotchas & Limitations

Before you hit go, keep these unique platform behaviors in mind:

  • It’s a One-Way Street: Once data is moved to long-term storage, it cannot be moved back to the active data store.
  • API Limits Apply: Running retention policies counts against your Microsoft Power Platform API request allocations.
  • Background Throttling: These policies are treated as low priority by the platform to avoid slowing down your active apps and flows. As a result, a single policy run can take 72 to 96 hours, regardless of the data volume.
  • Known Timeout Issue: If a parent table has a massive cascade chain (25+ child tables), the process might time out. The workaround is to manually enable a few child tables for retention first, then enable the parent table.

Azure Data Studio is officially retired

What happened


👉 What should you use now?

1. ✅ Primary replacement (Microsoft recommendation)

👉 Visual Studio Code + MSSQL extension

This is the official path forward.

  • Microsoft explicitly recommends migrating to VS Code (Microsoft Azure)
  • Use the MSSQL extension for SQL Server / Azure SQL
  • Supports:
    • Query editor
    • Connections & results
    • Azure SQL + SQL Server
  • Includes migration tools to import your ADS settings (Microsoft Learn)

💡 Reality check:
It’s not a 1:1 replacement yet, but it’s where all new features are going.


2. 🧱 Traditional (full-featured GUI)

👉 SQL Server Management Studio (SSMS)

Best if you want:

  • Full admin GUI
  • Mature tooling
  • Deep SQL Server features

Good for:

  • DBAs
  • Heavy admin work

3. 🌍 Cross-platform / multi-database tools

If you liked ADS for being lightweight + cross-platform:

  • DBeaver
  • Beekeeper Studio
  • DbGate

These often:

  • Support many DBs (Postgres, MySQL, SQL Server, etc.)
  • Feel closer to ADS simplicity
  • Are actively maintained (Beekeeper Studio)

4. 🍏 Native client alternatives (optional)

  • SQLPro for MSSQL
    • Fast, native app (especially on macOS)
    • Simpler than VS Code setup (SQLPro for MSSQL)

🧭 How to choose (quick guide)

  • You want “official + future-proof” → VS Code + MSSQL
  • You want full SQL Server power → SSMS
  • You want ADS-like simplicity → DBeaver / Beekeeper
  • You hate Electron apps → SQLPro / native tools

⚠️ Bottom line

Azure Data Studio isn’t being replaced by a single tool — it’s being split into:

  • VS Code (modern, extensible dev workflow)
  • SSMS (heavy-duty admin)
  • Third-party tools (if you want simplicity)

Upgrade the GitHub CLI


Step 1: Check Your Current Version

Before upgrading, it’s helpful to know which version you are currently running. Open your terminal and type:

Bash

gh --version

If you see a version number and a notification that a newer version is available, it’s time to update!


Step 2: Upgrade Based on Your OS

macOS

If you installed GitHub CLI using Homebrew (the most common method for Mac users), upgrading is a simple one-liner:

Bash

brew upgrade gh

Windows

On Windows, your upgrade path depends on how you originally installed it:

  • WinGet:PowerShellwinget upgrade --id GitHub.cli
  • Chocolatey:PowerShellchoco upgrade gh
  • Scoop:PowerShellscoop update gh
  • MSI Installer: If you used the .msi installer, simply download the latest version from the official releases page and run it; it will overwrite the old version.

Linux

For Linux users, you’ll typically use your package manager.

  • Ubuntu / Debian / Raspberry Pi OS:Bashsudo apt update sudo apt install gh
  • Fedora / CentOS:Bashsudo dnf upgrade gh
  • Arch Linux:Bashsudo pacman -Syu github-cli

Step 3: Verify the Upgrade

Once the process finishes, verify that you are on the latest version by running the version command again:

Bash

gh --version

Bonus: Keeping Authenticated

Upgrading shouldn’t affect your login status, but if you ever run into permission issues after an update, you can re-authenticate easily:

Bash

gh auth login

Virtual Box- startup Options

The following is a summary of startup options available in virtual box start up .

Start with GUI

This launches the VM in a standard window, complete with 3D graphics support—provided 3D acceleration is enabled, Guest Additions are installed, and the OS supports it.

Detachable vs. Headless

These modes are essentially the same: neither provides 3D acceleration, even if it’s enabled in the VM settings.

Start without GUI (Headless)

Think of this as “monitorless.” The VM’s graphics system runs, but no window appears—like a monitor turned off and tucked away. The guest OS still renders the GUI, which you can access remotely via native protocols or VirtualBox RDP/VNC. To display the window, click Show in VirtualBox Manager, which switches to Detachable mode. To hide it again, use Machine → Detach GUI. You can toggle between visible and hidden as needed.

Start with Detachable GUI

This is simply a headless VM with its monitor visible in a window. You can show or hide the window at will, using the same toggle options as in headless mode.

Git hub co pilot – A simple Introduction

Git Hub Copilot: A Simple Introduction

If you’re a software developer, chances are you’ve heard of GitHub and its ecosystem of tools and services. Recently, GitHub introduced Copilot, a powerful new feature that aims to change the way developers write code. In this blog post, we’ll explore what GitHub Copilot is, how it works, and what benefits it offers to the development community.

What is GitHub Copilot?

GitHub Copilot is an AI-powered pair programmer developed by GitHub and Microsoft. It suggests code snippets as you type, helping you to write more efficient and elegant code. The idea behind Copilot is to assist developers in their coding process by automating repetitive tasks and providing insights that can enhance the overall quality of the codebase.

How Does Copilot Work?

Copilot operates by analyzing the code in your repository and the vast amount of open-source code available on GitHub. It then uses this information to generate relevant code suggestions based on the context of your current work. The suggestions are dynamically updated as you code, offering real-time assistance throughout your development process.

Key Features

  • Code Completion: Copilot predicts and suggests code as you type, saving you time and effort.
  • Contextual Suggestions: The suggestions are contextually relevant, making them more useful and applicable to your specific coding situation.
  • Integration: Copilot integrates seamlessly with GitHub and Visual Studio Code, making it easy to use alongside your existing tools.
  • Customization: You can control the suggestions and fine-tune the AI to better suit your coding style.

Benefits of Using GitHub Copilot

  1. Enhanced Productivity: By automating the generation of code snippets, Copilot allows developers to focus more on the high-level logic of their applications rather than the minutiae.
  2. Code Quality: Copilot suggests well-structured and optimized code, which can lead to a more maintainable and efficient codebase.
  3. Learning Opportunities: For beginners or those looking to improve their coding skills, Copilot can provide valuable insights and examples.
  4. Collaborative Coding: Copilot can be used in pair programming scenarios, where multiple developers can work together on a codebase, improving the overall quality of the code.

Getting Started with GitHub Copilot

To start using Copilot, you’ll need to sign up for a GitHub account and install the GitHub desktop app or integrate it with Visual Studio Code. Once set up, simply open your repository and start coding. Copilot will begin offering suggestions as you type.

Tips for Using Copilot Effectively

  • Experiment with Suggestions: Try accepting and integrating Copilot’s suggestions to see how they fit into your code.
  • Customize Settings: Adjust Copilot’s preferences to better align with your coding style and preferences.
  • Review and Modify: While Copilot can save time, always review and modify the suggested code to ensure it meets your project’s requirements.

Conclusion

GitHub Copilot is a fascinating tool that leverages AI to assist developers in their coding journey. By providing real-time code suggestions and insights, Copilot can significantly enhance productivity and code quality. Whether you’re a seasoned developer or just starting out, Copilot is worth exploring to see how it can benefit your projects.

Are you ready to try GitHub Copilot? Sign up for a GitHub account and give it a go. Who knows, it might just change the way you write code!

Adding a Local Repository to GitHub Using GitHub CLI

 Create a new repository with GitHub CLI

  • Use the gh repo create command to create a repository for your project directly from the command line.
  • When prompted, choose “Push an existing local repository to GitHub” and enter your preferred repository name.
  • If you want the project to be created under an organization rather than your personal account, specify it as:gh repo create ORGANIZATION-NAME/PROJECT-NAME
  • Follow the interactive prompts
    • The CLI will guide you through setup options.
    • When asked whether to add the remote and push commits to your current branch, select Yes to complete the setup.
  • Skip prompts with command flags (optional)
    • To automate the process, include flags directly in your command:gh repo create --source=. --public --remote=origin --push
    • Here’s what each flag does:
      • --source=. → Uses your current directory as the repository source.
      • --public--private, or --internal → Sets repository visibility.
      • --remote → Specifies the remote name (commonly origin).
      • --push → Pushes all existing commits to GitHub automatically.
  • Learn more
    • See the official GitHub CLI Manual for additional flags, examples, and usage tips.

Adding a local repository to GitHub using Git

🚀 Steps to Add a Local Repository to GitHub Using Git

  • Authenticate to GitHub on the command line
  • Create a new repository on GitHub
  • Copy the remote repository URL
    • On the repository’s Quick Setup page, click the copy icon next to the URL to copy it to your clipboard.
    • (You’ll use this URL in the next command.)
  • Open Git Bash
  • Navigate to your local project directory
    • Use the cd command to switch to the folder containing your local repository.cd path/to/your/project
  • Add the remote repository URL
    • Run the following command to link your local repo to the remote GitHub repo:git remote add origin REMOTE-URL
    • Replace REMOTE-URL with the actual GitHub repository URL you copied earlier.
    • More info: Managing remote repositories
  • Verify the remote connection
    • Confirm that the remote URL is set correctly by running:git remote -v
  • Push your local repository to GitHub
    • Upload your local files to the GitHub repository using:git push origin main
    • If your default branch is named something other than main (e.g., master or dev), replace main with your branch name.
    • Learn more: About branches

How to Install and run small language Models Locally

You can use Ollama to run small language models locally on your laptop with ease! Here’s how to get started:

1. Install Ollama

  • Download Ollama from its official website.
  • For macOS/Linux, run this command in your terminal:curl -fsSL https://ollama.com/install.sh | sh
  • For Windows, download the installer and follow the setup instructions.
  • Note: To specify a custom location during installation , please refee Specify custom location for Ollama CLI

2. Download a Model

  • Ollama supports various models like Llama 3.2, Mistral, and Gemma.
  • To download a model, use:ollama pull llama3.2 This will store the model locally.

3. Run the Model

  • Once downloaded, you can run the model with:ollama run llama3.2
  • This will start an interactive session where you can input text and get responses.

4. Optimize Performance

  • Hardware Requirements:
    • At least 8GB RAM for smaller models.
    • 16GB+ RAM recommended for larger models.
    • GPU (NVIDIA/AMD) improves performance but is optional.

5. Explore More Features

  • Ollama provides an API for integration with tools like LangChain.
  • You can also run models in CPU-only mode, though it may be slower.

Specify custom location for Ollama CLI

You’ll need to use the installer’s executable file along with the /DIR parameter to specify your desired directory. For example, if you’re using windows & ollamasetup.exe and you want to install the software in a folder called ollama on your D: drive, you would enter the following command: ollamasetup.exe /DIR="d:/ollama"

To know all parameters type cd to the directory of ollamasetup and type ollamasetup.exe /help or ollamasetup.exe /?