# Langsmith Studio not showing state schema

**URL:** <https://forum.langchain.com/t/langsmith-studio-not-showing-state-schema/2371>\
**Category:** Deployment\
**Tags:** langsmith-studio\
**Created:** [November 27, 2025, 4:06pm UTC](https://forum.langchain.com/t/langsmith-studio-not-showing-state-schema/2371 "2025-11-27T16:06:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hesamzkr](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/hesamzkr/32/278_2.png) [@hesamzkr](https://forum.langchain.com/u/hesamzkr)\
**Post date:** [November 27, 2025, 4:06pm UTC](https://forum.langchain.com/t/langsmith-studio-not-showing-state-schema/2371/1 "2025-11-27T16:06:23Z")

</div>

Hi, I am returning a compiled state graph from this script as graph and it launches the server and shows the nodes and edges correctly and runs but in the input state it’s not able to recognize and render the state schema, which makes it harder to interact with. Am I missing something or is it a bug?

Currently the server is being run locally

The graph variable is an async method being called when file is loaded like. The graph state isn’t being loaded into this file directly instead a function is being loaded which creates compiled graph

```auto
export const graph = (async () => {
  await new Promise((resolve) => setTimeout(resolve, 3000));

  const compiledStateGraph = createGraph(props);

  return compiledStateGraph;
})();

```

Thank you

 ![image](https://canada1.discourse-cdn.com/flex007/uploads/langchain/original/2X/8/878df25cfa9e3235d2bcdb0b80084853df190160.png)

langgraph.json:

```auto
{
  "node_version": "22",
  "graphs": {
    "agent": "./scripts/studio/index.ts:graph"
  },
  "env": ".env",
  "dependencies": ["."],
  "image_distro": "wolfi"
}

```

---

<div class="post-metadata">

**Author:** ![Josh](https://avatars.discourse-cdn.com/v4/letter/j/45deac/32.png) [@Josh](https://forum.langchain.com/u/Josh)\
**Post date:** [November 28, 2025, 5:59pm UTC](https://forum.langchain.com/t/langsmith-studio-not-showing-state-schema/2371/2 "2025-11-28T17:59:57Z")

</div>

Hi - thanks for reaching out! Can you share more on how you’re defining the state in createGraph? Are you using a state annotation, zod or something else? [Use the graph API - Docs by LangChain](https://docs.langchain.com/oss/javascript/langgraph/use-graph-api#alternative-state-definitions)

---

<div class="post-metadata">

**Author:** ![hesamzkr](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/hesamzkr/32/278_2.png) [@hesamzkr](https://forum.langchain.com/u/hesamzkr)\
**Post date:** [November 28, 2025, 9:34pm UTC](https://forum.langchain.com/t/langsmith-studio-not-showing-state-schema/2371/3 "2025-11-28T21:34:48Z")

</div>

I’m using state annotation. example:

```typescript
export const GraphState = Annotation.Root({
  question: Annotation<string>,
  generation: Annotation<string>,
  answer: Annotation<string>,
});

```

```typescript
import { GraphState } from './state';

export const createGraph = () => {

  return new StateGraph(GraphState)
    .addNode
    ...
    .compile({ checkpointer });
}

```
