Capability · Framework — orchestration

LangChain Hub

LangChain Hub is the 'npm for prompts' of the LangChain ecosystem. Prompts live as versioned, taggable objects inside LangSmith and can be pulled into code with a single API call. Public-hub contributors share common patterns (ReAct, self-ask, RAG); private workspaces host team prompts behind auth. Hub + LangSmith tracing is one of the most polished prompt-lifecycle workflows in use today.

Framework facts

Category
orchestration
Language
Python / TypeScript
License
Hosted SaaS (clients are MIT)

Install

pip install langchain langsmith
export LANGSMITH_API_KEY=lsv2-...

Quickstart

from langchain import hub
from langchain_anthropic import ChatAnthropic

# pull a well-known public prompt
prompt = hub.pull('hwchase17/react')
chain = prompt | ChatAnthropic(model='claude-opus-4-7')
print(chain.invoke({'input':'What is MCP?','agent_scratchpad':'','tools':'','tool_names':''}).content)

Alternatives

  • Humanloop — prompt management with non-dev editors
  • Braintrust — versioned prompts + evals
  • PromptLayer — prompt registry alternative
  • Local prompts in git — the zero-dependency baseline

Frequently asked questions

Is LangChain Hub open-source?

No — the registry is hosted inside LangSmith. The client APIs are open-source as part of the LangChain packages.

Can I use Hub without LangChain?

You can pull prompt JSON via REST or the LangSmith SDK and use the text however you like. But `hub.pull` is most useful with LangChain's Runnables because it returns instantiated prompt objects.

Sources

  1. LangChain Hub docs — accessed 2026-04-20
  2. LangSmith — accessed 2026-04-20