{
 "kind": "tool",
 "slug": "langchain-pypi",
 "path": "tools/langchain-pypi/",
 "name": "LangChain",
 "maker": null,
 "density": "profile",
 "crumbs": [
  [
   "Tools",
   "tools/"
  ],
  [
   "Agent, MCP and tool libraries",
   "tools/agent-libraries/"
  ]
 ],
 "lead": "Framework for composing applications with LLMs through chains and agents.",
 "chips": [
  {
   "label": "Agent, MCP and tool libraries",
   "path": "tools/agent-libraries/"
  },
  {
   "label": "PYPI"
  }
 ],
 "primary": {
  "label": "Copy install command",
  "copy": "pip install langchain"
 },
 "links": [
  {
   "label": "GitHub",
   "href": "https://github.com/langchain-ai/langchain"
  },
  {
   "label": "Website",
   "href": "https://docs.langchain.com/"
  },
  {
   "label": "Its AgentGid profile",
   "path": "agents/langchain/"
  }
 ],
 "track": "New versions, deprecation and license changes on your dashboard",
 "verdicts": [
  {
   "key": "license",
   "label": "License",
   "value": "MIT",
   "status": "yes",
   "sub": "Use it in paid apps",
   "quote": null,
   "note": "License from PyPI classifier.",
   "src": "https://github.com/langchain-ai/langchain"
  },
  {
   "key": "maint",
   "label": "Maintained",
   "value": "Maintained",
   "status": "yes",
   "sub": "Last change Nov 24, 2026",
   "note": "Latest GitHub release Nov 19, 2026. ",
   "src": "https://github.com/langchain-ai/langchain"
  },
  {
   "key": "pop",
   "label": "Used by agents' projects",
   "value": "127 projects",
   "status": "info",
   "sub": "#4 of 192 in its category",
   "note": "Dependency in 127 public GitHub projects set up for AI coding agents that we scanned (2.0%).",
   "src": null
  },
  {
   "key": "agent",
   "label": "Agent access",
   "value": "Official agent skills",
   "status": "yes",
   "sub": "1 from the makers",
   "note": "Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.",
   "src": "https://docs.langchain.com/llms.txt"
  }
 ],
 "vfoot": "From the package registry and GitHub, checked daily.",
 "blocks": [
  {
   "id": "overview",
   "nav": "Overview",
   "h2": "What LangChain does",
   "parts": [
    {
     "t": "prose",
     "text": "LangChain now centers on one function, <code>create_agent</code>, which the docs call a minimal harness: you pick a model, pass plain Python functions as tools, and add behavior through middleware, with LangGraph as the runtime underneath."
    }
   ]
  },
  {
   "id": "popularity",
   "nav": "Popularity",
   "h2": "LangChain popularity",
   "parts": [
    {
     "t": "stats",
     "items": [
      {
       "n": "89",
       "of": "/ 100",
       "l": "Gid Score, #13 overall"
      },
      {
       "n": "37.6M",
       "l": "downloads a week, pypi"
      },
      {
       "n": "150K",
       "l": "GitHub stars"
      },
      {
       "n": "127",
       "l": "agent projects use it"
      }
     ]
    },
    {
     "t": "small",
     "text": "Gid Score measures public popularity and activity, not quality.",
     "link": "How the Gid Score is calculated",
     "path": "tools/top/"
    }
   ]
  },
  {
   "id": "usage",
   "nav": "How it is used",
   "h2": "How LangChain is used",
   "parts": [
    {
     "t": "list",
     "items": [
      "LangChain is a dependency in 127 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (7.8% of the 1,623 Python ones), #4 of 192 in agent, mcp and tool libraries.",
      "Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 2,194; those are left out of every share on this page.",
      "The most used alternative in our scan is LangGraph (78 projects).",
      "Projects that use it most often also use python-dotenv (70.9%), Pydantic (56.7%), FastAPI (53.5%)."
     ]
    },
    {
     "t": "h3",
     "text": "By coding agent"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "74 projects, 2.4%",
       "v": "GitHub Copilot",
       "path": "agents/github-copilot/"
      },
      {
       "l": "52 projects, 2.1%",
       "v": "Cursor",
       "path": "agents/cursor/"
      },
      {
       "l": "43 projects, 1.3%",
       "v": "Claude Code",
       "path": "agents/claude-code/"
      },
      {
       "l": "11 projects, 2.3%",
       "v": "Gemini CLI",
       "path": "agents/gemini-cli/"
      },
      {
       "l": "6 projects, 1.3%",
       "v": "OpenAI Codex",
       "path": "agents/openai-codex/"
      },
      {
       "l": "5 projects, 1.5%",
       "v": "OpenCode",
       "path": "agents/opencode/"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Often used with"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "In 70.9% of its projects",
       "v": "python-dotenv",
       "path": "tools/python-dotenv/"
      },
      {
       "l": "In 56.7% of its projects",
       "v": "Pydantic",
       "path": "tools/pydantic/"
      },
      {
       "l": "In 53.5% of its projects",
       "v": "FastAPI",
       "path": "tools/fastapi/"
      },
      {
       "l": "In 53.5% of its projects",
       "v": "LangGraph",
       "path": "tools/langgraph/"
      },
      {
       "l": "In 52.8% of its projects",
       "v": "Uvicorn",
       "path": "tools/uvicorn/"
      },
      {
       "l": "In 38.6% of its projects",
       "v": "OpenAI Python Library",
       "path": "tools/openai-pypi/"
      },
      {
       "l": "In 37.8% of its projects",
       "v": "Requests",
       "path": "tools/requests-py/"
      },
      {
       "l": "In 35.4% of its projects",
       "v": "Pydantic Settings",
       "path": "tools/pydantic-settings/"
      }
     ]
    }
   ]
  },
  {
   "id": "profile",
   "nav": "Profile",
   "h2": "LangChain in practice",
   "parts": [
    {
     "t": "h3",
     "text": "Strengths"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "Middleware instead of a monolith",
       "v": "The docs describe <code>create_agent</code> as a starting point that you extend piece by piece. Guardrails, retries, routing and tool policies are added as middleware when your use case needs them."
      },
      {
       "l": "Models swap by string",
       "v": "The docs promise one interface for chat models and embeddings across providers. In the docs examples, moving from <code>openai:gpt-5.5</code> to <code>ollama:devstral-2</code> changes only the model argument and the install comment."
      },
      {
       "l": "LangGraph runtime underneath",
       "v": "Agents from <code>create_agent</code> are built on LangGraph. The docs say this lets LangChain take advantage of LangGraph's durable execution, human-in-the-loop support and persistence."
      },
      {
       "l": "Re-indexing without duplicates",
       "v": "In the Chat LangChain post, the team re-runs ingestion through the Indexing API. The post says its record manager tracks writes to the vector store and handles deduplication and cleanup, so documents do not have to be re-indexed from scratch."
      }
     ]
    },
    {
     "t": "h3",
     "text": "Watch out for"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "A lot of surface to learn (2023 view)",
       "v": "In a 2023 post, the maintainers wrote that packing an entire ecosystem into one package leaves users with many features to learn. The post predates the current docs, which center on <code>create_agent</code>."
      },
      {
       "l": "Three layers to choose between",
       "v": "The README sends advanced customization and agent orchestration to LangGraph, and it sends newcomers to Deep Agents. Expect to work out which of the three layers your project needs."
      },
      {
       "l": "Every provider example adds an install",
       "v": "Each provider example in the docs installs something beyond <code>langchain</code>. Some use an extra such as <code>\"langchain[openai]\"</code>. Others use a separate package such as <code>langchain-ollama</code> or <code>langchain-fireworks</code>."
      }
     ]
    },
    {
     "t": "h3",
     "text": "Quickstart: call a chat model"
    },
    {
     "t": "tabs",
     "label": "Example",
     "items": [
      {
       "tab": "Python",
       "code": "from langchain.chat_models import init_chat_model\n\nmodel = init_chat_model(\"openai:gpt-5.5\")\nresult = model.invoke(\"Hello, world!\")"
      }
     ]
    }
   ]
  },
  {
   "id": "more",
   "nav": null,
   "spy_as": "profile",
   "h2": "More about LangChain",
   "parts": [
    {
     "t": "more",
     "items": [
      {
       "title": "Agent Skills for it",
       "path": "skills/",
       "items": [
        ": 5 Agent Skills: langchain-agent-experiments, langchain-agent-monitoring, langchain-agent-tracing, langchain-build-agent, langchain-eval-engi",
        "langchain-architecture: Design LLM applications using LangChain 1.x and LangGraph for agents, memory, and tool integration. Use when building LangChain applications",
        "langchain: Framework for building LLM-powered applications with agents, chains, and RAG. Supports multiple providers (OpenAI, Anthropic, Google), 500+",
        "langchain-architecture: Design LLM applications using the LangChain framework with agents, memory, and tool integration patterns. Use when building LangChain applic",
        "langchain-chains: LangChain chain composition including SequentialChain, RouterChain, and LCEL patterns"
       ]
      },
      {
       "title": "Head to head",
       "items": [
        {
         "text": "LangChain vs LangGraph",
         "note": "used together in 68 projects",
         "path": "tools/compare/langchain-python-vs-langgraph/"
        }
       ]
      },
      {
       "title": "Packages around it",
       "items": [
        "langchain-openai: OpenAI models",
        "langchain-core: core abstractions",
        "langchain-community: community integrations",
        "langchain-google-genai: Google Gemini models",
        "langchain-text-splitters: document chunking",
        "langchain-mcp-adapters: MCP tool adapters"
       ]
      },
      {
       "title": "More in Agent, MCP and tool libraries",
       "path": "tools/agent-libraries/",
       "items": [
        {
         "text": "Model Context Protocol SDK (JavaScript)",
         "path": "tools/modelcontextprotocol/"
        },
        {
         "text": "Model Context Protocol SDK (Python)",
         "path": "tools/mcp/"
        },
        {
         "text": "FastMCP (Python)",
         "path": "tools/fastmcp-pypi/"
        },
        {
         "text": "Agent Client Protocol SDK",
         "path": "tools/agentclientprotocol-sdk/"
        },
        {
         "text": "LangChain.js",
         "path": "tools/langchain-npm/"
        },
        {
         "text": "Mastra",
         "path": "tools/mastra/"
        },
        {
         "text": "MCP Inspector",
         "path": "tools/modelcontextprotocol-inspector/"
        },
        {
         "text": "fastMCP (JavaScript)",
         "path": "tools/fastmcp-npm/"
        }
       ]
      }
     ]
    }
   ]
  },
  {
   "id": "alternatives",
   "nav": "Alternatives",
   "h2": "Alternatives",
   "parts": [
    {
     "t": "alts",
     "items": [
      {
       "name": "LangChain",
       "me": true,
       "facts": [
        "MIT",
        "Gid 89",
        "37.6M/wk"
       ]
      },
      {
       "name": "LangGraph",
       "why": "Framework for building stateful, multi-actor applications with LLMs.",
       "path": "tools/langgraph/",
       "facts": [
        "MIT",
        "Gid 80",
        "15.2M/wk"
       ]
      },
      {
       "name": "Pydantic AI",
       "why": "AI agent framework built with Pydantic for structured, typed agent development.",
       "path": "tools/pydantic-ai/",
       "facts": [
        "MIT",
        "Gid 64",
        "1.8M/wk"
       ]
      },
      {
       "name": "LlamaIndex",
       "why": "Framework to build RAG applications connecting LLMs to your custom data and documents.",
       "path": "tools/llama-index/",
       "facts": [
        "MIT",
        "Gid 59",
        "406K/wk"
       ]
      },
      {
       "name": "Semantic Kernel",
       "why": "Microsoft SDK for integrating LLMs with traditional code for AI applications.",
       "path": "tools/semantic-kernel/",
       "facts": [
        "MIT",
        "Gid 55",
        "85.6K/wk"
       ]
      }
     ],
     "more": "Compare LangChain with another tool",
     "more_path": "tools/compare/"
    }
   ]
  },
  {
   "id": "start",
   "nav": "Get started",
   "h2": "Get started",
   "parts": [
    {
     "t": "install",
     "intro": "Install it.",
     "code": "pip install langchain"
    },
    {
     "t": "h3",
     "text": "Rules for your agent"
    },
    {
     "t": "rules",
     "label": "Paste into AGENTS.md or CLAUDE.md",
     "text": "## LangChain\n- Build agents with `create_agent` from `langchain.agents`, passing `model`, `tools` and `system_prompt`.\n- Pass the model as a `\"provider:model\"` string where the docs do, e.g. `\"openai:gpt-5.5\"` or `\"ollama:devstral-2\"`. When a provider needs extra settings, as Azure needs `azure_deployment`, build the model with `init_chat_model` and pass the object as `model`.\n- Install the provider extra or package shown in the docs alongside `langchain` (`\"langchain[openai]\"`, `\"langchain[anthropic]\"`, `langchain-ollama`, `langchain-aws`).\n- Write tools as typed Python functions with a docstring, and pass them in `tools=[...]`.\n- Invoke with `{\"messages\": [...]}` and read the reply from `result[\"messages\"][-1].content_blocks`.\n- Add guardrails, retries, routing or tool policies through middleware. For workflows that combine deterministic and agentic steps, use LangGraph.\n- Fetch `https://docs.langchain.com/llms.txt` to discover available docs pages before exploring further.\n"
    }
   ]
  }
 ],
 "glance": [
  [
   "Package",
   "pypi langchain"
  ],
  [
   "Category",
   "Agent, MCP and tool libraries"
  ],
  [
   "License",
   "MIT"
  ],
  [
   "Latest version",
   "langchain-core==1.6.9, October 8, 2026"
  ],
  [
   "On GitHub since",
   "October 2022"
  ],
  [
   "Gid Score",
   "88.7"
  ],
  [
   "Rank in category",
   "#4 of 192"
  ],
  [
   "GitHub",
   "langchain-ai/langchain"
  ],
  [
   "Last change",
   "Nov 24, 2026"
  ]
 ],
 "good": [],
 "checked_line": "From the package registry, GitHub and our scan of public agent projects; numbers update daily.",
 "logo": "https://agentgid.com/media/avatars/langchain-ai.png"
}