letta-client 0.1.251__py3-none-any.whl → 0.1.253__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.
Potentially problematic release.
This version of letta-client might be problematic. Click here for more details.
- letta_client/__init__.py +40 -8
- letta_client/agents/client.py +31 -8
- letta_client/agents/raw_client.py +31 -10
- letta_client/core/client_wrapper.py +2 -2
- letta_client/tools/client.py +2 -2
- letta_client/tools/raw_client.py +2 -2
- letta_client/types/__init__.py +48 -8
- letta_client/types/agent_file_schema.py +75 -0
- letta_client/types/block_schema.py +73 -0
- letta_client/types/body_export_agent_serialized.py +25 -0
- letta_client/types/file_agent_schema.py +73 -0
- letta_client/types/file_schema.py +93 -0
- letta_client/types/group_schema.py +53 -0
- letta_client/types/group_schema_manager_config.py +13 -0
- letta_client/types/imported_agents_response.py +27 -0
- letta_client/types/letta_schemas_agent_file_agent_schema.py +275 -0
- letta_client/types/letta_schemas_agent_file_agent_schema_response_format.py +11 -0
- letta_client/types/letta_schemas_agent_file_agent_schema_tool_rules_item.py +23 -0
- letta_client/types/letta_schemas_agent_file_message_schema.py +74 -0
- letta_client/types/letta_schemas_agent_file_message_schema_content.py +7 -0
- letta_client/types/letta_schemas_agent_file_tool_schema.py +104 -0
- letta_client/types/{agent_schema.py → letta_serialize_schemas_pydantic_agent_schema_agent_schema.py} +13 -7
- letta_client/types/{agent_schema_tool_rules_item.py → letta_serialize_schemas_pydantic_agent_schema_agent_schema_tool_rules_item.py} +1 -1
- letta_client/types/{message_schema.py → letta_serialize_schemas_pydantic_agent_schema_message_schema.py} +1 -1
- letta_client/types/{tool_schema.py → letta_serialize_schemas_pydantic_agent_schema_tool_schema.py} +1 -1
- letta_client/types/mcp_server_schema.py +37 -0
- letta_client/types/source_schema.py +63 -0
- {letta_client-0.1.251.dist-info → letta_client-0.1.253.dist-info}/METADATA +1 -1
- {letta_client-0.1.251.dist-info → letta_client-0.1.253.dist-info}/RECORD +30 -14
- {letta_client-0.1.251.dist-info → letta_client-0.1.253.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
8
|
+
from .agent_type import AgentType
|
|
9
|
+
from .create_block import CreateBlock
|
|
10
|
+
from .embedding_config import EmbeddingConfig
|
|
11
|
+
from .file_agent_schema import FileAgentSchema
|
|
12
|
+
from .letta_schemas_agent_file_agent_schema_response_format import LettaSchemasAgentFileAgentSchemaResponseFormat
|
|
13
|
+
from .letta_schemas_agent_file_agent_schema_tool_rules_item import LettaSchemasAgentFileAgentSchemaToolRulesItem
|
|
14
|
+
from .letta_schemas_agent_file_message_schema import LettaSchemasAgentFileMessageSchema
|
|
15
|
+
from .llm_config import LlmConfig
|
|
16
|
+
from .message_create import MessageCreate
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class LettaSchemasAgentFileAgentSchema(UncheckedBaseModel):
|
|
20
|
+
"""
|
|
21
|
+
Agent with human-readable ID for agent file
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
name: typing.Optional[str] = pydantic.Field(default=None)
|
|
25
|
+
"""
|
|
26
|
+
The name of the agent.
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
memory_blocks: typing.Optional[typing.List[CreateBlock]] = pydantic.Field(default=None)
|
|
30
|
+
"""
|
|
31
|
+
The blocks to create in the agent's in-context memory.
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
tools: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
|
|
35
|
+
"""
|
|
36
|
+
The tools used by the agent.
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
tool_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
|
|
40
|
+
"""
|
|
41
|
+
The ids of the tools used by the agent.
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
source_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
|
|
45
|
+
"""
|
|
46
|
+
The ids of the sources used by the agent.
|
|
47
|
+
"""
|
|
48
|
+
|
|
49
|
+
block_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
|
|
50
|
+
"""
|
|
51
|
+
The ids of the blocks used by the agent.
|
|
52
|
+
"""
|
|
53
|
+
|
|
54
|
+
tool_rules: typing.Optional[typing.List[LettaSchemasAgentFileAgentSchemaToolRulesItem]] = pydantic.Field(
|
|
55
|
+
default=None
|
|
56
|
+
)
|
|
57
|
+
"""
|
|
58
|
+
The tool rules governing the agent.
|
|
59
|
+
"""
|
|
60
|
+
|
|
61
|
+
tags: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
|
|
62
|
+
"""
|
|
63
|
+
The tags associated with the agent.
|
|
64
|
+
"""
|
|
65
|
+
|
|
66
|
+
system: typing.Optional[str] = pydantic.Field(default=None)
|
|
67
|
+
"""
|
|
68
|
+
The system prompt used by the agent.
|
|
69
|
+
"""
|
|
70
|
+
|
|
71
|
+
agent_type: typing.Optional[AgentType] = pydantic.Field(default=None)
|
|
72
|
+
"""
|
|
73
|
+
The type of agent.
|
|
74
|
+
"""
|
|
75
|
+
|
|
76
|
+
llm_config: typing.Optional[LlmConfig] = pydantic.Field(default=None)
|
|
77
|
+
"""
|
|
78
|
+
The LLM configuration used by the agent.
|
|
79
|
+
"""
|
|
80
|
+
|
|
81
|
+
embedding_config: typing.Optional[EmbeddingConfig] = pydantic.Field(default=None)
|
|
82
|
+
"""
|
|
83
|
+
The embedding configuration used by the agent.
|
|
84
|
+
"""
|
|
85
|
+
|
|
86
|
+
initial_message_sequence: typing.Optional[typing.List[MessageCreate]] = pydantic.Field(default=None)
|
|
87
|
+
"""
|
|
88
|
+
The initial set of messages to put in the agent's in-context memory.
|
|
89
|
+
"""
|
|
90
|
+
|
|
91
|
+
include_base_tools: typing.Optional[bool] = pydantic.Field(default=None)
|
|
92
|
+
"""
|
|
93
|
+
If true, attaches the Letta core tools (e.g. core_memory related functions).
|
|
94
|
+
"""
|
|
95
|
+
|
|
96
|
+
include_multi_agent_tools: typing.Optional[bool] = pydantic.Field(default=None)
|
|
97
|
+
"""
|
|
98
|
+
If true, attaches the Letta multi-agent tools (e.g. sending a message to another agent).
|
|
99
|
+
"""
|
|
100
|
+
|
|
101
|
+
include_base_tool_rules: typing.Optional[bool] = pydantic.Field(default=None)
|
|
102
|
+
"""
|
|
103
|
+
If true, attaches the Letta base tool rules (e.g. deny all tools not explicitly allowed).
|
|
104
|
+
"""
|
|
105
|
+
|
|
106
|
+
include_default_source: typing.Optional[bool] = pydantic.Field(default=None)
|
|
107
|
+
"""
|
|
108
|
+
If true, automatically creates and attaches a default data source for this agent.
|
|
109
|
+
"""
|
|
110
|
+
|
|
111
|
+
description: typing.Optional[str] = pydantic.Field(default=None)
|
|
112
|
+
"""
|
|
113
|
+
The description of the agent.
|
|
114
|
+
"""
|
|
115
|
+
|
|
116
|
+
metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
|
|
117
|
+
"""
|
|
118
|
+
The metadata of the agent.
|
|
119
|
+
"""
|
|
120
|
+
|
|
121
|
+
model: typing.Optional[str] = pydantic.Field(default=None)
|
|
122
|
+
"""
|
|
123
|
+
The LLM configuration handle used by the agent, specified in the format provider/model-name, as an alternative to specifying llm_config.
|
|
124
|
+
"""
|
|
125
|
+
|
|
126
|
+
embedding: typing.Optional[str] = pydantic.Field(default=None)
|
|
127
|
+
"""
|
|
128
|
+
The embedding configuration handle used by the agent, specified in the format provider/model-name.
|
|
129
|
+
"""
|
|
130
|
+
|
|
131
|
+
context_window_limit: typing.Optional[int] = pydantic.Field(default=None)
|
|
132
|
+
"""
|
|
133
|
+
The context window limit used by the agent.
|
|
134
|
+
"""
|
|
135
|
+
|
|
136
|
+
embedding_chunk_size: typing.Optional[int] = pydantic.Field(default=None)
|
|
137
|
+
"""
|
|
138
|
+
The embedding chunk size used by the agent.
|
|
139
|
+
"""
|
|
140
|
+
|
|
141
|
+
max_tokens: typing.Optional[int] = pydantic.Field(default=None)
|
|
142
|
+
"""
|
|
143
|
+
The maximum number of tokens to generate, including reasoning step. If not set, the model will use its default value.
|
|
144
|
+
"""
|
|
145
|
+
|
|
146
|
+
max_reasoning_tokens: typing.Optional[int] = pydantic.Field(default=None)
|
|
147
|
+
"""
|
|
148
|
+
The maximum number of tokens to generate for reasoning step. If not set, the model will use its default value.
|
|
149
|
+
"""
|
|
150
|
+
|
|
151
|
+
enable_reasoner: typing.Optional[bool] = pydantic.Field(default=None)
|
|
152
|
+
"""
|
|
153
|
+
Whether to enable internal extended thinking step for a reasoner model.
|
|
154
|
+
"""
|
|
155
|
+
|
|
156
|
+
reasoning: typing.Optional[bool] = pydantic.Field(default=None)
|
|
157
|
+
"""
|
|
158
|
+
Whether to enable reasoning for this agent.
|
|
159
|
+
"""
|
|
160
|
+
|
|
161
|
+
from_template: typing.Optional[str] = pydantic.Field(default=None)
|
|
162
|
+
"""
|
|
163
|
+
The template id used to configure the agent
|
|
164
|
+
"""
|
|
165
|
+
|
|
166
|
+
template: typing.Optional[bool] = pydantic.Field(default=None)
|
|
167
|
+
"""
|
|
168
|
+
Whether the agent is a template
|
|
169
|
+
"""
|
|
170
|
+
|
|
171
|
+
project: typing.Optional[str] = pydantic.Field(default=None)
|
|
172
|
+
"""
|
|
173
|
+
Deprecated: Project should now be passed via the X-Project header instead of in the request body. If using the sdk, this can be done via the new x_project field below.
|
|
174
|
+
"""
|
|
175
|
+
|
|
176
|
+
tool_exec_environment_variables: typing.Optional[typing.Dict[str, typing.Optional[str]]] = pydantic.Field(
|
|
177
|
+
default=None
|
|
178
|
+
)
|
|
179
|
+
"""
|
|
180
|
+
The environment variables for tool execution specific to this agent.
|
|
181
|
+
"""
|
|
182
|
+
|
|
183
|
+
memory_variables: typing.Optional[typing.Dict[str, typing.Optional[str]]] = pydantic.Field(default=None)
|
|
184
|
+
"""
|
|
185
|
+
The variables that should be set for the agent.
|
|
186
|
+
"""
|
|
187
|
+
|
|
188
|
+
project_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
189
|
+
"""
|
|
190
|
+
The id of the project the agent belongs to.
|
|
191
|
+
"""
|
|
192
|
+
|
|
193
|
+
template_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
194
|
+
"""
|
|
195
|
+
The id of the template the agent belongs to.
|
|
196
|
+
"""
|
|
197
|
+
|
|
198
|
+
base_template_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
199
|
+
"""
|
|
200
|
+
The base template id of the agent.
|
|
201
|
+
"""
|
|
202
|
+
|
|
203
|
+
identity_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
|
|
204
|
+
"""
|
|
205
|
+
The ids of the identities associated with this agent.
|
|
206
|
+
"""
|
|
207
|
+
|
|
208
|
+
message_buffer_autoclear: typing.Optional[bool] = pydantic.Field(default=None)
|
|
209
|
+
"""
|
|
210
|
+
If set to True, the agent will not remember previous messages (though the agent will still retain state via core memory blocks and archival/recall memory). Not recommended unless you have an advanced use case.
|
|
211
|
+
"""
|
|
212
|
+
|
|
213
|
+
enable_sleeptime: typing.Optional[bool] = pydantic.Field(default=None)
|
|
214
|
+
"""
|
|
215
|
+
If set to True, memory management will move to a background agent thread.
|
|
216
|
+
"""
|
|
217
|
+
|
|
218
|
+
response_format: typing.Optional[LettaSchemasAgentFileAgentSchemaResponseFormat] = pydantic.Field(default=None)
|
|
219
|
+
"""
|
|
220
|
+
The response format for the agent.
|
|
221
|
+
"""
|
|
222
|
+
|
|
223
|
+
timezone: typing.Optional[str] = pydantic.Field(default=None)
|
|
224
|
+
"""
|
|
225
|
+
The timezone of the agent (IANA format).
|
|
226
|
+
"""
|
|
227
|
+
|
|
228
|
+
max_files_open: typing.Optional[int] = pydantic.Field(default=None)
|
|
229
|
+
"""
|
|
230
|
+
Maximum number of files that can be open at once for this agent. Setting this too high may exceed the context window, which will break the agent.
|
|
231
|
+
"""
|
|
232
|
+
|
|
233
|
+
per_file_view_window_char_limit: typing.Optional[int] = pydantic.Field(default=None)
|
|
234
|
+
"""
|
|
235
|
+
The per-file view window character limit for this agent. Setting this too high may exceed the context window, which will break the agent.
|
|
236
|
+
"""
|
|
237
|
+
|
|
238
|
+
hidden: typing.Optional[bool] = pydantic.Field(default=None)
|
|
239
|
+
"""
|
|
240
|
+
If set to True, the agent will be hidden.
|
|
241
|
+
"""
|
|
242
|
+
|
|
243
|
+
id: str = pydantic.Field()
|
|
244
|
+
"""
|
|
245
|
+
Human-readable identifier for this agent in the file
|
|
246
|
+
"""
|
|
247
|
+
|
|
248
|
+
in_context_message_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
|
|
249
|
+
"""
|
|
250
|
+
List of message IDs that are currently in the agent's context
|
|
251
|
+
"""
|
|
252
|
+
|
|
253
|
+
messages: typing.Optional[typing.List[LettaSchemasAgentFileMessageSchema]] = pydantic.Field(default=None)
|
|
254
|
+
"""
|
|
255
|
+
List of messages in the agent's conversation history
|
|
256
|
+
"""
|
|
257
|
+
|
|
258
|
+
files_agents: typing.Optional[typing.List[FileAgentSchema]] = pydantic.Field(default=None)
|
|
259
|
+
"""
|
|
260
|
+
List of file-agent relationships for this agent
|
|
261
|
+
"""
|
|
262
|
+
|
|
263
|
+
group_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
|
|
264
|
+
"""
|
|
265
|
+
List of groups that the agent manages
|
|
266
|
+
"""
|
|
267
|
+
|
|
268
|
+
if IS_PYDANTIC_V2:
|
|
269
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
270
|
+
else:
|
|
271
|
+
|
|
272
|
+
class Config:
|
|
273
|
+
frozen = True
|
|
274
|
+
smart_union = True
|
|
275
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from .json_object_response_format import JsonObjectResponseFormat
|
|
6
|
+
from .json_schema_response_format import JsonSchemaResponseFormat
|
|
7
|
+
from .text_response_format import TextResponseFormat
|
|
8
|
+
|
|
9
|
+
LettaSchemasAgentFileAgentSchemaResponseFormat = typing.Union[
|
|
10
|
+
JsonObjectResponseFormat, JsonSchemaResponseFormat, TextResponseFormat
|
|
11
|
+
]
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from .child_tool_rule import ChildToolRule
|
|
6
|
+
from .conditional_tool_rule import ConditionalToolRule
|
|
7
|
+
from .continue_tool_rule import ContinueToolRule
|
|
8
|
+
from .init_tool_rule import InitToolRule
|
|
9
|
+
from .max_count_per_step_tool_rule import MaxCountPerStepToolRule
|
|
10
|
+
from .parent_tool_rule import ParentToolRule
|
|
11
|
+
from .required_before_exit_tool_rule import RequiredBeforeExitToolRule
|
|
12
|
+
from .terminal_tool_rule import TerminalToolRule
|
|
13
|
+
|
|
14
|
+
LettaSchemasAgentFileAgentSchemaToolRulesItem = typing.Union[
|
|
15
|
+
ConditionalToolRule,
|
|
16
|
+
ChildToolRule,
|
|
17
|
+
ContinueToolRule,
|
|
18
|
+
TerminalToolRule,
|
|
19
|
+
MaxCountPerStepToolRule,
|
|
20
|
+
ParentToolRule,
|
|
21
|
+
RequiredBeforeExitToolRule,
|
|
22
|
+
InitToolRule,
|
|
23
|
+
]
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
8
|
+
from .letta_schemas_agent_file_message_schema_content import LettaSchemasAgentFileMessageSchemaContent
|
|
9
|
+
from .message_role import MessageRole
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class LettaSchemasAgentFileMessageSchema(UncheckedBaseModel):
|
|
13
|
+
"""
|
|
14
|
+
Message with human-readable ID for agent file
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
role: MessageRole = pydantic.Field()
|
|
18
|
+
"""
|
|
19
|
+
The role of the participant.
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
content: LettaSchemasAgentFileMessageSchemaContent = pydantic.Field()
|
|
23
|
+
"""
|
|
24
|
+
The content of the message.
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
name: typing.Optional[str] = pydantic.Field(default=None)
|
|
28
|
+
"""
|
|
29
|
+
The name of the participant.
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
otid: typing.Optional[str] = pydantic.Field(default=None)
|
|
33
|
+
"""
|
|
34
|
+
The offline threading id associated with this message
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
sender_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
38
|
+
"""
|
|
39
|
+
The id of the sender of the message, can be an identity id or agent id
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
batch_item_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
43
|
+
"""
|
|
44
|
+
The id of the LLMBatchItem that this message is associated with
|
|
45
|
+
"""
|
|
46
|
+
|
|
47
|
+
group_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
48
|
+
"""
|
|
49
|
+
The multi-agent group that the message was sent in
|
|
50
|
+
"""
|
|
51
|
+
|
|
52
|
+
id: str = pydantic.Field()
|
|
53
|
+
"""
|
|
54
|
+
Human-readable identifier for this message in the file
|
|
55
|
+
"""
|
|
56
|
+
|
|
57
|
+
model: typing.Optional[str] = pydantic.Field(default=None)
|
|
58
|
+
"""
|
|
59
|
+
The model used to make the function call
|
|
60
|
+
"""
|
|
61
|
+
|
|
62
|
+
agent_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
63
|
+
"""
|
|
64
|
+
The unique identifier of the agent
|
|
65
|
+
"""
|
|
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
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
import typing_extensions
|
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
|
+
from ..core.serialization import FieldMetadata
|
|
9
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
10
|
+
from .npm_requirement import NpmRequirement
|
|
11
|
+
from .pip_requirement import PipRequirement
|
|
12
|
+
from .tool_type import ToolType
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class LettaSchemasAgentFileToolSchema(UncheckedBaseModel):
|
|
16
|
+
"""
|
|
17
|
+
Tool with human-readable ID for agent file
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
id: str = pydantic.Field()
|
|
21
|
+
"""
|
|
22
|
+
Human-readable identifier for this tool in the file
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
tool_type: typing.Optional[ToolType] = pydantic.Field(default=None)
|
|
26
|
+
"""
|
|
27
|
+
The type of the tool.
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
description: typing.Optional[str] = pydantic.Field(default=None)
|
|
31
|
+
"""
|
|
32
|
+
The description of the tool.
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
source_type: typing.Optional[str] = pydantic.Field(default=None)
|
|
36
|
+
"""
|
|
37
|
+
The type of the source code.
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
name: typing.Optional[str] = pydantic.Field(default=None)
|
|
41
|
+
"""
|
|
42
|
+
The name of the function.
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
tags: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
|
|
46
|
+
"""
|
|
47
|
+
Metadata tags.
|
|
48
|
+
"""
|
|
49
|
+
|
|
50
|
+
source_code: typing.Optional[str] = pydantic.Field(default=None)
|
|
51
|
+
"""
|
|
52
|
+
The source code of the function.
|
|
53
|
+
"""
|
|
54
|
+
|
|
55
|
+
json_schema: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
|
|
56
|
+
"""
|
|
57
|
+
The JSON schema of the function.
|
|
58
|
+
"""
|
|
59
|
+
|
|
60
|
+
args_json_schema: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
|
|
61
|
+
"""
|
|
62
|
+
The args JSON schema of the function.
|
|
63
|
+
"""
|
|
64
|
+
|
|
65
|
+
return_char_limit: typing.Optional[int] = pydantic.Field(default=None)
|
|
66
|
+
"""
|
|
67
|
+
The maximum number of characters in the response.
|
|
68
|
+
"""
|
|
69
|
+
|
|
70
|
+
pip_requirements: typing.Optional[typing.List[PipRequirement]] = pydantic.Field(default=None)
|
|
71
|
+
"""
|
|
72
|
+
Optional list of pip packages required by this tool.
|
|
73
|
+
"""
|
|
74
|
+
|
|
75
|
+
npm_requirements: typing.Optional[typing.List[NpmRequirement]] = pydantic.Field(default=None)
|
|
76
|
+
"""
|
|
77
|
+
Optional list of npm packages required by this tool.
|
|
78
|
+
"""
|
|
79
|
+
|
|
80
|
+
created_by_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
81
|
+
"""
|
|
82
|
+
The id of the user that made this Tool.
|
|
83
|
+
"""
|
|
84
|
+
|
|
85
|
+
last_updated_by_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
86
|
+
"""
|
|
87
|
+
The id of the user that made this Tool.
|
|
88
|
+
"""
|
|
89
|
+
|
|
90
|
+
metadata: typing_extensions.Annotated[
|
|
91
|
+
typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]], FieldMetadata(alias="metadata_")
|
|
92
|
+
] = pydantic.Field(default=None)
|
|
93
|
+
"""
|
|
94
|
+
A dictionary of additional metadata for the tool.
|
|
95
|
+
"""
|
|
96
|
+
|
|
97
|
+
if IS_PYDANTIC_V2:
|
|
98
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
99
|
+
else:
|
|
100
|
+
|
|
101
|
+
class Config:
|
|
102
|
+
frozen = True
|
|
103
|
+
smart_union = True
|
|
104
|
+
extra = pydantic.Extra.allow
|
letta_client/types/{agent_schema.py → letta_serialize_schemas_pydantic_agent_schema_agent_schema.py}
RENAMED
|
@@ -7,17 +7,23 @@ import typing_extensions
|
|
|
7
7
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
8
|
from ..core.serialization import FieldMetadata
|
|
9
9
|
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
10
|
-
from .agent_schema_tool_rules_item import AgentSchemaToolRulesItem
|
|
11
10
|
from .core_memory_block_schema import CoreMemoryBlockSchema
|
|
12
11
|
from .embedding_config import EmbeddingConfig
|
|
12
|
+
from .letta_serialize_schemas_pydantic_agent_schema_agent_schema_tool_rules_item import (
|
|
13
|
+
LettaSerializeSchemasPydanticAgentSchemaAgentSchemaToolRulesItem,
|
|
14
|
+
)
|
|
15
|
+
from .letta_serialize_schemas_pydantic_agent_schema_message_schema import (
|
|
16
|
+
LettaSerializeSchemasPydanticAgentSchemaMessageSchema,
|
|
17
|
+
)
|
|
18
|
+
from .letta_serialize_schemas_pydantic_agent_schema_tool_schema import (
|
|
19
|
+
LettaSerializeSchemasPydanticAgentSchemaToolSchema,
|
|
20
|
+
)
|
|
13
21
|
from .llm_config import LlmConfig
|
|
14
|
-
from .message_schema import MessageSchema
|
|
15
22
|
from .tag_schema import TagSchema
|
|
16
23
|
from .tool_env_var_schema import ToolEnvVarSchema
|
|
17
|
-
from .tool_schema import ToolSchema
|
|
18
24
|
|
|
19
25
|
|
|
20
|
-
class
|
|
26
|
+
class LettaSerializeSchemasPydanticAgentSchemaAgentSchema(UncheckedBaseModel):
|
|
21
27
|
agent_type: str
|
|
22
28
|
core_memory: typing.List[CoreMemoryBlockSchema]
|
|
23
29
|
created_at: str
|
|
@@ -26,7 +32,7 @@ class AgentSchema(UncheckedBaseModel):
|
|
|
26
32
|
llm_config: LlmConfig
|
|
27
33
|
message_buffer_autoclear: bool
|
|
28
34
|
in_context_message_indices: typing.List[int]
|
|
29
|
-
messages: typing.List[
|
|
35
|
+
messages: typing.List[LettaSerializeSchemasPydanticAgentSchemaMessageSchema]
|
|
30
36
|
metadata: typing_extensions.Annotated[
|
|
31
37
|
typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]], FieldMetadata(alias="metadata_")
|
|
32
38
|
] = None
|
|
@@ -35,8 +41,8 @@ class AgentSchema(UncheckedBaseModel):
|
|
|
35
41
|
system: str
|
|
36
42
|
tags: typing.List[TagSchema]
|
|
37
43
|
tool_exec_environment_variables: typing.List[ToolEnvVarSchema]
|
|
38
|
-
tool_rules: typing.List[
|
|
39
|
-
tools: typing.List[
|
|
44
|
+
tool_rules: typing.List[LettaSerializeSchemasPydanticAgentSchemaAgentSchemaToolRulesItem]
|
|
45
|
+
tools: typing.List[LettaSerializeSchemasPydanticAgentSchemaToolSchema]
|
|
40
46
|
updated_at: str
|
|
41
47
|
version: str
|
|
42
48
|
|
|
@@ -7,6 +7,6 @@ from .child_tool_rule_schema import ChildToolRuleSchema
|
|
|
7
7
|
from .conditional_tool_rule_schema import ConditionalToolRuleSchema
|
|
8
8
|
from .max_count_per_step_tool_rule_schema import MaxCountPerStepToolRuleSchema
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
LettaSerializeSchemasPydanticAgentSchemaAgentSchemaToolRulesItem = typing.Union[
|
|
11
11
|
BaseToolRuleSchema, ChildToolRuleSchema, MaxCountPerStepToolRuleSchema, ConditionalToolRuleSchema
|
|
12
12
|
]
|
|
@@ -8,7 +8,7 @@ from ..core.unchecked_base_model import UncheckedBaseModel
|
|
|
8
8
|
from .letta_message_content_union import LettaMessageContentUnion
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
class
|
|
11
|
+
class LettaSerializeSchemasPydanticAgentSchemaMessageSchema(UncheckedBaseModel):
|
|
12
12
|
created_at: str
|
|
13
13
|
group_id: typing.Optional[str] = None
|
|
14
14
|
model: typing.Optional[str] = None
|
letta_client/types/{tool_schema.py → letta_serialize_schemas_pydantic_agent_schema_tool_schema.py}
RENAMED
|
@@ -10,7 +10,7 @@ from ..core.unchecked_base_model import UncheckedBaseModel
|
|
|
10
10
|
from .tool_json_schema import ToolJsonSchema
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
class
|
|
13
|
+
class LettaSerializeSchemasPydanticAgentSchemaToolSchema(UncheckedBaseModel):
|
|
14
14
|
args_json_schema: typing.Optional[typing.Any] = None
|
|
15
15
|
created_at: str
|
|
16
16
|
description: str
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
import typing_extensions
|
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
|
+
from ..core.serialization import FieldMetadata
|
|
9
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class McpServerSchema(UncheckedBaseModel):
|
|
13
|
+
"""
|
|
14
|
+
MCP server schema for agent files with remapped ID.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
id: str = pydantic.Field()
|
|
18
|
+
"""
|
|
19
|
+
Human-readable MCP server ID
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
server_type: str
|
|
23
|
+
server_name: str
|
|
24
|
+
server_url: typing.Optional[str] = None
|
|
25
|
+
stdio_config: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
|
|
26
|
+
metadata: typing_extensions.Annotated[
|
|
27
|
+
typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]], FieldMetadata(alias="metadata_")
|
|
28
|
+
] = None
|
|
29
|
+
|
|
30
|
+
if IS_PYDANTIC_V2:
|
|
31
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
32
|
+
else:
|
|
33
|
+
|
|
34
|
+
class Config:
|
|
35
|
+
frozen = True
|
|
36
|
+
smart_union = True
|
|
37
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
8
|
+
from .embedding_config import EmbeddingConfig
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class SourceSchema(UncheckedBaseModel):
|
|
12
|
+
"""
|
|
13
|
+
Source with human-readable ID for agent file
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
name: str = pydantic.Field()
|
|
17
|
+
"""
|
|
18
|
+
The name of the source.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
description: typing.Optional[str] = pydantic.Field(default=None)
|
|
22
|
+
"""
|
|
23
|
+
The description of the source.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
instructions: typing.Optional[str] = pydantic.Field(default=None)
|
|
27
|
+
"""
|
|
28
|
+
Instructions for how to use the source.
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
|
|
32
|
+
"""
|
|
33
|
+
Metadata associated with the source.
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
embedding: typing.Optional[str] = pydantic.Field(default=None)
|
|
37
|
+
"""
|
|
38
|
+
The handle for the embedding config used by the source.
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
embedding_chunk_size: typing.Optional[int] = pydantic.Field(default=None)
|
|
42
|
+
"""
|
|
43
|
+
The chunk size of the embedding.
|
|
44
|
+
"""
|
|
45
|
+
|
|
46
|
+
embedding_config: typing.Optional[EmbeddingConfig] = pydantic.Field(default=None)
|
|
47
|
+
"""
|
|
48
|
+
(Legacy) The embedding configuration used by the source.
|
|
49
|
+
"""
|
|
50
|
+
|
|
51
|
+
id: str = pydantic.Field()
|
|
52
|
+
"""
|
|
53
|
+
Human-readable identifier for this source in the file
|
|
54
|
+
"""
|
|
55
|
+
|
|
56
|
+
if IS_PYDANTIC_V2:
|
|
57
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
58
|
+
else:
|
|
59
|
+
|
|
60
|
+
class Config:
|
|
61
|
+
frozen = True
|
|
62
|
+
smart_union = True
|
|
63
|
+
extra = pydantic.Extra.allow
|