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- Python installed locally
- API key for your chosen LLM provider (OpenAI, Anthropic, Google, etc.)
- Basic familiarity with Python and command-line tools
How to use langgraph-python-quickstart
- 1.Choose your LLM provider and model (e.g., anthropic:claude-sonnet-5)
- 2.Create a new directory for the agent project
- 3.Install required packages (langgraph, langchain, and provider-specific packages)
- 4.Set up a .env file with your API key
- 5.Run the scaffolded agent with a test query (e.g., 'Add 3 and 4')
- 6.Review the output and refer to langgraph-fundamentals for next steps
Use cases
- 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
- Python developers new to LangGraph
- Teams evaluating LangGraph for agent workflows
- Developers wanting a quick local setup without external services
langgraph-python-quickstart FAQ
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().
No. This quickstart creates a minimal setup without external services. Add them only if you explicitly need tracing or web search capabilities.
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.
Once the calculator agent works, refer to langgraph-fundamentals for building more complex agents, or use LangChain's create_agent for higher-level abstractions.
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):
-
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:modelstring — 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+, omittemperature/top_p/top_k(unsupported). -
Create a new directory (e.g.
langgraph-agent/) and do all work there — do not pollute the open project. -
Only secret: the provider API key in
.env(gitignored). No LangSmith / Tavily unless they ask. Prefer they edit.envthemselves — don't paste keys into chat. -
Install packages from the quickstart plus the provider package for their model.
-
Run the example (e.g. “Add 3 and 4.”), show output, then stop. Point to
langgraph-fundamentalsfor next steps. For a higher-level agent API, use LangChaincreate_agentinstead.
Related skills
More from langchain-ai/langchain-skills and the wider catalog.

langgraph-typescript-quickstart
Scaffold a minimal LangGraph agent in TypeScript from the official quickstart.

langsmith-online-eval-engineering
Iteratively build and test LangSmith online evaluators by inspecting traces and interviewing users.

managed-deep-agents
Build, test, and deploy Managed Deep Agents in LangSmith with the mda CLI.

swarm
Dispatch many independent items in parallel across subagents and aggregate results.

langsmith-dataset
Create, manage, and upload evaluation datasets to LangSmith for testing and validation.

langsmith-evaluator
Build and run evaluation pipelines for LangSmith with LLM judges and custom code evaluators.