PluginBench
Skill
Review
Audit score 70

langgraph-python-quickstart

langchain-ai/langchain-skills

Scaffold a minimal LangGraph agent in Python following the official quickstart.

What is langgraph-python-quickstart?

Quickly set up a local LangGraph agent in Python by implementing the official quickstart guide. Use this when you want to build or test a LangGraph agent with a calculator/math example, choosing your preferred LLM provider.

  • Creates a new local directory with a minimal LangGraph agent scaffold
  • Implements a calculator/math agent using the Graph API
  • Supports any LangChain-compatible chat model (OpenAI, Anthropic, Google, etc.)
  • Configures environment variables for API keys without exposing secrets
  • Runs a working example agent and displays output

How to install langgraph-python-quickstart

npx skills add https://github.com/langchain-ai/langchain-skills --skill langgraph-python-quickstart
Prerequisites
  • Python installed locally
  • API key for your chosen LLM provider (OpenAI, Anthropic, Google, etc.)
  • Basic familiarity with Python and command-line tools
Claude Code
Cursor
Windsurf
Cline

How to use langgraph-python-quickstart

  1. 1.Choose your LLM provider and model (e.g., anthropic:claude-sonnet-5)
  2. 2.Create a new directory for the agent project
  3. 3.Install required packages (langgraph, langchain, and provider-specific packages)
  4. 4.Set up a .env file with your API key
  5. 5.Run the scaffolded agent with a test query (e.g., 'Add 3 and 4')
  6. 6.Review the output and refer to langgraph-fundamentals for next steps

Use cases

Good for
  • Quickly prototype a LangGraph agent locally for testing or learning
  • Set up a foundation for building more complex multi-step agents
  • Evaluate LangGraph with your preferred LLM provider before scaling
  • Create a minimal working example to understand the Graph API structure
Who it's for
  • Python developers new to LangGraph
  • Teams evaluating LangGraph for agent workflows
  • Developers wanting a quick local setup without external services

langgraph-python-quickstart FAQ

Which LLM provider should I use?

LangGraph works with any LangChain chat model. The quickstart suggests Anthropic Claude Sonnet 5 as a default, but you can use OpenAI, Google GenAI, or others by passing provider:model to init_chat_model().

Do I need LangSmith or Tavily?

No. This quickstart creates a minimal setup without external services. Add them only if you explicitly need tracing or web search capabilities.

Where should I put my API key?

Store it in a .env file in your project directory (which is gitignored). The skill will help you configure it without pasting keys into chat.

What happens after the quickstart example runs?

Once the calculator agent works, refer to langgraph-fundamentals for building more complex agents, or use LangChain's create_agent for higher-level abstractions.

Can I use the Functional API instead of the Graph API?

The quickstart defaults to the Graph API, but you can switch to the Functional API if needed—just follow the docs for that path.

Full instructions (SKILL.md)

Source of truth, from langchain-ai/langchain-skills.


name: langgraph-python-quickstart description: "Scaffold a minimal local LangGraph agent in Python by following the official quickstart. Use when the user wants to quickly build or try a LangGraph agent locally."

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.