diff --git a/libs/sdk-js/src/schema.ts b/libs/sdk-js/src/schema.ts index d9f8458a2..ac68fa844 100644 --- a/libs/sdk-js/src/schema.ts +++ b/libs/sdk-js/src/schema.ts @@ -39,14 +39,22 @@ export interface GraphSchema { graph_id: string; /** - * The schema for the graph state + * The schema for the graph state. + * Missing if unable to generate JSON schema from graph. */ - state_schema: JSONSchema7; + input_schema?: JSONSchema7; /** - * The schema for the graph config + * The schema for the graph state. + * Missing if unable to generate JSON schema from graph. */ - config_schema: JSONSchema7; + state_schema?: JSONSchema7; + + /** + * The schema for the graph config. + * Missing if unable to generate JSON schema from graph. + */ + config_schema?: JSONSchema7; } export type Metadata = Optional>; diff --git a/libs/sdk-py/langgraph_sdk/schema.py b/libs/sdk-py/langgraph_sdk/schema.py index 3e9d6c064..e1eccf566 100644 --- a/libs/sdk-py/langgraph_sdk/schema.py +++ b/libs/sdk-py/langgraph_sdk/schema.py @@ -42,10 +42,15 @@ class GraphSchema(TypedDict): graph_id: str """The ID of the graph.""" - state_schema: dict - """The schema for the graph state.""" - config_schema: dict - """The schema for the graph config.""" + input_schema: Optional[dict] + """The schema for the graph state. + Missing if unable to generate JSON schema from graph.""" + state_schema: Optional[dict] + """The schema for the graph state. + Missing if unable to generate JSON schema from graph.""" + config_schema: Optional[dict] + """The schema for the graph config. + Missing if unable to generate JSON schema from graph.""" class Assistant(TypedDict):