Wait What?An index of technical studies
Technical study / langgraph-cliAI Orchestration

LangGraph CLI

Developing and deploying AI workflows with LangGraph: use cases, resumption with human review, and adoption criteria.

Reading / langgraph-cliAI Orchestration
Primary theme
AI Orchestration
Secondary themes
Deployment · Human review
Created
Updated

The benefit is not making a model answer better; it is running an AI workflow as a service, with tracked executions, saved state, and human decisions that may come after the initial request.

What the CLI provides

  • LangGraph defines the workflow in Python or TypeScript: state, steps, transitions, and optional calls to a model or tools. The graph can run directly in a script or an existing backend, without a CLI.
  • LangGraph CLI reads langgraph.json, which maps identifiers to exported graphs and declares the application environment. It creates a project, starts the development server, or builds the server image.
  • LangSmith Agent Server exposes the workflow through an API: a run can be attached to a thread that carries the graph state between calls. The server handles, among other things, the task queue, streaming, and checkpoints. Studio is the testing and debugging interface that connects to the server.
Command Use Limitation
langgraph new Create a project from a template. The starter template does not provide business logic.
langgraph dev Test the API without Docker, with automatic reload on port 2024 by default. Local development storage; this does not validate production persistence.
langgraph up Test the image, configuration, and persistence with Docker, PostgreSQL, and Redis. Heavier; this is not a production deployment procedure.
langgraph build / langgraph dockerfile Build the Agent Server image or generate its Dockerfile. Building the image does not provision the server or its dependencies.
langgraph deploy Deploy to LangSmith. Distinguish this from a self-hosted deployment on your own infrastructure.

The local Python guide assumes Python 3.11 or later and pip install -U "langgraph-cli[inmem]". In a configured project, langgraph dev starts the API and reports the URLs for its documentation and Studio. In TypeScript, the equivalent command is npx @langchain/langgraph-cli dev.

Where to use it in AI

The cases below are use-case hypotheses, not implemented integrations. A workflow with predefined paths can call a model for a specific step without delegating all control to it.

Use case Benefit of the graph or server When to keep it simpler
Document assistant (RAG) Retrieve passages, produce a cited answer, or abstain when sources are insufficient. The server is useful if an interface must track steps live or resume an exchange with the same state. For a search followed by a single answer, a function in the existing backend may suffice. The server does not improve the corpus or citations.
Supervised customer support Classify a ticket, find the applicable procedure, and propose a draft. Human review can resume the same case hours later without generating the draft again. If the support tool already knows the draft status and handles its approval, integrating generation into that tool avoids managing state twice.
Long-running document analysis Extract data, apply deterministic rules, and submit ambiguous cases to a person. The task queue and checkpoints are useful when work exceeds the duration of an HTTP request. If extraction is an independent, replayable job, an existing task queue is often enough.

Example: reviewing a support draft

flowchart TD
    ticket["Ticket received"] --> draft["Find sources and draft a reply"]
    draft --> review["Interrupt and save state"]
    review --> decision{"Resume the same thread after human decision"}
    decision -->|Approved| send["Send through the support system"]
    decision -->|Rejected| close["Close without sending"]

The interruption preserves the draft for review; application code decides what to do with the human response.

On resumption, LangGraph restarts the node containing interrupt(): do not put the send operation in that node before the interruption. The support system must check the approver’s authorization, and sending must be idempotent: replaying the same approval must not create two messages. A checkpoint is neither business authorization nor a guarantee that an external effect runs exactly once. See Interrupts and resumption through the server API.

Connections to other Ideas projects

  • J.A.R.V.I.S. (Ideas project note): a candidate for a bounded workflow that must wait for confirmation and resume later, not a replacement for the real-time voice loop, primary memory, or permission controls. Start in the existing backend; consider a separate Agent Server only if its clients genuinely need a tracking API and independent execution. Self-hosting the server requires checking license terms and outbound traffic, even if the AI model itself runs locally.
  • Trashoscope (Ideas project note): keep the draw deterministic and publication static. A model could suggest new fragments for the editorial bank; that does not justify a LangGraph server unless there is an asynchronous review or editorial workflow to track.

Adoption criterion

Start with a model call or a graph in the existing backend. Test Agent Server if several interfaces need to control the same workflow, if execution must outlive the request that started it, or if someone needs to resume a case after an interruption when the backend cannot already do that.

Recommended first trial: one fictional ticket, one draft, and one approval. First verify in dev that the human response resumes the right thread and that rejection sends nothing. With up, then check that restarting the server while waiting preserves the draft, and that submitting a decision twice produces only one send in the test support system. Finally, compare the infrastructure and code volume with the same solution in the existing backend.

Deployment constraint: the official local workflow requires a LangSmith API key, separate from any model-provider key. The standalone Agent Server guide documents PostgreSQL, Redis, a license key, and outbound access for license verification and usage reporting outside isolated mode. Check these requirements, along with authentication and where traces are sent, before sending real data.

Documentary review: the described capabilities come from official sources; recommendations and connections to Ideas projects remain hypotheses. No Agent Server was run for this study.

Sources