letta-client 0.1.251__py3-none-any.whl → 0.1.252__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.

Files changed (28) hide show
  1. letta_client/__init__.py +40 -8
  2. letta_client/agents/client.py +31 -8
  3. letta_client/agents/raw_client.py +31 -10
  4. letta_client/core/client_wrapper.py +2 -2
  5. letta_client/types/__init__.py +48 -8
  6. letta_client/types/agent_file_schema.py +75 -0
  7. letta_client/types/block_schema.py +73 -0
  8. letta_client/types/body_export_agent_serialized.py +25 -0
  9. letta_client/types/file_agent_schema.py +73 -0
  10. letta_client/types/file_schema.py +93 -0
  11. letta_client/types/group_schema.py +53 -0
  12. letta_client/types/group_schema_manager_config.py +13 -0
  13. letta_client/types/imported_agents_response.py +27 -0
  14. letta_client/types/letta_schemas_agent_file_agent_schema.py +275 -0
  15. letta_client/types/letta_schemas_agent_file_agent_schema_response_format.py +11 -0
  16. letta_client/types/letta_schemas_agent_file_agent_schema_tool_rules_item.py +23 -0
  17. letta_client/types/letta_schemas_agent_file_message_schema.py +74 -0
  18. letta_client/types/letta_schemas_agent_file_message_schema_content.py +7 -0
  19. letta_client/types/letta_schemas_agent_file_tool_schema.py +104 -0
  20. letta_client/types/{agent_schema.py → letta_serialize_schemas_pydantic_agent_schema_agent_schema.py} +13 -7
  21. letta_client/types/{agent_schema_tool_rules_item.py → letta_serialize_schemas_pydantic_agent_schema_agent_schema_tool_rules_item.py} +1 -1
  22. letta_client/types/{message_schema.py → letta_serialize_schemas_pydantic_agent_schema_message_schema.py} +1 -1
  23. letta_client/types/{tool_schema.py → letta_serialize_schemas_pydantic_agent_schema_tool_schema.py} +1 -1
  24. letta_client/types/mcp_server_schema.py +37 -0
  25. letta_client/types/source_schema.py +63 -0
  26. {letta_client-0.1.251.dist-info → letta_client-0.1.252.dist-info}/METADATA +1 -1
  27. {letta_client-0.1.251.dist-info → letta_client-0.1.252.dist-info}/RECORD +28 -12
  28. {letta_client-0.1.251.dist-info → letta_client-0.1.252.dist-info}/WHEEL +0 -0
