langgraph-typescript-quickstart
langchain-ai/langchain-skills
Scaffold a minimal LangGraph agent in TypeScript from the official quickstart.
What is langgraph-typescript-quickstart?
Quickly set up a local LangGraph agent in TypeScript by following 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.
- Scaffolds a minimal LangGraph agent using the Graph API
- Supports any LangChain-compatible chat model (OpenAI, Anthropic, Google, etc.)
- Creates a calculator/math agent example that you can run locally
- Sets up a new isolated project directory to avoid polluting existing code
- Configures environment variables for API keys securely
How to install langgraph-typescript-quickstart
npx skills add https://github.com/langchain-ai/langchain-skills --skill langgraph-typescript-quickstart- Node.js and npm installed
- API key for your chosen LLM provider (OpenAI, Anthropic, Google, etc.)
- Basic familiarity with TypeScript
How to use langgraph-typescript-quickstart
- 1.Run the install command to add the skill
- 2.Choose your LLM provider and model (e.g., anthropic:claude-sonnet-5)
- 3.Provide your API key in the generated .env file
- 4.Run the example agent (e.g., ask it to add 3 and 4)
- 5.Review the output and refer to langgraph-fundamentals for next steps
Use cases
- Quickly prototype a LangGraph agent locally without complex setup
- Learn LangGraph fundamentals with a working calculator example
- Test LangGraph with your preferred LLM provider
- Build a foundation for more advanced agent workflows
- TypeScript developers new to LangGraph
- Teams evaluating LangGraph for agent development
- Developers wanting to test multi-step reasoning with tools
langgraph-typescript-quickstart FAQ
Any LangChain-compatible model works. The default suggestion is anthropic:claude-sonnet-5, but you can use openai:gpt-4, google-genai:gemini-2.5-flash-lite, or others. Pass it as provider:model.
No. This quickstart keeps setup minimal with only the API key required. LangSmith and Tavily are optional for advanced features.
In a new isolated directory (e.g., langgraph-agent/) created by the skill, keeping your existing project clean.
The skill runs one example and stops. Refer to langgraph-fundamentals for deeper learning or use LangChain createAgent for higher-level agent APIs.
The skill defaults to Graph API per the official quickstart, but you can modify the generated code to use Functional API if preferred.
Full instructions (SKILL.md)
Source of truth, from langchain-ai/langchain-skills.
name: langgraph-typescript-quickstart description: "Scaffold a minimal local LangGraph agent in TypeScript by following the official quickstart. Use when the user wants to quickly build or try a LangGraph agent locally."
LangGraph TypeScript quickstart
Follow the live docs — do not invent an alternate API from memory:
https://docs.langchain.com/oss/javascript/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 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
initChatModel("<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 LangChaincreateAgentinstead.
Related skills
More from langchain-ai/langchain-skills and the wider catalog.

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.

deep-agents-core
Framework for building multi-step AI agents with built-in planning, memory, and skill management

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.