langgraph-python-quickstart

作者: langchain-ai

按照官方快速入門指南,在 Python 中搭建一個最小化的本地 LangGraph 代理程式。當使用者想要快速建置或試用 LangGraph 代理程式時使用…

npx skills add https://github.com/langchain-ai/langchain-skills --skill langgraph-python-quickstart

LangGraph Python quickstart

Follow the live docs — do not invent an alternate API from memory:

https://docs.langchain.com/oss/python/langgraph/quickstart

Fetch that page (Docs MCP or HTTP) and implement what it shows (calculator / math agent with the Graph API). Prefer the Graph API path over the Functional API unless the user asks otherwise. Skip IPython graph visualization.

Local setup constraints

Apply these on top of the quickstart (they keep setup minimal and model-agnostic):

  1. Ask which provider/model to use. Showcase that LangGraph works with any LangChain chat model. Suggested prompt:

    Which model should this agent use? Pass a provider:model string — e.g. openai:gpt-5.5, anthropic:claude-sonnet-5, google_genai:gemini-2.5-flash-lite. Default if you're unsure: anthropic:claude-sonnet-5.

    The docs often hardcode Anthropic — replace with init_chat_model("<MODEL>") (or equivalent) using their choice. If using Claude Sonnet 5+, omit temperature / top_p / top_k (unsupported).

  2. Create a new directory (e.g. langgraph-agent/) and do all work there — do not pollute the open project.

  3. Only secret: the provider API key in .env (gitignored). No LangSmith / Tavily unless they ask. Prefer they edit .env themselves — don't paste keys into chat.

  4. Install packages from the quickstart plus the provider package for their model.

  5. Run the example (e.g. “Add 3 and 4.”), show output, then stop. Point to langgraph-fundamentals for next steps. For a higher-level agent API, use LangChain create_agent instead.

來自 langchain-ai 的更多技能

deepagents-thread-inspector
langchain-ai
檢查並解釋本地 Deep Agents Code SQLite 工作階段儲存庫中的對話。當 LangSmith 追蹤工具不可用時作為備用方案,用於…
deepagents-python-quickstart
langchain-ai
按照官方快速入門,在 Python 中搭建一個最小的本地 Deep Agent,使用提供者原生的網路搜尋而非 Tavily。當使用者想要……時使用。
deepagents-typescript-quickstart
langchain-ai
按照官方快速入門指南,以 TypeScript 搭建一個最小的本地 Deep Agent,使用供應商原生的網路搜尋而非 Tavily。當使用者……時使用
eval-engineering
langchain-ai
反覆檢查 agent 儲存庫與使用者提供的可選追蹤資料,訪談使用者,並逐一建立、執行及稽核 Harbor evals。用於……
LangChain RAG Pipeline
langchain-ai
在構建任何檢索增強生成(RAG)系統時,請調用此技能。涵蓋文檔加載器、遞迴字符文本分割器、嵌入(OpenAI)等。
LangChain Structured Output & HITL
langchain-ai
langchain-structured-output-&-hitl — 一個可安裝的 AI 代理技能,由 langchain-ai/langchain-skills 發布。
LangSmith Datasets
langchain-ai
當從追蹤建立評估資料集,或將資料集上傳至 LangSmith,或查詢資料集時,請調用此技能。涵蓋資料集類型(final_response、…)
langsmith-evaluator
langchain-ai
在為 LangSmith 建立評估管道時,請調用此技能。涵蓋三個核心組件:(1) 建立評估器 - LLM 作為評審、自訂程式碼;(2)…