Labsco
langchain-ai logo

langchain-dependencies

108

by langchain-ai · part of langchain-ai/skills-benchmarks

INVOKE THIS SKILL when setting up a new project or when asked about package versions, installation, or dependency management for LangChain, LangGraph,…

🔥🔥🔥🔥✓ VerifiedFreeQuick setup
🧩 One of 7 skills in the langchain-ai/skills-benchmarks package — works on its own, and pairs well with its siblings.

This is the playbook your agent receives when the skill activates — you don't need to read it to use the skill, but it's here to audit before installing.


name: langchain-dependencies description: "INVOKE THIS SKILL when setting up a new project or when asked about package versions, installation, or dependency management for LangChain, LangGraph, LangSmith, or Deep Agents. Covers required packages, minimum versions, environment requirements, versioning best practices, and common community tool packages for both Python and TypeScript."

<overview> The LangChain ecosystem is split into focused, independently-versioned packages. Understanding which packages you need — and their version constraints — prevents incompatibilities and keeps upgrades predictable.

Key principles:

  • LangChain 1.0 is the current LTS release. Always start new projects on 1.0+. LangChain 0.3 is legacy maintenance-only — do not use it for new work.
  • langchain-core is the shared foundation: always install it explicitly alongside any other package.
  • langchain-community (Python only) does NOT follow semantic versioning; pin it conservatively.
  • LangGraph vs Deep Agents: choose one orchestration approach based on your use case — they are alternatives, not a required stack (see Framework Choice below).
  • Provider integrations (model, vector store, tools) are installed separately so you only pull in what you use. </overview>

Framework Choice

<framework-choice> Pick **one** agent orchestration layer. You do not need both.
FrameworkWhen to useCore extra package
LangGraphNeed fine-grained graph control, custom workflows, loops, or branchinglanggraph / @langchain/langgraph
Deep AgentsWant batteries-included planning, memory, file context, and skills out of the boxdeepagents (depends on LangGraph; installs it as a transitive dep)

Both sit on top of langchain + langchain-core + langsmith. </framework-choice>


Core Packages

<python-packages>

Python — always required

PackageRoleMin version
langchainAgents, chains, retrieval1.0
langchain-coreBase types & interfaces (peer dep)1.0
langsmithTracing, evaluation, datasets0.3.0

Python — orchestration (pick one)

PackageUse whenMin version
langgraphBuilding custom graphs directly1.0
deepagentsUsing the Deep Agents frameworklatest

Python — model providers (pick the one(s) you use)

PackageProvider
langchain-openaiOpenAI (GPT-4o, o3, …)
langchain-anthropicAnthropic (Claude)
langchain-google-genaiGoogle (Gemini)
langchain-mistralaiMistral
langchain-groqGroq (fast inference)
langchain-cohereCohere
langchain-fireworksFireworks AI
langchain-togetherTogether AI
langchain-huggingfaceHugging Face Hub
langchain-ollamaOllama (local models)
langchain-awsAWS Bedrock
langchain-azure-aiAzure AI Foundry

Python — common tool & retrieval packages

These packages have tighter compatibility requirements — use the latest available version unless you have a specific reason not to.

PackageAddsNotes
langchain-tavilyTavily web search (TavilySearch)Dedicated integration package; prefer latest
langchain-text-splittersText chunking utilitiesSemver, keep current
langchain-community1000+ integrations (fallback)NOT semver — pin to minor series
faiss-cpuFAISS vector store (local)Via langchain-community; use latest
langchain-chromaChroma vector storeDedicated integration package; prefer latest
langchain-pineconePinecone vector storeDedicated integration package; prefer latest
langchain-qdrantQdrant vector storeDedicated integration package; prefer latest
langchain-weaviateWeaviate vector storeDedicated integration package; prefer latest
langsmith[pytest]pytest plugin for LangSmithRequires langsmith >= 0.3.4

langchain-community stability note: This package is NOT on semantic versioning. Minor releases can contain breaking changes. Prefer dedicated integration packages (e.g. langchain-chroma, langchain-tavily) when they exist — they are independently versioned and more stable.

</python-packages> <typescript-packages>

TypeScript — always required

PackageRoleMin version
@langchain/coreBase types & interfaces (peer dep)1.0
langchainAgents, chains, retrieval1.0
langsmithTracing, evaluation, datasets0.3.0

TypeScript — orchestration (pick one)

PackageUse whenMin version
@langchain/langgraphBuilding custom graphs directly1.0
deepagentsUsing the Deep Agents frameworklatest

TypeScript — model providers (pick the one(s) you use)

