Skip to content

armgit / letta

Public Imported from GitHub
0

Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.

feat: Add id to tool return object [LET-4673] (#5191)

Matthew Zhou5a315b8ad557
diff --git a/fern/openapi.json b/fern/openapi.json
index 74c73bb3c..96d2d58da 100644
--- a/fern/openapi.json
+++ b/fern/openapi.json
@@ -33916,6 +33916,16 @@
},
"ToolReturn": {
"properties": {
+ "tool_call_id": {
+ "anyOf": [
+ {},
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Tool Call Id",
+ "description": "The ID for the tool call"
+ },
"status": {
"type": "string",
"enum": ["success", "error"],
diff --git a/letta/schemas/message.py b/letta/schemas/message.py
index b36bc1b47..f4f10829f 100644
--- a/letta/schemas/message.py
+++ b/letta/schemas/message.py
@@ -1502,6 +1502,7 @@ class Message(BaseMessage):
class ToolReturn(BaseModel):
+ tool_call_id: Optional[Any] = Field(None, description="The ID for the tool call")
status: Literal["success", "error"] = Field(..., description="The status of the tool call")
stdout: Optional[List[str]] = Field(default=None, description="Captured stdout (e.g. prints, logs) from the tool invocation")
stderr: Optional[List[str]] = Field(default=None, description="Captured stderr from the tool invocation")