Gen-AI Developer Classroom notes 08/Jun/2026

Langgraph studio setup

  • Navigate to Langsmith and create an account
  • Create an API Key and set this API KEY as environmental variable LANGSMITH_API_KEY with API_KEY copied as its value

  • When you create a new project named deepagents and create .env

LANGSMITH_TRACING=true
LANGSMITH_ENDPOINT=https://api.smith.langchain.com
LANGSMITH_API_KEY=<your-api-key>
LANGSMITH_PROJECT="deepagents"

  • My recommendation would be to set all of the above as system environment variables.

  • Now lets create a new deepagent project, create a new folder and cd into id

uv init .
uv add deepagents langchain[google-genai] python-dotenv langgraph-cli[inmem]
  • Create .env file with your PROJECT_ID

  • Now in main.py

from deepagents import create_deep_agent
from langchain_google_genai import ChatGoogleGenerativeAI
from dotenv import load_dotenv
import os

load_dotenv()

model = ChatGoogleGenerativeAI(
        model="gemini-3.5-flash",
        project=os.getenv('PROJECT_ID')
    )

agent = create_deep_agent(
    model=model,
    system_prompt="You are a research assistant"
)

  • Now create a file called as langgraph.json
{
    "dependencies": ".",
    "graphs": {
        "deepagent-default": "main:agent"
    }
}
  • Now run uv run langgraph dev

Lets do a little complex problem with tools

  • Refer Here the following code and langgraph.json

Middleware

  • Refer Here for middleware docs by langchain

  • Refer Here to this page

  • Deepagents by default add the middlewares

By continuous learner

enthusiastic technology learner

Leave a Reply

Discover more from Direct AI Powered By Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading