langchain-trigger-server 0.1.5__tar.gz → 0.1.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of langchain-trigger-server might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: langchain-trigger-server
3
- Version: 0.1.5
3
+ Version: 0.1.6
4
4
  Summary: Generic event-driven triggers framework
5
5
  Project-URL: Homepage, https://github.com/langchain-ai/open-agent-platform
6
6
  Project-URL: Repository, https://github.com/langchain-ai/open-agent-platform
@@ -571,9 +571,17 @@ class TriggerServer:
571
571
  agent_id=agent_id
572
572
  )
573
573
 
574
- # Create a background run using the SDK
574
+ thread = await self.langgraph_client.threads.create(
575
+ metadata={
576
+ "triggered_by": "langchain-triggers",
577
+ "user_id": user_id,
578
+ },
579
+ headers=headers,
580
+ )
581
+ logger.info(f"Created thread {thread['thread_id']} for agent {agent_id}")
582
+
575
583
  run = await self.langgraph_client.runs.create(
576
- thread_id=None,
584
+ thread_id=thread['thread_id'],
577
585
  assistant_id=agent_id,
578
586
  input=input_data,
579
587
  metadata={
@@ -581,7 +589,6 @@ class TriggerServer:
581
589
  "user_id": user_id,
582
590
  },
583
591
  headers=headers,
584
- if_not_exists="create",
585
592
  )
586
593
 
587
594
  logger.info(f"Successfully invoked agent {agent_id}, run_id: {run['run_id']}, thread_id: {run['thread_id']}")
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "langchain-trigger-server"
7
- version = "0.1.5"
7
+ version = "0.1.6"
8
8
  description = "Generic event-driven triggers framework"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"