• VERSIONING
  • COMPARISON
  • RECOVERY
  • HUMAN

How to retrieve prompt templates with your AI

Connect LangSmith to your AI client to pull specific prompt versions from the LangChain Hub. You can manage and test your prompt logic without leaving your chat interface.

Ask AI about this page

Short answer

How do I get my LangChain Hub prompts into my AI chat?

Your AI uses the LangSmith MCP to fetch versioned templates from the LangChain Hub. You can then ask your agent to use these specific prompts for testing or comparison. This setup gives you immediate access to your prompt library.

Prompt management outcomes.

Where your prompt logic lands.

This connection turns your chat interface into a prompt testing ground.

VERSIONING

Access specific versions

The AI pulls exact iterations of your prompts from the Hub. You can test how a change in wording affects your agent's output.

COMPARISON

Compare prompt logic

Ask your agent to run two different templates against the same input. This helps you see which version performs better in real time.

RECOVERY

Retrieve lost templates

If you need to roll back to a previous prompt, your AI can find it in the Hub. It pulls the historical data so you don't have to manually copy-paste.

HUMAN

Manual prompt edits

The AI can read and fetch templates, but it won't rewrite your saved versions in the Hub. You still control the source of truth in LangSmith.

The workflow

What your AI does when you request a template.

The AI acts as the bridge between your chat and the LangChain Hub.

  1. Locate templates

    The AI scans your LangChain Hub to find the specific prompt names or tags you're looking for.

    list_prompts
  2. Fetch content

    Once identified, the AI retrieves the exact text and configuration of the selected prompt version.

    list_prompts
  3. Apply logic

    The AI loads the retrieved template into its current context so it can follow your specific instructions.

    list_prompts
  4. Verify output

    You review the results to ensure the retrieved prompt behaves as expected before you commit to it.

    list_prompts

Try it

Copy these to start.

Use these prompts to begin interacting with your LangChain Hub templates.

Starting points

Replace the bracketed text with your actual prompt names or Hub tags.

LangSmith Connector

You're all set. Choose your MCP client and follow the setup instructions.

Connector linkhttps://edge.vinkius.com/vk_preview_ixIJrwVWDWlC1bEOf4IyffAPgAEw302Ns6BE1oLo/mcp

Claude Desktop

Follow the steps below to connect in seconds.

  1. 1In Claude Desktop, open Settings → Connectors.
  2. 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
  3. 3Click Add and start a new chat — LangSmith capabilities are ready to use.
Configuration · claude_desktop_config.jsonCopy
{
  "mcpServers": {
    "langsmith-llm-observability-hub-mcp": {
      "url": "https://edge.vinkius.com/vk_preview_ixIJrwVWDWlC1bEOf4IyffAPgAEw302Ns6BE1oLo/mcp"
    }
  }
}
Copy into chat04
  • List all the prompt templates available in my LangChain Hub.

  • Find the prompt template named 'customer_support_v2' and show me its content.

  • Retrieve the latest version of the 'summarizer' prompt from the Hub.

  • Compare the logic between 'template_alpha' and 'template_beta' from my Hub.

  • Claude
  • ChatGPT
  • Cursor
  • VS Code
  • Windsurf
  • Claude Code
  • JetBrains
  • Cline

Start here

Connect LangSmith once, then ask.

Just follow the link to authorize the connection. Your credentials stay encrypted, and you can start pulling prompts immediately.

Connect LangSmith to your AI

FAQ

How this task behaves.

  • 01

    Can the AI edit my templates in the LangChain Hub?

    No. The AI can only retrieve and read the templates. Any changes to your prompt logic must be done manually in LangSmith.

  • 02

    Can I pull prompts from a different user's Hub?

    No. The AI only has access to the Hub associated with your connected LangSmith account.

  • 03

    Does the AI see my entire LangSmith project?

    The AI only accesses the prompt data through the specific tools provided. It doesn't browse your entire project history unless you ask it to list prompts.

  • 04

    How does the AI know which version of a prompt to get?

    You tell the AI which version you want, or it will default to the latest version if you only provide the template name.

  • 05

    Can I use these prompts in other AI clients?

    Yes. Once you've connected the MCP, you can use these prompts in any compatible client like Claude, Cursor, or Windsurf.

  • More questions about LangSmith? See everything the LangSmith Connector can do

Connect LangSmith to Claude, Cursor, ChatGPT & more