Install any skill in seconds. Free to start, no credit card required.
Get Started Free →jeremylongshore/langchain-deploy-integration
Deploy a LangChain 1.0 / LangGraph 1.0 app to Cloud Run, Vercel, or LangServe correctly — timeouts sized for chain length, cold-start mitigation, SSE anti-buffering headers, Secret Manager over `.env`.
Passed 22 of 22 test cases with the skill, and 12 of 22 without it.
and 11 more in the full report
10 fixed12 passed either way0 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 10 test cases the skill fixed. Same model, same prompt, with and without the skill.
I am trying to package and deploy our multi-tool LangGraph agent to GCP Cloud Run using Docker, but we keep running into gateway timeouts and slow cold starts. Could you write out a production multi-stage Dockerfile optimized for fast startup and low image size, along with the complete gcloud command to deploy it with proper secret injection and scale settings? Please format the output as a clean Dockerfile snippet followed by the deployment CLI command and an explanation of key flags used.
| Checked | Without skill | With skill |
|---|---|---|
| Sets the deployment timeout duration to 3600 seconds. | Missed | Passed |
| Includes the `--cpu-boost` flag for startup acceleration. | Missed | Passed |
| Disables CPU throttling to maintain background execution between keepalives. | Passed | Passed |
The instructions your model reads when the skill loads.
An engineer ships a working LangGraph agent to Vercel. Every non-trivial request
returns FUNCTION_INVOCATION_TIMEOUT. The Python runtime on Vercel defaults to
a 10-second cap (P35) — a three-tool agent with one RAG round easily runs
20-40s. Local dev never exposed the wall because uvicorn on a laptop has no
timeout. Two fixes apply together and each is load-bearing:
// vercel.json — the baseline cap bump (Pro plan max is 60s, Enterprise 900s)
{ "functions": { "api/chat.py": { "maxDuration": 60 } } }
# app/api/chat.py — stream the response so partial output arrives before the cap
from fastapi.responses import StreamingResponse
@app.post("/api/chat")
async def chat(req: ChatRequest):
async def gen():
async for chunk in chain.astream(req.input):
yield f"data: {chunk.model_dump_json()}\n\n"
return StreamingResponse(gen(), media_type="text/event-stream",
headers={"X-Accel-Buffering": "no"})
The maxDuration: 60 raises the Vercel-imposed wall; streaming reduces
time-to-first-byte to under a second so the user sees progress even on a
40-second completion. Once the Vercel cap is fixed, the next three walls are:
Cloud Run cold starts (5-15s p99 on Python + LangChain — P36), .env
secrets leaking via docker exec <pod> env (P37), and SSE streams hanging
because Nginx / Cloud Run buffer the final chunk (P46).
This skill walks through a production-grade multi-stage Dockerfile, Cloud Run
flags for cold-start mitigation, Vercel maxDuration + streaming, LangServe
route mounting with FastAPI lifespan, SSE anti-buffering headers, and Secret
Manager via pydantic.SecretStr. Pin: langchain-core 1.0.x, langgraph 1.0.x,
langserve 1.0.x. Pain-catalog anchors: P35 (Vercel 10s default),
test cases passed, vs 12 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.