langchain-multi-env-setup

Featured

Configure LangChain across dev/staging/production environments with isolated API keys, environment-specific settings, and secrets. Trigger: "langchain environments", "langchain staging", "langchain dev prod", "environment configuration", "langchain env setup".

AI & Automation 2,266 stars 315 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# LangChain Multi-Environment Setup ## Overview Configure LangChain across development, staging, and production with separate API keys, environment-specific model settings, LangSmith project isolation, and validated configuration. ## Environment Strategy | Environment | API Key Source | Model | LangSmith Project | Cache | |-------------|---------------|-------|-------------------|-------| | Development | `.env.local` | gpt-4o-mini | `dev-{user}` | Off | | Staging | CI secrets | gpt-4o-mini | `staging` | Redis | | Production | Secret Manager | gpt-4o | `production` | Redis | ## Step 1: Configuration with Zod Validation ```typescript // config/langchain.ts import { z } from "zod"; import "dotenv/config"; const EnvironmentSchema = z.enum(["development", "staging", "production"]); const ConfigSchema = z.object({ environment: EnvironmentSchema, openaiApiKey: z.string().min(1, "OPENAI_API_KEY is required"), model: z.string().default("gpt-4o-mini"), temperature: z.number().min(0).max(2).default(0), maxRetries: z.number().default(3), timeout: z.number().default(30000), langsmith: z.object({ enabled: z.boolean(), apiKey: z.string().optional(), project: z.string(), }), cache: z.object({ enabled: z.boolean(), ttlSeconds: z.number().default(300), }), }); export type LangChainConfig = z.infer<typeof ConfigSchema>; function detectEnvironment(): z.infer<typeof EnvironmentSchema> { const env = process.env.NODE_ENV ?? "development"; if (en...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

langfuse-multi-env-setup

Configure Langfuse across development, staging, and production environments. Use when setting up multi-environment deployments, configuring per-environment keys, or implementing environment-specific Langfuse configurations. Trigger with phrases like "langfuse environments", "langfuse staging", "langfuse dev prod", "langfuse environment setup", "langfuse config by env".

2,266 Updated today
jeremylongshore
AI & Automation Featured

langchain-prod-checklist

Production readiness checklist for LangChain applications. Use when preparing for launch, validating deployment readiness, or auditing existing production LangChain systems. Trigger: "langchain production", "langchain prod ready", "deploy langchain", "langchain launch checklist", "go-live langchain".

2,266 Updated today
jeremylongshore
AI & Automation Featured

linear-multi-env-setup

Configure Linear across development, staging, and production environments. Use when setting up per-environment API keys, secret management, or environment-specific Linear configurations. Trigger: "linear environments", "linear staging", "linear dev prod", "linear environment setup", "multi-environment linear".

2,266 Updated today
jeremylongshore
AI & Automation Featured

apollo-multi-env-setup

Configure Apollo.io multi-environment setup. Use when setting up development, staging, and production environments, or managing multiple Apollo configurations. Trigger with phrases like "apollo environments", "apollo staging", "apollo dev prod", "apollo multi-tenant", "apollo env config".

2,266 Updated today
jeremylongshore
AI & Automation Featured

langchain-local-dev-loop

Configure LangChain local development workflow with testing and mocks. Use when setting up dev environment, creating test fixtures with mocked LLMs, or establishing a rapid iteration workflow for LangChain apps. Trigger: "langchain dev setup", "langchain local development", "langchain testing", "langchain mock", "test langchain chains".

2,266 Updated today
jeremylongshore