When building agents with LangChain locally, it’s helpful to visualize what’s happening inside your agent, interact with it in real-time, and debug issues as they occur. LangSmith Studio is a free visual interface for developing and testing your LangChain agents from your local machine. Studio connects to your locally running agent to show you each step your agent takes: the prompts sent to the model, tool calls and their results, and the final output. You can test different inputs, inspect intermediate states, and iterate on your agent’s behavior without additional code or deployment. This pages describes how to set up Studio with your local LangChain agent.Documentation Index
Fetch the complete documentation index at: https://docs.langchain.com/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before you begin, ensure you have the following:- A LangSmith account: Sign up (for free) or log in at smith.langchain.com.
- A LangSmith API key: Follow the Create an API key guide.
- If you don’t want data traced to LangSmith, set
LANGSMITH_TRACING=falsein your application’s.envfile. With tracing disabled, no data leaves your local server.
Set up local Agent server
1. Install the LangGraph CLI
The LangGraph CLI provides a local development server (also called Agent Server) that connects your agent to Studio.2. Prepare your agent
If you already have a LangChain agent, you can use it directly. This example uses a simple email agent:agent.py
3. Environment variables
Studio requires a LangSmith API key to connect your local agent. Create a.env file in the root of your project and add your API key from LangSmith.
.env
4. Create a LangGraph config file
The LangGraph CLI uses a configuration file to locate your agent and manage dependencies. Create alanggraph.json file in your app’s directory:
langgraph.json
create_agent function automatically returns a compiled LangGraph graph, which is what the graphs key expects in the configuration file.
For detailed explanations of each key in the JSON object of the configuration file, refer to the LangGraph configuration file reference.
5. Install dependencies
Install your project dependencies from the root directory:6. View your agent in Studio
Start the development server to connect your agent to Studio:http://127.0.0.1:2024 and through the Studio UI at https://smith.langchain.com/studio/?baseUrl=http://127.0.0.1:2024:

- Run application
- Manage assistants
- Manage threads
- Iterate on prompts
- Debug LangSmith traces
- Add node to dataset
Video guide
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