@@ -0,0 +1,75 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import datetime as dt
4
+ import typing
5
+
6
+ import pydantic
7
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
8
+ from ..core.unchecked_base_model import UncheckedBaseModel
9
+ from .block_schema import BlockSchema
10
+ from .file_schema import FileSchema
11
+ from .group_schema import GroupSchema
12
+ from .letta_schemas_agent_file_agent_schema import LettaSchemasAgentFileAgentSchema
13
+ from .letta_schemas_agent_file_tool_schema import LettaSchemasAgentFileToolSchema
14
+ from .mcp_server_schema import McpServerSchema
15
+ from .source_schema import SourceSchema
16
+
17
+
18
+ class AgentFileSchema(UncheckedBaseModel):
19
+ """
20
+ Schema for serialized agent file that can be exported to JSON and imported into agent server.
21
+ """
22
+
23
+ agents: typing.List[LettaSchemasAgentFileAgentSchema] = pydantic.Field()
24
+ """
25
+ List of agents in this agent file
26
+ """
27
+
28
+ groups: typing.List[GroupSchema] = pydantic.Field()
29
+ """
30
+ List of groups in this agent file
31
+ """
32
+
33
+ blocks: typing.List[BlockSchema] = pydantic.Field()
34
+ """
35
+ List of memory blocks in this agent file
36
+ """
37
+
38
+ files: typing.List[FileSchema] = pydantic.Field()
39
+ """
40
+ List of files in this agent file
41
+ """
42
+
43
+ sources: typing.List[SourceSchema] = pydantic.Field()
44
+ """
45
+ List of sources in this agent file
46
+ """
47
+
48
+ tools: typing.List[LettaSchemasAgentFileToolSchema] = pydantic.Field()
49
+ """
50
+ List of tools in this agent file
51
+ """
52
+
53
+ mcp_servers: typing.List[McpServerSchema] = pydantic.Field()
54
+ """
55
+ List of MCP servers in this agent file
56
+ """
57
+
58
+ metadata: typing.Optional[typing.Dict[str, str]] = pydantic.Field(default=None)
59
+ """
60
+ Metadata for this agent file, including revision_id and other export information.
61
+ """
62
+
63
+ created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
64
+ """
65
+ The timestamp when the object was created.
66
+ """
67
+
68
+ if IS_PYDANTIC_V2:
69
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
70
+ else:
71
+
72
+ class Config:
73
+ frozen = True
74
+ smart_union = True
75
+ extra = pydantic.Extra.allow
@@ -0,0 +1,73 @@
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
+
9
+
10
+ class BlockSchema(UncheckedBaseModel):
11
+ """
12
+ Block with human-readable ID for agent file
13
+ """
14
+
15
+ value: str = pydantic.Field()
16
+ """
17
+ Value of the block.
18
+ """
19
+
20
+ limit: typing.Optional[int] = pydantic.Field(default=None)
21
+ """
22
+ Character limit of the block.
23
+ """
24
+
25
+ project_id: typing.Optional[str] = pydantic.Field(default=None)
26
+ """
27
+ The associated project id.
28
+ """
29
+
30
+ name: typing.Optional[str] = pydantic.Field(default=None)
31
+ """
32
+ Name of the block if it is a template.
33
+ """
34
+
35
+ is_template: typing.Optional[bool] = None
36
+ preserve_on_migration: typing.Optional[bool] = pydantic.Field(default=None)
37
+ """
38
+ Preserve the block on template migration.
39
+ """
40
+
41
+ label: str = pydantic.Field()
42
+ """
43
+ Label of the block.
44
+ """
45
+
46
+ read_only: typing.Optional[bool] = pydantic.Field(default=None)
47
+ """
48
+ Whether the agent has read-only access to the block.
49
+ """
50
+
51
+ description: typing.Optional[str] = pydantic.Field(default=None)
52
+ """
53
+ Description of the block.
54
+ """
55
+
56
+ metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
57
+ """
58
+ Metadata of the block.
59
+ """
60
+
61
+ id: str = pydantic.Field()
62
+ """
63
+ Human-readable identifier for this block in the file
64
+ """
65
+
66
+ if IS_PYDANTIC_V2:
67
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
68
+ else:
69
+
70
+ class Config:
71
+ frozen = True
72
+ smart_union = True
73
+ extra = pydantic.Extra.allow
@@ -0,0 +1,25 @@
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_file_schema import AgentFileSchema
9
+ from .letta_serialize_schemas_pydantic_agent_schema_agent_schema import (
10
+ LettaSerializeSchemasPydanticAgentSchemaAgentSchema,
11
+ )
12
+
13
+
14
+ class BodyExportAgentSerialized(UncheckedBaseModel):
15
+ spec: typing.Optional[AgentFileSchema] = None
16
+ legacy_spec: typing.Optional[LettaSerializeSchemasPydanticAgentSchemaAgentSchema] = None
17
+
18
+ if IS_PYDANTIC_V2:
19
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
20
+ else:
21
+
22
+ class Config:
23
+ frozen = True
24
+ smart_union = True
25
+ extra = pydantic.Extra.allow
@@ -0,0 +1,73 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import datetime as dt
4
+ import typing
5
+
6
+ import pydantic
7
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
8
+ from ..core.unchecked_base_model import UncheckedBaseModel
9
+
10
+
11
+ class FileAgentSchema(UncheckedBaseModel):
12
+ """
13
+ File-Agent relationship with human-readable ID for agent file
14
+ """
15
+
16
+ agent_id: str = pydantic.Field()
17
+ """
18
+ Unique identifier of the agent.
19
+ """
20
+
21
+ file_id: str = pydantic.Field()
22
+ """
23
+ Unique identifier of the file.
24
+ """
25
+
26
+ source_id: str = pydantic.Field()
27
+ """
28
+ Unique identifier of the source.
29
+ """
30
+
31
+ file_name: str = pydantic.Field()
32
+ """
33
+ Name of the file.
34
+ """
35
+
36
+ is_open: typing.Optional[bool] = pydantic.Field(default=None)
37
+ """
38
+ True if the agent currently has the file open.
39
+ """
40
+
41
+ visible_content: typing.Optional[str] = pydantic.Field(default=None)
42
+ """
43
+ Portion of the file the agent is focused on (may be large).
44
+ """
45
+
46
+ last_accessed_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
47
+ """
48
+ UTC timestamp of the agent's most recent access to this file.
49
+ """
50
+
51
+ start_line: typing.Optional[int] = pydantic.Field(default=None)
52
+ """
53
+ Starting line number (1-indexed) when file was opened with line range.
54
+ """
55
+
56
+ end_line: typing.Optional[int] = pydantic.Field(default=None)
57
+ """
58
+ Ending line number (exclusive) when file was opened with line range.
59
+ """
60
+
61
+ id: str = pydantic.Field()
62
+ """
63
+ Human-readable identifier for this file-agent relationship in the file
64
+ """
65
+
66
+ if IS_PYDANTIC_V2:
67
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
68
+ else:
69
+
70
+ class Config:
71
+ frozen = True
72
+ smart_union = True
73
+ extra = pydantic.Extra.allow
@@ -0,0 +1,93 @@
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 .file_processing_status import FileProcessingStatus
9
+
10
+
11
+ class FileSchema(UncheckedBaseModel):
12
+ """
13
+ File with human-readable ID for agent file
14
+ """
15
+
16
+ source_id: str = pydantic.Field()
17
+ """
18
+ The unique identifier of the source associated with the document.
19
+ """
20
+
21
+ file_name: typing.Optional[str] = pydantic.Field(default=None)
22
+ """
23
+ The name of the file.
24
+ """
25
+
26
+ original_file_name: typing.Optional[str] = pydantic.Field(default=None)
27
+ """
28
+ The original name of the file as uploaded.
29
+ """
30
+
31
+ file_path: typing.Optional[str] = pydantic.Field(default=None)
32
+ """
33
+ The path to the file.
34
+ """
35
+
36
+ file_type: typing.Optional[str] = pydantic.Field(default=None)
37
+ """
38
+ The type of the file (MIME type).
39
+ """
40
+
41
+ file_size: typing.Optional[int] = pydantic.Field(default=None)
42
+ """
43
+ The size of the file in bytes.
44
+ """
45
+
46
+ file_creation_date: typing.Optional[str] = pydantic.Field(default=None)
47
+ """
48
+ The creation date of the file.
49
+ """
50
+
51
+ file_last_modified_date: typing.Optional[str] = pydantic.Field(default=None)
52
+ """
53
+ The last modified date of the file.
54
+ """
55
+
56
+ processing_status: typing.Optional[FileProcessingStatus] = pydantic.Field(default=None)
57
+ """
58
+ The current processing status of the file (e.g. pending, parsing, embedding, completed, error).
59
+ """
60
+
61
+ error_message: typing.Optional[str] = pydantic.Field(default=None)
62
+ """
63
+ Optional error message if the file failed processing.
64
+ """
65
+
66
+ total_chunks: typing.Optional[int] = pydantic.Field(default=None)
67
+ """
68
+ Total number of chunks for the file.
69
+ """
70
+
71
+ chunks_embedded: typing.Optional[int] = pydantic.Field(default=None)
72
+ """
73
+ Number of chunks that have been embedded.
74
+ """
75
+
76
+ content: typing.Optional[str] = pydantic.Field(default=None)
77
+ """
78
+ Optional full-text content of the file; only populated on demand due to its size.
79
+ """
80
+
81
+ id: str = pydantic.Field()
82
+ """
83
+ Human-readable identifier for this file in the file
84
+ """
85
+
86
+ if IS_PYDANTIC_V2:
87
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
88
+ else:
89
+
90
+ class Config:
91
+ frozen = True
92
+ smart_union = True
93
+ extra = pydantic.Extra.allow
@@ -0,0 +1,53 @@
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 .group_schema_manager_config import GroupSchemaManagerConfig
9
+
10
+
11
+ class GroupSchema(UncheckedBaseModel):
12
+ """
13
+ Group with human-readable ID for agent file
14
+ """
15
+
16
+ agent_ids: typing.List[str] = pydantic.Field()
17
+ """
18
+
19
+ """
20
+
21
+ description: str = pydantic.Field()
22
+ """
23
+
24
+ """
25
+
26
+ manager_config: typing.Optional[GroupSchemaManagerConfig] = pydantic.Field(default=None)
27
+ """
28
+
29
+ """
30
+
31
+ project_id: typing.Optional[str] = pydantic.Field(default=None)
32
+ """
33
+ The associated project id.
34
+ """
35
+
36
+ shared_block_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
37
+ """
38
+
39
+ """
40
+
41
+ id: str = pydantic.Field()
42
+ """
43
+ Human-readable identifier for this group in the file
44
+ """
45
+
46
+ if IS_PYDANTIC_V2:
47
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
48
+ else:
49
+
50
+ class Config:
51
+ frozen = True
52
+ smart_union = True
53
+ extra = pydantic.Extra.allow
@@ -0,0 +1,13 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ from .dynamic_manager import DynamicManager
6
+ from .round_robin_manager import RoundRobinManager
7
+ from .sleeptime_manager import SleeptimeManager
8
+ from .supervisor_manager import SupervisorManager
9
+ from .voice_sleeptime_manager import VoiceSleeptimeManager
10
+
11
+ GroupSchemaManagerConfig = typing.Union[
12
+ DynamicManager, RoundRobinManager, SleeptimeManager, SupervisorManager, VoiceSleeptimeManager
13
+ ]
@@ -0,0 +1,27 @@
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
+
9
+
10
+ class ImportedAgentsResponse(UncheckedBaseModel):
11
+ """
12
+ Response model for imported agents
13
+ """
14
+
15
+ agent_ids: typing.List[str] = pydantic.Field()
16
+ """
17
+ List of IDs of the imported agents
18
+ """
19
+
20
+ if IS_PYDANTIC_V2:
21
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
22
+ else:
23
+
24
+ class Config:
25
+ frozen = True
26
+ smart_union = True
27
+ extra = pydantic.Extra.allow