Skip to content

Next Term for LangChain and LangGraph

There is nothing LangChain-specific to install. This page collects what Next Term’s editor and terminal already do for LangChain and LangGraph projects, and for other RAG projects (LlamaIndex, Haystack, CrewAI), and how to give your agents LangSmith.

Prompt templates mostly live in Python strings, and the editor colours what is inside them:

  • Placeholders such as {context} and {question} in a ChatPromptTemplate or any other string get their own colour, apart from the prompt’s text.
  • Jinja and Mustache templates inside Python strings colour as templates: {% for doc in documents %}, {{ doc.content }}, {# a note #}, {{name}}. This works in plain, triple-quoted and raw strings. f-strings, where braces are Python, and docstrings are left alone, and an escaped JSON example such as {{"nodes": [...]}} is not taken for a template.
  • Template files colour too: .jinja, .j2 and .jinja2, Prompty (.prompty, with its front matter and system:/user: lines), Dotprompt (.prompt), Mustache and Handlebars.
FilesHow they open
langgraph.json, package.jsonJSON
pyproject.toml, uv.lock, poetry.lock, PipfileTOML, keys coloured
requirements.txt, requirements-dev.txt, constraints.txtpip requirements
.env, .env.example, env.exampledotenv, keys coloured
SKILL.md, AGENTS.md, Cursor rules (.mdc)Markdown, front matter and code fences coloured from the moment the file opens
.mmd, and mermaid code fencesMermaid, as graph.get_graph().draw_mermaid() writes it
.cypher (Neo4j), .rq (SPARQL), .ttl (Turtle)Their own grammars
.ipynbA notebook view (below)
.jsonl, .csv, .tsv over 2 MBA head view of the first rows (below)

See 112 grammars for every language they cover.

A Jupyter notebook opens as a notebook, read-only: Markdown laid out, code cells coloured in the kernel’s language, and each cell’s saved output below it, errors in red and images scaled to fit. Nothing runs; Next Term has no kernel. Open as JSON opens the file itself, and the view follows the file when an agent or Jupyter saves it. See Jupyter notebooks.

Evaluation sets, traces exported as JSON Lines and CSV results get big. A .jsonl, .ndjson, .csv or .tsv file over 2 MB opens in a read-only head view: the first 1,000 rows as a table, as quickly for a 2 GB file as for a small one, with a column per top-level key in JSON Lines.

  • A line that is not JSON is marked in red with the reason; the rest of the file still reads.
  • Load More reads the next 1,000 rows, and Search filters the loaded ones.
  • Copy As copies the selected rows as JSON or CSV, and ⌥⌘K sends the file to your agent at the selected rows’ lines.

Smaller files open in the editor, with colours. See Large data files.

Run langgraph dev (or npm run dev, uvicorn, langgraph up) in a tab. Once it prints its address, the tab’s title shows the port, such as “langgraph · :2024”, and File › Open Served URL opens http://127.0.0.1:2024 in your browser.

  • No spinner while it serves. The spinner is for agents. A server that stops with an error while you are in another tab gets a red cross.
  • Links in its output open with ⌘-click: the API, the API docs and the Studio UI. The Studio link, with the server’s address nested inside it (https://smith.langchain.com/studio/?baseUrl=http://127.0.0.1:2024), is found as one link, and so are LangSmith run links, Weights & Biases Weave links and MLflow run links.
  • Studio opens where it works. Safari cannot load Studio for a server on your Mac: it blocks an HTTPS page from reaching plain-HTTP 127.0.0.1, and Studio says “Failed to load assistants”. So when Safari is your default browser, a ⌘-click on a Studio link for a server on your Mac (smith.langchain.com/studio, eu.smith.langchain.com/studio, or your own LangSmith’s, with a baseUrl on 127.0.0.1, localhost, 0.0.0.0 or [::1]) opens it in Chrome, Edge, Brave or Arc, the first of them that is installed. Every other link opens in your default browser.
    • In Chrome 142 and later, allow “Local network access” in the site’s settings the first time.
    • With none of them installed, the link opens in Safari, and Next Term says once why Studio may not load there. Then start the server with langgraph dev --tunnel and add the tunnel’s address to Studio’s allowed origins; a Studio link through a tunnel opens in Safari.
    • langgraph dev opens Studio in your default browser by itself when it starts, and Next Term cannot change that. With Safari, start it with --no-browser and ⌘-click the Studio link instead.
    • Settings › Terminal › Links turns this off.
  • Agents can run it too. An orchestrating agent can start langgraph dev in a new tab (new_tab), find its address in list_tabs (served_url) and read its output (read_tab). See Orchestrate agents (MCP).

⌘-click a path in terminal output to open it in the editor:

  • A Python traceback’s File "/…/src/agent/graph.py", line 42, in call_model opens at line 42, at the frame you clicked.
  • pytest’s tests/test_graph.py:42: and ruff’s graph.py:42:7: open at their line.
  • A graph reference as langgraph.json writes it, ./src/agent/graph.py:graph, opens at the definition of graph: a def, a class, or an assignment such as graph = builder.compile().
  • Agent session titles in the Welcome window show ••• in place of a LangSmith key (lsv2_pt_…, lsv2_sk_…), and of OpenAI, Anthropic, Hugging Face, Groq, Tavily, Replicate, xAI and Pinecone keys.
  • Imports never bring over a value that looks like a key.
  • The MCP tools never read environment files (.env, .env.local, prod.env; .env.example is read), and mask keys in the file text, search results and diffs they hand an agent.
  • The IDE link never sends a selection from a .env file to Claude Code, Gemini CLI, Qwen Code, Copilot CLI or OpenCode.
  • Keys out of .env: store OPENAI_API_KEY and LANGSMITH_API_KEY in Secrets and start the server with nxtrm secret run OPENAI_API_KEY LANGSMITH_API_KEY -- langgraph dev. The keys reach only that command, once you approve with Touch ID or your password.

What Next Term does not do: it does not hide keys a program prints on the terminal’s screen, and an agent can still read .env with its own tools. Keys you stored in Secrets are masked as •••, best effort, when an agent reads the screen through Next Term. See Security and privacy.

In a git repository, Go to File and Find in Files list the files git does, so your .gitignore decides (LangGraph’s project template ignores .langgraph_api/). Outside a repository they skip the state that LangGraph, MLflow, Weights & Biases and Jupyter write next to a project: .langgraph_api, mlruns, mlartifacts, wandb and .ipynb_checkpoints, along with .venv, __pycache__ and node_modules.

Next Term does not add LangSmith’s MCP server, or any other vendor’s, to your agents’ settings: its own MCP server is for running agents. LangChain publishes its own way in for each agent (LangSmith Remote MCP):

  • Claude Code: in Claude Code, /plugin marketplace add langchain-ai/langchain-plugins, then /plugin install langsmith-mcp@langchain-plugins for the hosted MCP server, or langsmith-skills@langchain-plugins for LangSmith’s skills. Or add the server yourself, then run /mcp in Claude Code to sign in:

    Terminal window
    claude mcp add --transport http -s user langsmith https://api.smith.langchain.com/mcp

    Accounts in the EU use https://eu.api.smith.langchain.com/mcp.

  • Codex: LangSmith’s docs say its hosted MCP server does not work with Codex, and point to the langsmith command-line tool instead. LangSmith’s skills come to Codex through the same plugin marketplace, langchain-ai/langchain-plugins: codex plugin marketplace add langchain-ai/langchain-plugins, then codex plugin add langsmith-skills@langchain-plugins.

If traces do not arrive in LangSmith, check three things the Python SDK is strict about:

  • LANGSMITH_TRACING=true must be lowercase; True does nothing.
  • A leftover LANGCHAIN_TRACING_V2=false turns tracing off, even with LANGSMITH_TRACING=true.
  • LANGSMITH_ENDPOINT takes no trailing slash.