Compare commits

..
Author SHA1 Message Date
William FHandGitHub 6f4c5fefee feat(sdk-py): Support ids filtering in threads search (#6067) 2025-09-02 17:49:11 -07:00
7cf230defa chore(docs): Update OpenAPI spec from LangGraph API v0.4.9 (#6066)
This PR updates the OpenAPI specification with changes detected from the
LangGraph API server.

**Changes detected as of LangGraph API version 0.4.9**

This update was automatically generated by the sync workflow in the
langgraph-api repository.

Co-authored-by: hinthornw <hinthornw@users.noreply.github.com>
2025-09-02 17:04:30 -07:00
5db65e0281 chore(docs): Update OpenAPI spec from LangGraph API v0.4.8 (#6065)
This PR updates the OpenAPI specification with changes detected from the
LangGraph API server.

**Changes detected as of LangGraph API version 0.4.8**

This update was automatically generated by the sync workflow in the
langgraph-api repository.

Co-authored-by: hinthornw <hinthornw@users.noreply.github.com>
2025-09-02 15:25:52 -07:00
b08c2e092f chore(docs): Update OpenAPI spec from LangGraph API v0.4.8 (#6048)
This PR updates the OpenAPI specification with changes detected from the
LangGraph API server.

**Changes detected as of LangGraph API version 0.4.8**

This update was automatically generated by the sync workflow in the
langgraph-api repository.

Co-authored-by: hinthornw <hinthornw@users.noreply.github.com>
2025-09-02 10:10:12 -07:00
Sydney RunkleandGitHub 120ae38c12 chore(docs): fix runtime context link (#6043) 2025-08-29 13:45:39 -04:00
5 changed files with 212 additions and 2 deletions
+199
View File
@@ -29,6 +29,10 @@
"name": "Store",
"description": "Store is an API for managing persistent key-value store (long-term memory) that is available from any thread."
},
{
"name": "A2A",
"description": "Agent-to-Agent Protocol related endpoints for exposing assistants as A2A-compliant agents."
},
{
"name": "MCP",
"description": "Model Context Protocol related endpoints for exposing an agent as an MCP server."
@@ -3182,6 +3186,195 @@
}
}
},
"/a2a/{assistant_id}": {
"post": {
"operationId": "post_a2a",
"summary": "A2A Post",
"description": "Communicate with an assistant using the Agent-to-Agent Protocol.\nSends a JSON-RPC 2.0 message to the assistant.\n\n- **Request**: Provide an object with `jsonrpc`, `id`, `method`, and optional `params`.\n- **Response**: Returns a JSON-RPC response with task information or error.\n\n**Supported Methods:**\n- `message/send`: Send a message to the assistant\n- `tasks/get`: Get the status and result of a task\n\n**Notes:**\n- Supports threaded conversations via thread context\n- Messages can contain text and data parts\n- Tasks run asynchronously and return completion status\n",
"parameters": [
{
"name": "assistant_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
},
"description": "The ID of the assistant to communicate with"
},
{
"name": "Accept",
"in": "header",
"required": true,
"schema": {
"type": "string",
"enum": ["application/json"]
},
"description": "Must be application/json"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"jsonrpc": {
"type": "string",
"enum": ["2.0"],
"description": "JSON-RPC version"
},
"id": {
"type": "string",
"description": "Request identifier"
},
"method": {
"type": "string",
"enum": ["message/send", "tasks/get"],
"description": "The method to invoke"
},
"params": {
"type": "object",
"description": "Method parameters",
"oneOf": [
{
"title": "Message Send Parameters",
"properties": {
"message": {
"type": "object",
"properties": {
"role": {
"type": "string",
"enum": ["user", "assistant"],
"description": "Message role"
},
"parts": {
"type": "array",
"items": {
"oneOf": [
{
"title": "Text Part",
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": ["text"]
},
"text": {
"type": "string"
}
},
"required": ["kind", "text"]
},
{
"title": "Data Part",
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": ["data"]
},
"data": {
"type": "object"
}
},
"required": ["kind", "data"]
}
]
},
"description": "Message parts"
},
"messageId": {
"type": "string",
"description": "Unique message identifier"
}
},
"required": ["role", "parts", "messageId"]
},
"thread": {
"type": "object",
"properties": {
"threadId": {
"type": "string",
"description": "Thread identifier for conversation context"
}
},
"description": "Optional thread context"
}
},
"required": ["message"]
},
{
"title": "Task Get Parameters",
"properties": {
"taskId": {
"type": "string",
"description": "Task identifier to retrieve"
}
},
"required": ["taskId"]
}
]
}
},
"required": ["jsonrpc", "id", "method"]
}
}
}
},
"responses": {
"200": {
"description": "JSON-RPC response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"jsonrpc": {
"type": "string",
"enum": ["2.0"]
},
"id": {
"type": "string"
},
"result": {
"type": "object",
"description": "Success result containing task information or task details"
},
"error": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
}
},
"description": "Error information if request failed"
}
},
"required": ["jsonrpc", "id"]
}
}
}
},
"400": {
"description": "Bad request - invalid JSON-RPC or missing Accept header"
},
"404": {
"description": "Assistant not found"
},
"500": {
"description": "Internal server error"
}
},
"tags": [
"A2A"
]
}
},
"/mcp/": {
"post": {
"operationId": "post_mcp",
@@ -4822,6 +5015,12 @@
},
"ThreadSearchRequest": {
"properties": {
"ids": {
"type": "array",
"items": {"type": "string", "format": "uuid"},
"title": "Ids",
"description": "List of thread IDs to include. Others are excluded."
},
"metadata": {
"type": "object",
"title": "Metadata",
+1 -1
View File
@@ -1040,7 +1040,7 @@ def node_a(state: State, runtime: Runtime[ContextSchema]):
...
```
See [this guide](../how-tos/graph-api.ipynb#add-runtime-configuration) for a full breakdown on configuration.
See [this guide](../how-tos/graph-api.md#add-runtime-configuration) for a full breakdown on configuration.
:::
:::js
+1 -1
View File
@@ -1,6 +1,6 @@
from langgraph_sdk.auth import Auth
from langgraph_sdk.client import get_client, get_sync_client
__version__ = "0.2.4"
__version__ = "0.2.5"
__all__ = ["Auth", "get_client", "get_sync_client"]
+3
View File
@@ -489,6 +489,9 @@ class ThreadsSearch(typing.TypedDict, total=False):
offset: int
"""Offset for pagination."""
ids: Sequence[UUID] | None
"""typing.Optional list of thread IDs to filter by."""
thread_id: UUID | None
"""typing.Optional thread ID to filter by."""
+8
View File
@@ -1309,6 +1309,7 @@ class ThreadsClient:
*,
metadata: Json = None,
values: Json = None,
ids: Sequence[str] | None = None,
status: ThreadStatus | None = None,
limit: int = 10,
offset: int = 0,
@@ -1323,6 +1324,7 @@ class ThreadsClient:
Args:
metadata: Thread metadata to filter on.
values: State values to filter on.
ids: List of thread IDs to filter by.
status: Thread status to filter on.
Must be one of 'idle', 'busy', 'interrupted' or 'error'.
limit: Limit on number of threads to return.
@@ -1356,6 +1358,8 @@ class ThreadsClient:
payload["metadata"] = metadata
if values:
payload["values"] = values
if ids:
payload["ids"] = ids
if status:
payload["status"] = status
if sort_by:
@@ -4454,6 +4458,7 @@ class SyncThreadsClient:
*,
metadata: Json = None,
values: Json = None,
ids: Sequence[str] | None = None,
status: ThreadStatus | None = None,
limit: int = 10,
offset: int = 0,
@@ -4468,6 +4473,7 @@ class SyncThreadsClient:
Args:
metadata: Thread metadata to filter on.
values: State values to filter on.
ids: List of thread IDs to filter by.
status: Thread status to filter on.
Must be one of 'idle', 'busy', 'interrupted' or 'error'.
limit: Limit on number of threads to return.
@@ -4497,6 +4503,8 @@ class SyncThreadsClient:
payload["metadata"] = metadata
if values:
payload["values"] = values
if ids:
payload["ids"] = ids
if status:
payload["status"] = status
if sort_by: