letta-client 0.1.2__py3-none-any.whl → 0.1.6__py3-none-any.whl

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.
Files changed (65) hide show
  1. letta/__init__.py +40 -34
  2. letta/agents/__init__.py +55 -3
  3. letta/agents/client.py +513 -35
  4. letta/agents/messages/__init__.py +36 -2
  5. letta/agents/messages/client.py +46 -0
  6. letta/agents/messages/types/__init__.py +37 -3
  7. letta/agents/messages/types/letta_streaming_response.py +132 -14
  8. letta/agents/messages/types/messages_list_response_item.py +114 -7
  9. letta/agents/types/__init__.py +36 -2
  10. letta/agents/types/{agents_create_version_response.py → agents_get_agent_variables_response.py} +2 -5
  11. letta/agents/types/agents_search_deployed_agents_request_combinator.py +5 -0
  12. letta/agents/types/agents_search_deployed_agents_request_search_item.py +67 -0
  13. letta/agents/types/agents_search_deployed_agents_request_search_item_name.py +23 -0
  14. letta/agents/types/agents_search_deployed_agents_request_search_item_name_operator.py +7 -0
  15. letta/agents/types/agents_search_deployed_agents_request_search_item_order_by.py +26 -0
  16. letta/agents/types/agents_search_deployed_agents_request_search_item_order_by_direction.py +5 -0
  17. letta/agents/types/agents_search_deployed_agents_request_search_item_order_by_value.py +7 -0
  18. letta/{types/letta_response_tool_call.py → agents/types/agents_search_deployed_agents_request_search_item_version.py} +4 -6
  19. letta/client.py +8 -8
  20. letta/core/client_wrapper.py +7 -18
  21. letta/environment.py +1 -1
  22. letta/types/__init__.py +18 -32
  23. letta/types/agent_environment_variable.py +68 -0
  24. letta/types/agent_state.py +15 -9
  25. letta/types/assistant_message_output.py +1 -2
  26. letta/types/block.py +9 -9
  27. letta/types/context_window_overview.py +5 -0
  28. letta/types/embedding_config.py +13 -8
  29. letta/types/internal_server_error_body.py +1 -1
  30. letta/types/job.py +5 -5
  31. letta/types/letta_response.py +10 -97
  32. letta/types/letta_response_messages_item.py +120 -0
  33. letta/types/letta_schemas_message_message.py +10 -10
  34. letta/types/letta_schemas_tool_tool.py +5 -5
  35. letta/types/letta_usage_statistics.py +4 -4
  36. letta/types/llm_config.py +12 -7
  37. letta/types/not_found_error_body.py +2 -3
  38. letta/types/passage.py +8 -8
  39. letta/types/reasoning_message.py +4 -5
  40. letta/types/sandbox_environment_variable.py +4 -4
  41. letta/types/sandbox_environment_variable_update.py +0 -4
  42. letta/types/source.py +6 -6
  43. letta/types/system_message_output.py +4 -5
  44. letta/types/tool_call_message.py +4 -5
  45. letta/types/tool_return_message.py +8 -9
  46. letta/types/user.py +3 -3
  47. letta/types/user_message_output.py +4 -5
  48. {letta_client-0.1.2.dist-info → letta_client-0.1.6.dist-info}/METADATA +1 -1
  49. {letta_client-0.1.2.dist-info → letta_client-0.1.6.dist-info}/RECORD +50 -56
  50. {letta_client-0.1.2.dist-info → letta_client-0.1.6.dist-info}/WHEEL +1 -1
  51. letta/types/letta_response_assistant_message.py +0 -23
  52. letta/types/letta_response_letta_usage_statistics.py +0 -47
  53. letta/types/letta_response_reasoning_message.py +0 -32
  54. letta/types/letta_response_system_message.py +0 -32
  55. letta/types/letta_response_tool_call_delta.py +0 -21
  56. letta/types/letta_response_tool_call_message.py +0 -33
  57. letta/types/letta_response_tool_call_message_tool_call.py +0 -9
  58. letta/types/letta_response_tool_call_message_tool_call_one.py +0 -21
  59. letta/types/letta_response_tool_call_message_tool_call_zero.py +0 -21
  60. letta/types/letta_response_tool_return_message.py +0 -41
  61. letta/types/letta_response_tool_return_message_status.py +0 -5
  62. letta/types/letta_response_usage_message.py +0 -40
  63. letta/types/letta_response_usage_message_usage.py +0 -47
  64. letta/types/letta_response_user_message.py +0 -32
  65. letta/types/usage_message.py +0 -31
@@ -1,5 +1,39 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from .types import LettaStreamingResponse, MessagesListResponse, MessagesListResponseItem
3
+ from .types import (
4
+ LettaStreamingResponse,
5
+ LettaStreamingResponse_AssistantMessage,
6
+ LettaStreamingResponse_ReasoningMessage,
7
+ LettaStreamingResponse_SystemMessage,
8
+ LettaStreamingResponse_ToolCallMessage,
9
+ LettaStreamingResponse_ToolReturnMessage,
10
+ LettaStreamingResponse_UsageStatistics,
11
+ LettaStreamingResponse_UserMessage,
12
+ MessagesListResponse,
13
+ MessagesListResponseItem,
14
+ MessagesListResponseItem_AssistantMessage,
15
+ MessagesListResponseItem_ReasoningMessage,
16
+ MessagesListResponseItem_SystemMessage,
17
+ MessagesListResponseItem_ToolCallMessage,
18
+ MessagesListResponseItem_ToolReturnMessage,
19
+ MessagesListResponseItem_UserMessage,
20
+ )
4
21
 
5
- __all__ = ["LettaStreamingResponse", "MessagesListResponse", "MessagesListResponseItem"]
22
+ __all__ = [
23
+ "LettaStreamingResponse",
24
+ "LettaStreamingResponse_AssistantMessage",
25
+ "LettaStreamingResponse_ReasoningMessage",
26
+ "LettaStreamingResponse_SystemMessage",
27
+ "LettaStreamingResponse_ToolCallMessage",
28
+ "LettaStreamingResponse_ToolReturnMessage",
29
+ "LettaStreamingResponse_UsageStatistics",
30
+ "LettaStreamingResponse_UserMessage",
31
+ "MessagesListResponse",
32
+ "MessagesListResponseItem",
33
+ "MessagesListResponseItem_AssistantMessage",
34
+ "MessagesListResponseItem_ReasoningMessage",
35
+ "MessagesListResponseItem_SystemMessage",
36
+ "MessagesListResponseItem_ToolCallMessage",
37
+ "MessagesListResponseItem_ToolReturnMessage",
38
+ "MessagesListResponseItem_UserMessage",
39
+ ]
@@ -345,6 +345,25 @@ class MessagesClient:
345
345
  ------
346
346
  typing.Iterator[LettaStreamingResponse]
347
347
  Successful response
348
+
349
+ Examples
350
+ --------
351
+ from letta import Letta, MessageCreate
352
+
353
+ client = Letta(
354
+ token="YOUR_TOKEN",
355
+ )
356
+ response = client.agents.messages.stream(
357
+ agent_id="agent_id",
358
+ messages=[
359
+ MessageCreate(
360
+ role="user",
361
+ text="text",
362
+ )
363
+ ],
364
+ )
365
+ for chunk in response:
366
+ yield chunk
348
367
  """
349
368
  with self._client_wrapper.httpx_client.stream(
350
369
  f"v1/agents/{jsonable_encoder(agent_id)}/messages/stream",
@@ -737,6 +756,33 @@ class AsyncMessagesClient:
737
756
  ------
738
757
  typing.AsyncIterator[LettaStreamingResponse]
739
758
  Successful response
759
+
760
+ Examples
761
+ --------
762
+ import asyncio
763
+
764
+ from letta import AsyncLetta, MessageCreate
765
+
766
+ client = AsyncLetta(
767
+ token="YOUR_TOKEN",
768
+ )
769
+
770
+
771
+ async def main() -> None:
772
+ response = await client.agents.messages.stream(
773
+ agent_id="agent_id",
774
+ messages=[
775
+ MessageCreate(
776
+ role="user",
777
+ text="text",
778
+ )
779
+ ],
780
+ )
781
+ async for chunk in response:
782
+ yield chunk
783
+
784
+
785
+ asyncio.run(main())
740
786
  """
741
787
  async with self._client_wrapper.httpx_client.stream(
742
788
  f"v1/agents/{jsonable_encoder(agent_id)}/messages/stream",
@@ -1,7 +1,41 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from .letta_streaming_response import LettaStreamingResponse
3
+ from .letta_streaming_response import (
4
+ LettaStreamingResponse,
5
+ LettaStreamingResponse_AssistantMessage,
6
+ LettaStreamingResponse_ReasoningMessage,
7
+ LettaStreamingResponse_SystemMessage,
8
+ LettaStreamingResponse_ToolCallMessage,
9
+ LettaStreamingResponse_ToolReturnMessage,
10
+ LettaStreamingResponse_UsageStatistics,
11
+ LettaStreamingResponse_UserMessage,
12
+ )
4
13
  from .messages_list_response import MessagesListResponse
5
- from .messages_list_response_item import MessagesListResponseItem
14
+ from .messages_list_response_item import (
15
+ MessagesListResponseItem,
16
+ MessagesListResponseItem_AssistantMessage,
17
+ MessagesListResponseItem_ReasoningMessage,
18
+ MessagesListResponseItem_SystemMessage,
19
+ MessagesListResponseItem_ToolCallMessage,
20
+ MessagesListResponseItem_ToolReturnMessage,
21
+ MessagesListResponseItem_UserMessage,
22
+ )
6
23
 
7
- __all__ = ["LettaStreamingResponse", "MessagesListResponse", "MessagesListResponseItem"]
24
+ __all__ = [
25
+ "LettaStreamingResponse",
26
+ "LettaStreamingResponse_AssistantMessage",
27
+ "LettaStreamingResponse_ReasoningMessage",
28
+ "LettaStreamingResponse_SystemMessage",
29
+ "LettaStreamingResponse_ToolCallMessage",
30
+ "LettaStreamingResponse_ToolReturnMessage",
31
+ "LettaStreamingResponse_UsageStatistics",
32
+ "LettaStreamingResponse_UserMessage",
33
+ "MessagesListResponse",
34
+ "MessagesListResponseItem",
35
+ "MessagesListResponseItem_AssistantMessage",
36
+ "MessagesListResponseItem_ReasoningMessage",
37
+ "MessagesListResponseItem_SystemMessage",
38
+ "MessagesListResponseItem_ToolCallMessage",
39
+ "MessagesListResponseItem_ToolReturnMessage",
40
+ "MessagesListResponseItem_UserMessage",
41
+ ]
@@ -1,20 +1,138 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
+ from __future__ import annotations
4
+ from ....core.pydantic_utilities import UniversalBaseModel
3
5
  import typing
4
- from ....types.system_message_output import SystemMessageOutput
5
- from ....types.user_message_output import UserMessageOutput
6
- from ....types.reasoning_message import ReasoningMessage
7
- from ....types.tool_call_message import ToolCallMessage
8
- from ....types.tool_return_message import ToolReturnMessage
9
- from ....types.assistant_message_output import AssistantMessageOutput
10
- from ....types.letta_usage_statistics import LettaUsageStatistics
6
+ import datetime as dt
7
+ from ....core.pydantic_utilities import IS_PYDANTIC_V2
8
+ import pydantic
9
+ from ....types.tool_call_message_tool_call import ToolCallMessageToolCall
10
+ from ....types.tool_return_message_status import ToolReturnMessageStatus
11
+
12
+
13
+ class LettaStreamingResponse_SystemMessage(UniversalBaseModel):
14
+ message_type: typing.Literal["system_message"] = "system_message"
15
+ id: str
16
+ date: dt.datetime
17
+ message: str
18
+
19
+ if IS_PYDANTIC_V2:
20
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
21
+ else:
22
+
23
+ class Config:
24
+ frozen = True
25
+ smart_union = True
26
+ extra = pydantic.Extra.allow
27
+
28
+
29
+ class LettaStreamingResponse_UserMessage(UniversalBaseModel):
30
+ message_type: typing.Literal["user_message"] = "user_message"
31
+ id: str
32
+ date: dt.datetime
33
+ message: str
34
+
35
+ if IS_PYDANTIC_V2:
36
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
37
+ else:
38
+
39
+ class Config:
40
+ frozen = True
41
+ smart_union = True
42
+ extra = pydantic.Extra.allow
43
+
44
+
45
+ class LettaStreamingResponse_ReasoningMessage(UniversalBaseModel):
46
+ message_type: typing.Literal["reasoning_message"] = "reasoning_message"
47
+ id: str
48
+ date: dt.datetime
49
+ reasoning: str
50
+
51
+ if IS_PYDANTIC_V2:
52
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
53
+ else:
54
+
55
+ class Config:
56
+ frozen = True
57
+ smart_union = True
58
+ extra = pydantic.Extra.allow
59
+
60
+
61
+ class LettaStreamingResponse_ToolCallMessage(UniversalBaseModel):
62
+ message_type: typing.Literal["tool_call_message"] = "tool_call_message"
63
+ id: str
64
+ date: dt.datetime
65
+ tool_call: ToolCallMessageToolCall
66
+
67
+ if IS_PYDANTIC_V2:
68
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
69
+ else:
70
+
71
+ class Config:
72
+ frozen = True
73
+ smart_union = True
74
+ extra = pydantic.Extra.allow
75
+
76
+
77
+ class LettaStreamingResponse_ToolReturnMessage(UniversalBaseModel):
78
+ message_type: typing.Literal["tool_return_message"] = "tool_return_message"
79
+ id: str
80
+ date: dt.datetime
81
+ tool_return: str
82
+ status: ToolReturnMessageStatus
83
+ tool_call_id: str
84
+ stdout: typing.Optional[typing.List[str]] = None
85
+ stderr: typing.Optional[typing.List[str]] = None
86
+
87
+ if IS_PYDANTIC_V2:
88
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
89
+ else:
90
+
91
+ class Config:
92
+ frozen = True
93
+ smart_union = True
94
+ extra = pydantic.Extra.allow
95
+
96
+
97
+ class LettaStreamingResponse_AssistantMessage(UniversalBaseModel):
98
+ message_type: typing.Literal["assistant_message"] = "assistant_message"
99
+ id: str
100
+ date: dt.datetime
101
+ assistant_message: str
102
+
103
+ if IS_PYDANTIC_V2:
104
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
105
+ else:
106
+
107
+ class Config:
108
+ frozen = True
109
+ smart_union = True
110
+ extra = pydantic.Extra.allow
111
+
112
+
113
+ class LettaStreamingResponse_UsageStatistics(UniversalBaseModel):
114
+ message_type: typing.Literal["usage_statistics"] = "usage_statistics"
115
+ completion_tokens: typing.Optional[int] = None
116
+ prompt_tokens: typing.Optional[int] = None
117
+ total_tokens: typing.Optional[int] = None
118
+ step_count: typing.Optional[int] = None
119
+
120
+ if IS_PYDANTIC_V2:
121
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
122
+ else:
123
+
124
+ class Config:
125
+ frozen = True
126
+ smart_union = True
127
+ extra = pydantic.Extra.allow
128
+
11
129
 
12
130
  LettaStreamingResponse = typing.Union[
13
- SystemMessageOutput,
14
- UserMessageOutput,
15
- ReasoningMessage,
16
- ToolCallMessage,
17
- ToolReturnMessage,
18
- AssistantMessageOutput,
19
- LettaUsageStatistics,
131
+ LettaStreamingResponse_SystemMessage,
132
+ LettaStreamingResponse_UserMessage,
133
+ LettaStreamingResponse_ReasoningMessage,
134
+ LettaStreamingResponse_ToolCallMessage,
135
+ LettaStreamingResponse_ToolReturnMessage,
136
+ LettaStreamingResponse_AssistantMessage,
137
+ LettaStreamingResponse_UsageStatistics,
20
138
  ]
@@ -1,13 +1,120 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
+ from __future__ import annotations
4
+ from ....core.pydantic_utilities import UniversalBaseModel
3
5
  import typing
4
- from ....types.system_message_output import SystemMessageOutput
5
- from ....types.user_message_output import UserMessageOutput
6
- from ....types.reasoning_message import ReasoningMessage
7
- from ....types.tool_call_message import ToolCallMessage
8
- from ....types.tool_return_message import ToolReturnMessage
9
- from ....types.assistant_message_output import AssistantMessageOutput
6
+ import datetime as dt
7
+ from ....core.pydantic_utilities import IS_PYDANTIC_V2
8
+ import pydantic
9
+ from ....types.tool_call_message_tool_call import ToolCallMessageToolCall
10
+ from ....types.tool_return_message_status import ToolReturnMessageStatus
11
+
12
+
13
+ class MessagesListResponseItem_SystemMessage(UniversalBaseModel):
14
+ message_type: typing.Literal["system_message"] = "system_message"
15
+ id: str
16
+ date: dt.datetime
17
+ message: str
18
+
19
+ if IS_PYDANTIC_V2:
20
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
21
+ else:
22
+
23
+ class Config:
24
+ frozen = True
25
+ smart_union = True
26
+ extra = pydantic.Extra.allow
27
+
28
+
29
+ class MessagesListResponseItem_UserMessage(UniversalBaseModel):
30
+ message_type: typing.Literal["user_message"] = "user_message"
31
+ id: str
32
+ date: dt.datetime
33
+ message: str
34
+
35
+ if IS_PYDANTIC_V2:
36
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
37
+ else:
38
+
39
+ class Config:
40
+ frozen = True
41
+ smart_union = True
42
+ extra = pydantic.Extra.allow
43
+
44
+
45
+ class MessagesListResponseItem_ReasoningMessage(UniversalBaseModel):
46
+ message_type: typing.Literal["reasoning_message"] = "reasoning_message"
47
+ id: str
48
+ date: dt.datetime
49
+ reasoning: str
50
+
51
+ if IS_PYDANTIC_V2:
52
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
53
+ else:
54
+
55
+ class Config:
56
+ frozen = True
57
+ smart_union = True
58
+ extra = pydantic.Extra.allow
59
+
60
+
61
+ class MessagesListResponseItem_ToolCallMessage(UniversalBaseModel):
62
+ message_type: typing.Literal["tool_call_message"] = "tool_call_message"
63
+ id: str
64
+ date: dt.datetime
65
+ tool_call: ToolCallMessageToolCall
66
+
67
+ if IS_PYDANTIC_V2:
68
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
69
+ else:
70
+
71
+ class Config:
72
+ frozen = True
73
+ smart_union = True
74
+ extra = pydantic.Extra.allow
75
+
76
+
77
+ class MessagesListResponseItem_ToolReturnMessage(UniversalBaseModel):
78
+ message_type: typing.Literal["tool_return_message"] = "tool_return_message"
79
+ id: str
80
+ date: dt.datetime
81
+ tool_return: str
82
+ status: ToolReturnMessageStatus
83
+ tool_call_id: str
84
+ stdout: typing.Optional[typing.List[str]] = None
85
+ stderr: typing.Optional[typing.List[str]] = None
86
+
87
+ if IS_PYDANTIC_V2:
88
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
89
+ else:
90
+
91
+ class Config:
92
+ frozen = True
93
+ smart_union = True
94
+ extra = pydantic.Extra.allow
95
+
96
+
97
+ class MessagesListResponseItem_AssistantMessage(UniversalBaseModel):
98
+ message_type: typing.Literal["assistant_message"] = "assistant_message"
99
+ id: str
100
+ date: dt.datetime
101
+ assistant_message: str
102
+
103
+ if IS_PYDANTIC_V2:
104
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
105
+ else:
106
+
107
+ class Config:
108
+ frozen = True
109
+ smart_union = True
110
+ extra = pydantic.Extra.allow
111
+
10
112
 
11
113
  MessagesListResponseItem = typing.Union[
12
- SystemMessageOutput, UserMessageOutput, ReasoningMessage, ToolCallMessage, ToolReturnMessage, AssistantMessageOutput
114
+ MessagesListResponseItem_SystemMessage,
115
+ MessagesListResponseItem_UserMessage,
116
+ MessagesListResponseItem_ReasoningMessage,
117
+ MessagesListResponseItem_ToolCallMessage,
118
+ MessagesListResponseItem_ToolReturnMessage,
119
+ MessagesListResponseItem_AssistantMessage,
13
120
  ]
@@ -1,13 +1,47 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from .agents_create_version_response import AgentsCreateVersionResponse
3
+ from .agents_get_agent_variables_response import AgentsGetAgentVariablesResponse
4
4
  from .agents_migrate_response import AgentsMigrateResponse
5
+ from .agents_search_deployed_agents_request_combinator import AgentsSearchDeployedAgentsRequestCombinator
6
+ from .agents_search_deployed_agents_request_search_item import (
7
+ AgentsSearchDeployedAgentsRequestSearchItem,
8
+ AgentsSearchDeployedAgentsRequestSearchItem_Name,
9
+ AgentsSearchDeployedAgentsRequestSearchItem_OrderBy,
10
+ AgentsSearchDeployedAgentsRequestSearchItem_Version,
11
+ )
12
+ from .agents_search_deployed_agents_request_search_item_name import AgentsSearchDeployedAgentsRequestSearchItemName
13
+ from .agents_search_deployed_agents_request_search_item_name_operator import (
14
+ AgentsSearchDeployedAgentsRequestSearchItemNameOperator,
15
+ )
16
+ from .agents_search_deployed_agents_request_search_item_order_by import (
17
+ AgentsSearchDeployedAgentsRequestSearchItemOrderBy,
18
+ )
19
+ from .agents_search_deployed_agents_request_search_item_order_by_direction import (
20
+ AgentsSearchDeployedAgentsRequestSearchItemOrderByDirection,
21
+ )
22
+ from .agents_search_deployed_agents_request_search_item_order_by_value import (
23
+ AgentsSearchDeployedAgentsRequestSearchItemOrderByValue,
24
+ )
25
+ from .agents_search_deployed_agents_request_search_item_version import (
26
+ AgentsSearchDeployedAgentsRequestSearchItemVersion,
27
+ )
5
28
  from .create_agent_request_tool_rules_item import CreateAgentRequestToolRulesItem
6
29
  from .update_agent_tool_rules_item import UpdateAgentToolRulesItem
7
30
 
8
31
  __all__ = [
9
- "AgentsCreateVersionResponse",
32
+ "AgentsGetAgentVariablesResponse",
10
33
  "AgentsMigrateResponse",
34
+ "AgentsSearchDeployedAgentsRequestCombinator",
35
+ "AgentsSearchDeployedAgentsRequestSearchItem",
36
+ "AgentsSearchDeployedAgentsRequestSearchItemName",
37
+ "AgentsSearchDeployedAgentsRequestSearchItemNameOperator",
38
+ "AgentsSearchDeployedAgentsRequestSearchItemOrderBy",
39
+ "AgentsSearchDeployedAgentsRequestSearchItemOrderByDirection",
40
+ "AgentsSearchDeployedAgentsRequestSearchItemOrderByValue",
41
+ "AgentsSearchDeployedAgentsRequestSearchItemVersion",
42
+ "AgentsSearchDeployedAgentsRequestSearchItem_Name",
43
+ "AgentsSearchDeployedAgentsRequestSearchItem_OrderBy",
44
+ "AgentsSearchDeployedAgentsRequestSearchItem_Version",
11
45
  "CreateAgentRequestToolRulesItem",
12
46
  "UpdateAgentToolRulesItem",
13
47
  ]
@@ -1,16 +1,13 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
3
  from ...core.pydantic_utilities import UniversalBaseModel
4
- import typing_extensions
5
4
  import typing
6
- from ...core.serialization import FieldMetadata
7
5
  from ...core.pydantic_utilities import IS_PYDANTIC_V2
8
6
  import pydantic
9
7
 
10
8
 
11
- class AgentsCreateVersionResponse(UniversalBaseModel):
12
- version: str
13
- agent_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="agentId")] = None
9
+ class AgentsGetAgentVariablesResponse(UniversalBaseModel):
10
+ variables: typing.Dict[str, str]
14
11
 
