Langchain Typescript Quickstart
LangChainOfficialPublished by LangChain
- Skill
- Workflow
- Data and AI
- MIT
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a structured workflow for developers to initialize a local LangChain agent using TypeScript. It ensures adherence to the official documentation while maintaining a clean project structure. The process includes selecting a preferred LLM provider, setting up a dedicated directory, managing environment variables securely, and executing a functional weather agent example.
What it does
- Initializes a new project directory for LangChain development.
- Prompts the user to select a specific LLM provider and model.
- Configures the project to use the selected model while remaining model-agnostic.
- Sets up a secure .env file for API key management.
- Installs necessary provider-specific packages.
- Executes a sample weather agent to verify the local setup.
When to use it
- When you need to quickly prototype a LangChain agent locally.
- When you want to experiment with different LLM providers using a consistent codebase.
- When you are starting a new project and want to follow official LangChain best practices.
Advantages
- Ensures project isolation by creating a dedicated directory.
- Promotes security by keeping API keys in gitignored environment files.
- Provides flexibility by allowing users to switch between various LLM providers.
- Reduces setup friction by automating the scaffolding process.
Usage examples
- “Help me set up a new LangChain agent in TypeScript.”
- The agent will create a new directory, ask for your preferred model, configure the environment, and run a basic weather agent example.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/langchain-ai/langchain-typescript-quickstart/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip langchain-typescript-quickstart.zip -d .agents/skills
Documentation by LangChain
LangChain TypeScript quickstart
Follow the live docs — do not invent an alternate API from memory:
https://docs.langchain.com/oss/javascript/langchain/quickstart
Fetch that page (Docs MCP or HTTP) and implement what it shows (weather agent + createAgent). Requires Node 22+.
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 LangChain is model-agnostic. 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.Swap the quickstart's model string for their choice (or the default).
Create a new directory (e.g.
langchain-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 the provider package needed for their model if the quickstart's base install isn't enough.
Run the example, show output, then stop. Point to
langchain-fundamentalsfor next steps.
Files
- ATTRIBUTION.mdAdded by AutoGineer924 B
- LICENSELicence file added by AutoGineer1.0 KiB
- SKILL.md1.5 KiB
SKILL.md
LangChain TypeScript quickstart
Follow the live docs — do not invent an alternate API from memory:
https://docs.langchain.com/oss/javascript/langchain/quickstart
Fetch that page (Docs MCP or HTTP) and implement what it shows (weather agent + createAgent). Requires Node 22+.
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 LangChain is model-agnostic. 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.Swap the quickstart's model string for their choice (or the default).
Create a new directory (e.g.
langchain-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 the provider package needed for their model if the quickstart's base install isn't enough.
Run the example, show output, then stop. Point to
langchain-fundamentalsfor next steps.
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs an API key
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- LangChain
- Publisher
- LangChain (Official)
- Source
- langchain-ai/langchain-skills · config/skills/langchain-typescript-quickstart · commit 126c384
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by LangChain.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download langchain-typescript-quickstart.zip