PackageProvider
@langchain/openaiOpenAI (GPT-4o, o3, …)
@langchain/anthropicAnthropic (Claude)
@langchain/google-genaiGoogle (Gemini)
@langchain/mistralaiMistral
@langchain/groqGroq (fast inference)
@langchain/cohereCohere
@langchain/awsAWS Bedrock
@langchain/azure-openaiAzure OpenAI
@langchain/ollamaOllama (local models)

TypeScript — common tool & retrieval packages

PackageAddsNotes
@langchain/tavilyTavily web search (TavilySearch)Dedicated integration package; prefer latest
@langchain/communityBroad set of community integrationsUse sparingly; prefer dedicated packages
@langchain/pineconePinecone vector storeDedicated integration package; prefer latest
@langchain/qdrantQdrant vector storeDedicated integration package; prefer latest
@langchain/weaviateWeaviate vector storeDedicated integration package; prefer latest

@langchain/core must be installed explicitly in yarn workspaces and monorepos — it is a peer dependency and will not always be hoisted automatically.

</typescript-packages>

Minimal Project Templates

<ex-langgraph-python> <python> Minimal dependency set for a LangGraph project (provider-agnostic). ``` # requirements.txt langchain>=1.0,<2.0 langchain-core>=1.0,<2.0 langgraph>=1.0,<2.0 langsmith>=0.3.0

Add your model provider, e.g.:

langchain-openai

langchain-anthropic

langchain-google-genai

</python>
</ex-langgraph-python>

<ex-langgraph-typescript>
<typescript>
Minimal package.json dependencies for a LangGraph project (provider-agnostic).
```json
{
  "dependencies": {
    "@langchain/core": "^1.0.0",
    "langchain": "^1.0.0",
    "@langchain/langgraph": "^1.0.0",
    "langsmith": "^0.3.0"
  }
}
</typescript> </ex-langgraph-typescript> <ex-deepagents-python> <python> Minimal dependency set for a Deep Agents project (provider-agnostic). ``` # requirements.txt deepagents # bundles langgraph internally langchain>=1.0,<2.0 langchain-core>=1.0,<2.0 langsmith>=0.3.0

Add your model provider, e.g.:

langchain-anthropic

langchain-openai

</python>
</ex-deepagents-python>

<ex-deepagents-typescript>
<typescript>
Minimal package.json dependencies for a Deep Agents project (provider-agnostic).
```json
{
  "dependencies": {
    "deepagents": "latest",
    "@langchain/core": "^1.0.0",
    "langchain": "^1.0.0",
    "langsmith": "^0.3.0"
  }
}
</typescript> </ex-deepagents-typescript> <ex-with-tools-python> <python> Adding Tavily search and a vector store to a LangGraph project. ``` # requirements.txt langchain>=1.0,<2.0 langchain-core>=1.0,<2.0 langgraph>=1.0,<2.0 langsmith>=0.3.0

Web search

langchain-tavily # use latest; partner package, semver

Vector store — pick one:

langchain-chroma # use latest; partner package, semver

langchain-pinecone # use latest; partner package, semver

langchain-qdrant # use latest; partner package, semver

Text processing

langchain-text-splitters # use latest; semver

Your model provider:

langchain-openai / langchain-anthropic / etc.

</python>
</ex-with-tools-python>

<ex-with-tools-typescript>
<typescript>
Adding Tavily search and a vector store to a LangGraph project.
```json
{
  "dependencies": {
    "@langchain/core": "^1.0.0",
    "langchain": "^1.0.0",
    "@langchain/langgraph": "^1.0.0",
    "langsmith": "^0.3.0",
    "@langchain/tavily": "latest",
    "@langchain/pinecone": "latest"
  }
}
</typescript> </ex-with-tools-typescript>

Environment Variables

<environment-variables> All keys are read from the environment at runtime. Set only the keys for services you actually use.
# LangSmith (always recommended for observability)
LANGSMITH_API_KEY=<your-key>
LANGSMITH_PROJECT=<project-name>   # optional, defaults to "default"

# Model provider — set the one(s) you use
OPENAI_API_KEY=<your-key>
ANTHROPIC_API_KEY=<your-key>
GOOGLE_API_KEY=<your-key>
MISTRAL_API_KEY=<your-key>
GROQ_API_KEY=<your-key>
COHERE_API_KEY=<your-key>
FIREWORKS_API_KEY=<your-key>
TOGETHER_API_KEY=<your-key>
HUGGINGFACEHUB_API_TOKEN=<your-key>

# Common tool/retrieval services
TAVILY_API_KEY=<your-key>          # for Tavily search
PINECONE_API_KEY=<your-key>        # for Pinecone
</environment-variables>