15
12
  if IS_PYDANTIC_V2:
16
13
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ AgentsSearchDeployedAgentsRequestCombinator = typing.Union[typing.Literal["AND", "OR"], typing.Any]
@@ -0,0 +1,67 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from __future__ import annotations
4
+ from ...core.pydantic_utilities import UniversalBaseModel
5
+ import typing
6
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2
7
+ import pydantic
8
+ from .agents_search_deployed_agents_request_search_item_name_operator import (
9
+ AgentsSearchDeployedAgentsRequestSearchItemNameOperator,
10
+ )
11
+ from .agents_search_deployed_agents_request_search_item_order_by_value import (
12
+ AgentsSearchDeployedAgentsRequestSearchItemOrderByValue,
13
+ )
14
+ from .agents_search_deployed_agents_request_search_item_order_by_direction import (
15
+ AgentsSearchDeployedAgentsRequestSearchItemOrderByDirection,
16
+ )
17
+
18
+
19
+ class AgentsSearchDeployedAgentsRequestSearchItem_Version(UniversalBaseModel):
20
+ field: typing.Literal["version"] = "version"
21
+ value: str
22
+
23
+ if IS_PYDANTIC_V2:
24
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
25
+ else:
26
+
27
+ class Config:
28
+ frozen = True
29
+ smart_union = True
30
+ extra = pydantic.Extra.allow
31
+
32
+
33
+ class AgentsSearchDeployedAgentsRequestSearchItem_Name(UniversalBaseModel):
34
+ field: typing.Literal["name"] = "name"
35
+ operator: AgentsSearchDeployedAgentsRequestSearchItemNameOperator
36
+ value: str
37
+
38
+ if IS_PYDANTIC_V2:
39
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
40
+ else:
41
+
42
+ class Config:
43
+ frozen = True
44
+ smart_union = True
45
+ extra = pydantic.Extra.allow
46
+
47
+
48
+ class AgentsSearchDeployedAgentsRequestSearchItem_OrderBy(UniversalBaseModel):
49
+ field: typing.Literal["order_by"] = "order_by"
50
+ value: AgentsSearchDeployedAgentsRequestSearchItemOrderByValue
51
+ direction: AgentsSearchDeployedAgentsRequestSearchItemOrderByDirection
52
+
53
+ if IS_PYDANTIC_V2:
54
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
55
+ else:
56
+
57
+ class Config:
58
+ frozen = True
59
+ smart_union = True
60
+ extra = pydantic.Extra.allow
61
+
62
+
63
+ AgentsSearchDeployedAgentsRequestSearchItem = typing.Union[
64
+ AgentsSearchDeployedAgentsRequestSearchItem_Version,
65
+ AgentsSearchDeployedAgentsRequestSearchItem_Name,
66
+ AgentsSearchDeployedAgentsRequestSearchItem_OrderBy,
67
+ ]
@@ -0,0 +1,23 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ...core.pydantic_utilities import UniversalBaseModel
4
+ from .agents_search_deployed_agents_request_search_item_name_operator import (
5
+ AgentsSearchDeployedAgentsRequestSearchItemNameOperator,
6
+ )
7
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2
8
+ import typing
9
+ import pydantic
10
+
11
+
12
+ class AgentsSearchDeployedAgentsRequestSearchItemName(UniversalBaseModel):
13
+ operator: AgentsSearchDeployedAgentsRequestSearchItemNameOperator
14
+ value: str
15
+
16
+ if IS_PYDANTIC_V2:
17
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
18
+ else:
19
+
20
+ class Config:
21
+ frozen = True
22
+ smart_union = True
23
+ extra = pydantic.Extra.allow
@@ -0,0 +1,7 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ AgentsSearchDeployedAgentsRequestSearchItemNameOperator = typing.Union[
6
+ typing.Literal["eq", "neq", "contains"], typing.Any
7
+ ]
@@ -0,0 +1,26 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ...core.pydantic_utilities import UniversalBaseModel
4
+ from .agents_search_deployed_agents_request_search_item_order_by_value import (
5
+ AgentsSearchDeployedAgentsRequestSearchItemOrderByValue,
6
+ )
7
+ from .agents_search_deployed_agents_request_search_item_order_by_direction import (
8
+ AgentsSearchDeployedAgentsRequestSearchItemOrderByDirection,
9
+ )
10
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2
11
+ import typing
12
+ import pydantic
13
+
14
+
15
+ class AgentsSearchDeployedAgentsRequestSearchItemOrderBy(UniversalBaseModel):
16
+ value: AgentsSearchDeployedAgentsRequestSearchItemOrderByValue
17
+ direction: AgentsSearchDeployedAgentsRequestSearchItemOrderByDirection
18
+
19
+ if IS_PYDANTIC_V2:
20
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
21
+ else:
22
+
23
+ class Config:
24
+ frozen = True
25
+ smart_union = True
26
+ extra = pydantic.Extra.allow
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ AgentsSearchDeployedAgentsRequestSearchItemOrderByDirection = typing.Union[typing.Literal["asc", "desc"], typing.Any]
@@ -0,0 +1,7 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ AgentsSearchDeployedAgentsRequestSearchItemOrderByValue = typing.Union[
6
+ typing.Literal["created_at", "updated_at"], typing.Any
7
+ ]
@@ -1,15 +1,13 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
3
+ from ...core.pydantic_utilities import UniversalBaseModel
4
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2
5
5
  import typing
6
6
  import pydantic
7
7
 
8
8
 
9
- class LettaResponseToolCall(UniversalBaseModel):
10
- name: str
11
- arguments: str
12
- tool_call_id: str
9
+ class AgentsSearchDeployedAgentsRequestSearchItemVersion(UniversalBaseModel):
10
+ value: str
13
11
 
14
12
  if IS_PYDANTIC_V2:
15
13
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2