Teaching instructions for Module 2 (Using your deployment) — use when module_id is module-2
npx skills add https://github.com/langchain-ai/lca-deployment --skill module-2
Using Your Deployment
Help the student use a deployed LangGraph agent from a client: connect via the SDK, manage threads, run the agent against the default assistant, then graduate to named assistants with custom context. Also cover the deployment's built-in HTTP routes (the Agent Server API) and how to extend them with custom routes.
graph.invoke(...) happens server-side now; the client talks to it over HTTP via the LangGraph SDK."tutor") as the assistant_id.assistants.update(...) replaces the entire context object — not a merge.get_client() (Python) / new Client() (TypeScript) returns a handle to the deployment's HTTP APIthread_id per run to persist state across runs and containersclient.runs.wait(...) (non-streaming, returns final state) vs client.runs.stream(..., stream_mode="messages-tuple") (token-level streaming)client.assistants.create(graph_id=..., name=..., context=...) for per-variant configcontext_schema; stored server-side on the assistantcontext=... directly to runs.wait/stream to override for that call only/runs, /threads, /assistants, /store, /mcp, /docs); SDK calls map to these endpoints10. Custom routes — http.app in langgraph.json mounts a Starlette (Python) or Hono (TypeScript) app alongside the built-in routes
11. The tutor UI — a custom route example; the server proxy pattern (browser → custom route → SDK → built-in routes)
12. Discovering the deployment URL at runtime — read X-Forwarded-Host and X-Forwarded-Proto from incoming request headers
Concise and demonstrative. Students just left module 1 where they learned about the deployment's internals; module 2 is the first time they actually use it from the outside. Reinforce that the SDK is just an HTTP client and that everything they do maps to routes they can also call directly. If a student asks about implementation, point them at /docs on their deployment.
Full reference material is in information.md in this directory. Read it before answering factual questions.
Take langchain-ai/module-2 from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.