letta-client 1.0.0a11__py3-none-any.whl → 1.0.0a12__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/_client.py +23 -0
- letta_client/_streaming.py +4 -6
- letta_client/_version.py +1 -1
- letta_client/resources/__init__.py +14 -0
- letta_client/resources/agents/agents.py +0 -8
- letta_client/resources/groups/groups.py +1 -17
- letta_client/resources/identities/identities.py +1 -17
- letta_client/resources/mcp_servers/__init__.py +47 -0
- letta_client/resources/mcp_servers/mcp_servers.py +1165 -0
- letta_client/resources/mcp_servers/refresh.py +192 -0
- letta_client/resources/mcp_servers/tools.py +351 -0
- letta_client/resources/steps/steps.py +1 -9
- letta_client/resources/tools.py +4 -4
- letta_client/types/__init__.py +6 -0
- letta_client/types/agent_create_params.py +1 -5
- letta_client/types/group_create_params.py +1 -5
- letta_client/types/group_modify_params.py +1 -5
- letta_client/types/identity_create_params.py +1 -5
- letta_client/types/identity_upsert_params.py +1 -5
- letta_client/types/mcp_server_create_params.py +67 -0
- letta_client/types/mcp_server_create_response.py +74 -0
- letta_client/types/mcp_server_list_response.py +86 -0
- letta_client/types/mcp_server_modify_params.py +76 -0
- letta_client/types/mcp_server_modify_response.py +74 -0
- letta_client/types/mcp_server_retrieve_response.py +74 -0
- letta_client/types/mcp_servers/__init__.py +8 -0
- letta_client/types/mcp_servers/refresh_trigger_params.py +12 -0
- letta_client/types/mcp_servers/tool_list_response.py +10 -0
- letta_client/types/mcp_servers/tool_run_params.py +15 -0
- letta_client/types/mcp_servers/tool_run_response.py +43 -0
- letta_client/types/step_list_params.py +1 -5
- letta_client/types/tool.py +4 -4
- {letta_client-1.0.0a11.dist-info → letta_client-1.0.0a12.dist-info}/METADATA +1 -1
- {letta_client-1.0.0a11.dist-info → letta_client-1.0.0a12.dist-info}/RECORD +36 -21
- {letta_client-1.0.0a11.dist-info → letta_client-1.0.0a12.dist-info}/WHEEL +0 -0
- {letta_client-1.0.0a11.dist-info → letta_client-1.0.0a12.dist-info}/licenses/LICENSE +0 -0
|
@@ -3,10 +3,9 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
from typing import Union, Optional
|
|
6
|
-
from typing_extensions import Required,
|
|
6
|
+
from typing_extensions import Required, TypeAlias, TypedDict
|
|
7
7
|
|
|
8
8
|
from .._types import SequenceNotStr
|
|
9
|
-
from .._utils import PropertyInfo
|
|
10
9
|
from .dynamic_manager_param import DynamicManagerParam
|
|
11
10
|
from .sleeptime_manager_param import SleeptimeManagerParam
|
|
12
11
|
from .supervisor_manager_param import SupervisorManagerParam
|
|
@@ -31,9 +30,6 @@ class GroupCreateParams(TypedDict, total=False):
|
|
|
31
30
|
|
|
32
31
|
shared_block_ids: SequenceNotStr[str]
|
|
33
32
|
|
|
34
|
-
x_project: Annotated[str, PropertyInfo(alias="X-Project")]
|
|
35
|
-
"""The project slug to associate with the group (cloud only)."""
|
|
36
|
-
|
|
37
33
|
|
|
38
34
|
ManagerConfig: TypeAlias = Union[
|
|
39
35
|
RoundRobinManagerParam,
|
|
@@ -3,10 +3,9 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
from typing import Union, Optional
|
|
6
|
-
from typing_extensions import Literal, Required,
|
|
6
|
+
from typing_extensions import Literal, Required, TypeAlias, TypedDict
|
|
7
7
|
|
|
8
8
|
from .._types import SequenceNotStr
|
|
9
|
-
from .._utils import PropertyInfo
|
|
10
9
|
|
|
11
10
|
__all__ = [
|
|
12
11
|
"GroupModifyParams",
|
|
@@ -31,9 +30,6 @@ class GroupModifyParams(TypedDict, total=False):
|
|
|
31
30
|
|
|
32
31
|
shared_block_ids: Optional[SequenceNotStr[str]]
|
|
33
32
|
|
|
34
|
-
x_project: Annotated[str, PropertyInfo(alias="X-Project")]
|
|
35
|
-
"""The project slug to associate with the group (cloud only)."""
|
|
36
|
-
|
|
37
33
|
|
|
38
34
|
class ManagerConfigRoundRobinManagerUpdate(TypedDict, total=False):
|
|
39
35
|
manager_type: Literal["round_robin"]
|
|
@@ -3,10 +3,9 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
from typing import Iterable, Optional
|
|
6
|
-
from typing_extensions import Required,
|
|
6
|
+
from typing_extensions import Required, TypedDict
|
|
7
7
|
|
|
8
8
|
from .._types import SequenceNotStr
|
|
9
|
-
from .._utils import PropertyInfo
|
|
10
9
|
from .identity_type import IdentityType
|
|
11
10
|
from .identity_property_param import IdentityPropertyParam
|
|
12
11
|
|
|
@@ -34,6 +33,3 @@ class IdentityCreateParams(TypedDict, total=False):
|
|
|
34
33
|
|
|
35
34
|
properties: Optional[Iterable[IdentityPropertyParam]]
|
|
36
35
|
"""List of properties associated with the identity."""
|
|
37
|
-
|
|
38
|
-
x_project: Annotated[str, PropertyInfo(alias="X-Project")]
|
|
39
|
-
"""The project slug to associate with the identity (cloud only)."""
|
|
@@ -3,10 +3,9 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
from typing import Iterable, Optional
|
|
6
|
-
from typing_extensions import Required,
|
|
6
|
+
from typing_extensions import Required, TypedDict
|
|
7
7
|
|
|
8
8
|
from .._types import SequenceNotStr
|
|
9
|
-
from .._utils import PropertyInfo
|
|
10
9
|
from .identity_type import IdentityType
|
|
11
10
|
from .identity_property_param import IdentityPropertyParam
|
|
12
11
|
|
|
@@ -34,6 +33,3 @@ class IdentityUpsertParams(TypedDict, total=False):
|
|
|
34
33
|
|
|
35
34
|
properties: Optional[Iterable[IdentityPropertyParam]]
|
|
36
35
|
"""List of properties associated with the identity."""
|
|
37
|
-
|
|
38
|
-
x_project: Annotated[str, PropertyInfo(alias="X-Project")]
|
|
39
|
-
"""The project slug to associate with the identity (cloud only)."""
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Dict, Union, Optional
|
|
6
|
+
from typing_extensions import Literal, Required, TypeAlias, TypedDict
|
|
7
|
+
|
|
8
|
+
from .._types import SequenceNotStr
|
|
9
|
+
|
|
10
|
+
__all__ = ["McpServerCreateParams", "CreateStdioMcpServer", "CreateSsemcpServer", "CreateStreamableHttpmcpServer"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class CreateStdioMcpServer(TypedDict, total=False):
|
|
14
|
+
args: Required[SequenceNotStr[str]]
|
|
15
|
+
"""The arguments to pass to the command"""
|
|
16
|
+
|
|
17
|
+
command: Required[str]
|
|
18
|
+
"""The command to run (MCP 'local' client will run this command)"""
|
|
19
|
+
|
|
20
|
+
server_name: Required[str]
|
|
21
|
+
"""The name of the server"""
|
|
22
|
+
|
|
23
|
+
env: Optional[Dict[str, str]]
|
|
24
|
+
"""Environment variables to set"""
|
|
25
|
+
|
|
26
|
+
type: Literal["sse", "stdio", "streamable_http"]
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class CreateSsemcpServer(TypedDict, total=False):
|
|
30
|
+
server_name: Required[str]
|
|
31
|
+
"""The name of the server"""
|
|
32
|
+
|
|
33
|
+
server_url: Required[str]
|
|
34
|
+
"""The URL of the server"""
|
|
35
|
+
|
|
36
|
+
auth_header: Optional[str]
|
|
37
|
+
"""The name of the authentication header (e.g., 'Authorization')"""
|
|
38
|
+
|
|
39
|
+
auth_token: Optional[str]
|
|
40
|
+
"""The authentication token or API key value"""
|
|
41
|
+
|
|
42
|
+
custom_headers: Optional[Dict[str, str]]
|
|
43
|
+
"""Custom HTTP headers to include with requests"""
|
|
44
|
+
|
|
45
|
+
type: Literal["sse", "stdio", "streamable_http"]
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
class CreateStreamableHttpmcpServer(TypedDict, total=False):
|
|
49
|
+
server_name: Required[str]
|
|
50
|
+
"""The name of the server"""
|
|
51
|
+
|
|
52
|
+
server_url: Required[str]
|
|
53
|
+
"""The URL of the server"""
|
|
54
|
+
|
|
55
|
+
auth_header: Optional[str]
|
|
56
|
+
"""The name of the authentication header (e.g., 'Authorization')"""
|
|
57
|
+
|
|
58
|
+
auth_token: Optional[str]
|
|
59
|
+
"""The authentication token or API key value"""
|
|
60
|
+
|
|
61
|
+
custom_headers: Optional[Dict[str, str]]
|
|
62
|
+
"""Custom HTTP headers to include with requests"""
|
|
63
|
+
|
|
64
|
+
type: Literal["sse", "stdio", "streamable_http"]
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
McpServerCreateParams: TypeAlias = Union[CreateStdioMcpServer, CreateSsemcpServer, CreateStreamableHttpmcpServer]
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Dict, List, Union, Optional
|
|
4
|
+
from typing_extensions import Literal, TypeAlias
|
|
5
|
+
|
|
6
|
+
from .._models import BaseModel
|
|
7
|
+
|
|
8
|
+
__all__ = ["McpServerCreateResponse", "StdioMcpServer", "SsemcpServer", "StreamableHttpmcpServer"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class StdioMcpServer(BaseModel):
|
|
12
|
+
args: List[str]
|
|
13
|
+
"""The arguments to pass to the command"""
|
|
14
|
+
|
|
15
|
+
command: str
|
|
16
|
+
"""The command to run (MCP 'local' client will run this command)"""
|
|
17
|
+
|
|
18
|
+
server_name: str
|
|
19
|
+
"""The name of the server"""
|
|
20
|
+
|
|
21
|
+
id: Optional[str] = None
|
|
22
|
+
"""The human-friendly ID of the Mcp_server"""
|
|
23
|
+
|
|
24
|
+
env: Optional[Dict[str, str]] = None
|
|
25
|
+
"""Environment variables to set"""
|
|
26
|
+
|
|
27
|
+
type: Optional[Literal["sse", "stdio", "streamable_http"]] = None
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class SsemcpServer(BaseModel):
|
|
31
|
+
server_name: str
|
|
32
|
+
"""The name of the server"""
|
|
33
|
+
|
|
34
|
+
server_url: str
|
|
35
|
+
"""The URL of the server"""
|
|
36
|
+
|
|
37
|
+
id: Optional[str] = None
|
|
38
|
+
"""The human-friendly ID of the Mcp_server"""
|
|
39
|
+
|
|
40
|
+
auth_header: Optional[str] = None
|
|
41
|
+
"""The name of the authentication header (e.g., 'Authorization')"""
|
|
42
|
+
|
|
43
|
+
auth_token: Optional[str] = None
|
|
44
|
+
"""The authentication token or API key value"""
|
|
45
|
+
|
|
46
|
+
custom_headers: Optional[Dict[str, str]] = None
|
|
47
|
+
"""Custom HTTP headers to include with requests"""
|
|
48
|
+
|
|
49
|
+
type: Optional[Literal["sse", "stdio", "streamable_http"]] = None
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class StreamableHttpmcpServer(BaseModel):
|
|
53
|
+
server_name: str
|
|
54
|
+
"""The name of the server"""
|
|
55
|
+
|
|
56
|
+
server_url: str
|
|
57
|
+
"""The URL of the server"""
|
|
58
|
+
|
|
59
|
+
id: Optional[str] = None
|
|
60
|
+
"""The human-friendly ID of the Mcp_server"""
|
|
61
|
+
|
|
62
|
+
auth_header: Optional[str] = None
|
|
63
|
+
"""The name of the authentication header (e.g., 'Authorization')"""
|
|
64
|
+
|
|
65
|
+
auth_token: Optional[str] = None
|
|
66
|
+
"""The authentication token or API key value"""
|
|
67
|
+
|
|
68
|
+
custom_headers: Optional[Dict[str, str]] = None
|
|
69
|
+
"""Custom HTTP headers to include with requests"""
|
|
70
|
+
|
|
71
|
+
type: Optional[Literal["sse", "stdio", "streamable_http"]] = None
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
McpServerCreateResponse: TypeAlias = Union[StdioMcpServer, SsemcpServer, StreamableHttpmcpServer]
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Dict, List, Union, Optional
|
|
4
|
+
from typing_extensions import Literal, TypeAlias
|
|
5
|
+
|
|
6
|
+
from .._models import BaseModel
|
|
7
|
+
|
|
8
|
+
__all__ = [
|
|
9
|
+
"McpServerListResponse",
|
|
10
|
+
"McpServerListResponseItem",
|
|
11
|
+
"McpServerListResponseItemStdioMcpServer",
|
|
12
|
+
"McpServerListResponseItemSsemcpServer",
|
|
13
|
+
"McpServerListResponseItemStreamableHttpmcpServer",
|
|
14
|
+
]
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class McpServerListResponseItemStdioMcpServer(BaseModel):
|
|
18
|
+
args: List[str]
|
|
19
|
+
"""The arguments to pass to the command"""
|
|
20
|
+
|
|
21
|
+
command: str
|
|
22
|
+
"""The command to run (MCP 'local' client will run this command)"""
|
|
23
|
+
|
|
24
|
+
server_name: str
|
|
25
|
+
"""The name of the server"""
|
|
26
|
+
|
|
27
|
+
id: Optional[str] = None
|
|
28
|
+
"""The human-friendly ID of the Mcp_server"""
|
|
29
|
+
|
|
30
|
+
env: Optional[Dict[str, str]] = None
|
|
31
|
+
"""Environment variables to set"""
|
|
32
|
+
|
|
33
|
+
type: Optional[Literal["sse", "stdio", "streamable_http"]] = None
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class McpServerListResponseItemSsemcpServer(BaseModel):
|
|
37
|
+
server_name: str
|
|
38
|
+
"""The name of the server"""
|
|
39
|
+
|
|
40
|
+
server_url: str
|
|
41
|
+
"""The URL of the server"""
|
|
42
|
+
|
|
43
|
+
id: Optional[str] = None
|
|
44
|
+
"""The human-friendly ID of the Mcp_server"""
|
|
45
|
+
|
|
46
|
+
auth_header: Optional[str] = None
|
|
47
|
+
"""The name of the authentication header (e.g., 'Authorization')"""
|
|
48
|
+
|
|
49
|
+
auth_token: Optional[str] = None
|
|
50
|
+
"""The authentication token or API key value"""
|
|
51
|
+
|
|
52
|
+
custom_headers: Optional[Dict[str, str]] = None
|
|
53
|
+
"""Custom HTTP headers to include with requests"""
|
|
54
|
+
|
|
55
|
+
type: Optional[Literal["sse", "stdio", "streamable_http"]] = None
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
class McpServerListResponseItemStreamableHttpmcpServer(BaseModel):
|
|
59
|
+
server_name: str
|
|
60
|
+
"""The name of the server"""
|
|
61
|
+
|
|
62
|
+
server_url: str
|
|
63
|
+
"""The URL of the server"""
|
|
64
|
+
|
|
65
|
+
id: Optional[str] = None
|
|
66
|
+
"""The human-friendly ID of the Mcp_server"""
|
|
67
|
+
|
|
68
|
+
auth_header: Optional[str] = None
|
|
69
|
+
"""The name of the authentication header (e.g., 'Authorization')"""
|
|
70
|
+
|
|
71
|
+
auth_token: Optional[str] = None
|
|
72
|
+
"""The authentication token or API key value"""
|
|
73
|
+
|
|
74
|
+
custom_headers: Optional[Dict[str, str]] = None
|
|
75
|
+
"""Custom HTTP headers to include with requests"""
|
|
76
|
+
|
|
77
|
+
type: Optional[Literal["sse", "stdio", "streamable_http"]] = None
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
McpServerListResponseItem: TypeAlias = Union[
|
|
81
|
+
McpServerListResponseItemStdioMcpServer,
|
|
82
|
+
McpServerListResponseItemSsemcpServer,
|
|
83
|
+
McpServerListResponseItemStreamableHttpmcpServer,
|
|
84
|
+
]
|
|
85
|
+
|
|
86
|
+
McpServerListResponse: TypeAlias = List[McpServerListResponseItem]
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Dict, Union, Optional
|
|
6
|
+
from typing_extensions import TypeAlias, TypedDict
|
|
7
|
+
|
|
8
|
+
from .._types import SequenceNotStr
|
|
9
|
+
|
|
10
|
+
__all__ = [
|
|
11
|
+
"McpServerModifyParams",
|
|
12
|
+
"LettaSchemasMcpServerUpdateStdioMcpServer",
|
|
13
|
+
"LettaSchemasMcpServerUpdateSsemcpServer",
|
|
14
|
+
"LettaSchemasMcpServerUpdateStreamableHttpmcpServer",
|
|
15
|
+
]
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class LettaSchemasMcpServerUpdateStdioMcpServer(TypedDict, total=False):
|
|
19
|
+
args: Optional[SequenceNotStr[str]]
|
|
20
|
+
"""The arguments to pass to the command"""
|
|
21
|
+
|
|
22
|
+
command: Optional[str]
|
|
23
|
+
"""The command to run the MCP server"""
|
|
24
|
+
|
|
25
|
+
env: Optional[Dict[str, str]]
|
|
26
|
+
"""Environment variables to set"""
|
|
27
|
+
|
|
28
|
+
server_name: Optional[str]
|
|
29
|
+
"""The name of the MCP server"""
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class LettaSchemasMcpServerUpdateSsemcpServer(TypedDict, total=False):
|
|
33
|
+
token: Optional[str]
|
|
34
|
+
"""The authentication token (internal)"""
|
|
35
|
+
|
|
36
|
+
auth_header: Optional[str]
|
|
37
|
+
"""The name of the authentication header (e.g., 'Authorization')"""
|
|
38
|
+
|
|
39
|
+
auth_token: Optional[str]
|
|
40
|
+
"""The authentication token or API key value"""
|
|
41
|
+
|
|
42
|
+
custom_headers: Optional[Dict[str, str]]
|
|
43
|
+
"""Custom headers to send with requests"""
|
|
44
|
+
|
|
45
|
+
server_name: Optional[str]
|
|
46
|
+
"""The name of the MCP server"""
|
|
47
|
+
|
|
48
|
+
server_url: Optional[str]
|
|
49
|
+
"""The URL of the SSE MCP server"""
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class LettaSchemasMcpServerUpdateStreamableHttpmcpServer(TypedDict, total=False):
|
|
53
|
+
token: Optional[str]
|
|
54
|
+
"""The authentication token (internal)"""
|
|
55
|
+
|
|
56
|
+
auth_header: Optional[str]
|
|
57
|
+
"""The name of the authentication header (e.g., 'Authorization')"""
|
|
58
|
+
|
|
59
|
+
auth_token: Optional[str]
|
|
60
|
+
"""The authentication token or API key value"""
|
|
61
|
+
|
|
62
|
+
custom_headers: Optional[Dict[str, str]]
|
|
63
|
+
"""Custom headers to send with requests"""
|
|
64
|
+
|
|
65
|
+
server_name: Optional[str]
|
|
66
|
+
"""The name of the MCP server"""
|
|
67
|
+
|
|
68
|
+
server_url: Optional[str]
|
|
69
|
+
"""The URL of the Streamable HTTP MCP server"""
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
McpServerModifyParams: TypeAlias = Union[
|
|
73
|
+
LettaSchemasMcpServerUpdateStdioMcpServer,
|
|
74
|
+
LettaSchemasMcpServerUpdateSsemcpServer,
|
|
75
|
+
LettaSchemasMcpServerUpdateStreamableHttpmcpServer,
|
|
76
|
+
]
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Dict, List, Union, Optional
|
|
4
|
+
from typing_extensions import Literal, TypeAlias
|
|
5
|
+
|
|
6
|
+
from .._models import BaseModel
|
|
7
|
+
|
|
8
|
+
__all__ = ["McpServerModifyResponse", "StdioMcpServer", "SsemcpServer", "StreamableHttpmcpServer"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class StdioMcpServer(BaseModel):
|
|
12
|
+
args: List[str]
|
|
13
|
+
"""The arguments to pass to the command"""
|
|
14
|
+
|
|
15
|
+
command: str
|
|
16
|
+
"""The command to run (MCP 'local' client will run this command)"""
|
|
17
|
+
|
|
18
|
+
server_name: str
|
|
19
|
+
"""The name of the server"""
|
|
20
|
+
|
|
21
|
+
id: Optional[str] = None
|
|
22
|
+
"""The human-friendly ID of the Mcp_server"""
|
|
23
|
+
|
|
24
|
+
env: Optional[Dict[str, str]] = None
|
|
25
|
+
"""Environment variables to set"""
|
|
26
|
+
|
|
27
|
+
type: Optional[Literal["sse", "stdio", "streamable_http"]] = None
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class SsemcpServer(BaseModel):
|
|
31
|
+
server_name: str
|
|
32
|
+
"""The name of the server"""
|
|
33
|
+
|
|
34
|
+
server_url: str
|
|
35
|
+
"""The URL of the server"""
|
|
36
|
+
|
|
37
|
+
id: Optional[str] = None
|
|
38
|
+
"""The human-friendly ID of the Mcp_server"""
|
|
39
|
+
|
|
40
|
+
auth_header: Optional[str] = None
|
|
41
|
+
"""The name of the authentication header (e.g., 'Authorization')"""
|
|
42
|
+
|
|
43
|
+
auth_token: Optional[str] = None
|
|
44
|
+
"""The authentication token or API key value"""
|
|
45
|
+
|
|
46
|
+
custom_headers: Optional[Dict[str, str]] = None
|
|
47
|
+
"""Custom HTTP headers to include with requests"""
|
|
48
|
+
|
|
49
|
+
type: Optional[Literal["sse", "stdio", "streamable_http"]] = None
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class StreamableHttpmcpServer(BaseModel):
|
|
53
|
+
server_name: str
|
|
54
|
+
"""The name of the server"""
|
|
55
|
+
|
|
56
|
+
server_url: str
|
|
57
|
+
"""The URL of the server"""
|
|
58
|
+
|
|
59
|
+
id: Optional[str] = None
|
|
60
|
+
"""The human-friendly ID of the Mcp_server"""
|
|
61
|
+
|
|
62
|
+
auth_header: Optional[str] = None
|
|
63
|
+
"""The name of the authentication header (e.g., 'Authorization')"""
|
|
64
|
+
|
|
65
|
+
auth_token: Optional[str] = None
|
|
66
|
+
"""The authentication token or API key value"""
|
|
67
|
+
|
|
68
|
+
custom_headers: Optional[Dict[str, str]] = None
|
|
69
|
+
"""Custom HTTP headers to include with requests"""
|
|
70
|
+
|
|
71
|
+
type: Optional[Literal["sse", "stdio", "streamable_http"]] = None
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
McpServerModifyResponse: TypeAlias = Union[StdioMcpServer, SsemcpServer, StreamableHttpmcpServer]
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Dict, List, Union, Optional
|
|
4
|
+
from typing_extensions import Literal, TypeAlias
|
|
5
|
+
|
|
6
|
+
from .._models import BaseModel
|
|
7
|
+
|
|
8
|
+
__all__ = ["McpServerRetrieveResponse", "StdioMcpServer", "SsemcpServer", "StreamableHttpmcpServer"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class StdioMcpServer(BaseModel):
|
|
12
|
+
args: List[str]
|
|
13
|
+
"""The arguments to pass to the command"""
|
|
14
|
+
|
|
15
|
+
command: str
|
|
16
|
+
"""The command to run (MCP 'local' client will run this command)"""
|
|
17
|
+
|
|
18
|
+
server_name: str
|
|
19
|
+
"""The name of the server"""
|
|
20
|
+
|
|
21
|
+
id: Optional[str] = None
|
|
22
|
+
"""The human-friendly ID of the Mcp_server"""
|
|
23
|
+
|
|
24
|
+
env: Optional[Dict[str, str]] = None
|
|
25
|
+
"""Environment variables to set"""
|
|
26
|
+
|
|
27
|
+
type: Optional[Literal["sse", "stdio", "streamable_http"]] = None
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class SsemcpServer(BaseModel):
|
|
31
|
+
server_name: str
|
|
32
|
+
"""The name of the server"""
|
|
33
|
+
|
|
34
|
+
server_url: str
|
|
35
|
+
"""The URL of the server"""
|
|
36
|
+
|
|
37
|
+
id: Optional[str] = None
|
|
38
|
+
"""The human-friendly ID of the Mcp_server"""
|
|
39
|
+
|
|
40
|
+
auth_header: Optional[str] = None
|
|
41
|
+
"""The name of the authentication header (e.g., 'Authorization')"""
|
|
42
|
+
|
|
43
|
+
auth_token: Optional[str] = None
|
|
44
|
+
"""The authentication token or API key value"""
|
|
45
|
+
|
|
46
|
+
custom_headers: Optional[Dict[str, str]] = None
|
|
47
|
+
"""Custom HTTP headers to include with requests"""
|
|
48
|
+
|
|
49
|
+
type: Optional[Literal["sse", "stdio", "streamable_http"]] = None
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class StreamableHttpmcpServer(BaseModel):
|
|
53
|
+
server_name: str
|
|
54
|
+
"""The name of the server"""
|
|
55
|
+
|
|
56
|
+
server_url: str
|
|
57
|
+
"""The URL of the server"""
|
|
58
|
+
|
|
59
|
+
id: Optional[str] = None
|
|
60
|
+
"""The human-friendly ID of the Mcp_server"""
|
|
61
|
+
|
|
62
|
+
auth_header: Optional[str] = None
|
|
63
|
+
"""The name of the authentication header (e.g., 'Authorization')"""
|
|
64
|
+
|
|
65
|
+
auth_token: Optional[str] = None
|
|
66
|
+
"""The authentication token or API key value"""
|
|
67
|
+
|
|
68
|
+
custom_headers: Optional[Dict[str, str]] = None
|
|
69
|
+
"""Custom HTTP headers to include with requests"""
|
|
70
|
+
|
|
71
|
+
type: Optional[Literal["sse", "stdio", "streamable_http"]] = None
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
McpServerRetrieveResponse: TypeAlias = Union[StdioMcpServer, SsemcpServer, StreamableHttpmcpServer]
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from .tool_run_params import ToolRunParams as ToolRunParams
|
|
6
|
+
from .tool_run_response import ToolRunResponse as ToolRunResponse
|
|
7
|
+
from .tool_list_response import ToolListResponse as ToolListResponse
|
|
8
|
+
from .refresh_trigger_params import RefreshTriggerParams as RefreshTriggerParams
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Optional
|
|
6
|
+
from typing_extensions import TypedDict
|
|
7
|
+
|
|
8
|
+
__all__ = ["RefreshTriggerParams"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class RefreshTriggerParams(TypedDict, total=False):
|
|
12
|
+
agent_id: Optional[str]
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List
|
|
4
|
+
from typing_extensions import TypeAlias
|
|
5
|
+
|
|
6
|
+
from ..tool import Tool
|
|
7
|
+
|
|
8
|
+
__all__ = ["ToolListResponse"]
|
|
9
|
+
|
|
10
|
+
ToolListResponse: TypeAlias = List[Tool]
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Dict
|
|
6
|
+
from typing_extensions import Required, TypedDict
|
|
7
|
+
|
|
8
|
+
__all__ = ["ToolRunParams"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class ToolRunParams(TypedDict, total=False):
|
|
12
|
+
mcp_server_id: Required[str]
|
|
13
|
+
|
|
14
|
+
args: Dict[str, object]
|
|
15
|
+
"""Arguments to pass to the MCP tool"""
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Optional
|
|
4
|
+
from typing_extensions import Literal
|
|
5
|
+
|
|
6
|
+
from ..._models import BaseModel
|
|
7
|
+
from ..agent_state import AgentState
|
|
8
|
+
|
|
9
|
+
__all__ = ["ToolRunResponse"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ToolRunResponse(BaseModel):
|
|
13
|
+
status: Literal["success", "error"]
|
|
14
|
+
"""The status of the tool execution and return object"""
|
|
15
|
+
|
|
16
|
+
agent_state: Optional[AgentState] = None
|
|
17
|
+
"""Representation of an agent's state.
|
|
18
|
+
|
|
19
|
+
This is the state of the agent at a given time, and is persisted in the DB
|
|
20
|
+
backend. The state has all the information needed to recreate a persisted agent.
|
|
21
|
+
|
|
22
|
+
Parameters: id (str): The unique identifier of the agent. name (str): The name
|
|
23
|
+
of the agent (must be unique to the user). created_at (datetime): The datetime
|
|
24
|
+
the agent was created. message_ids (List[str]): The ids of the messages in the
|
|
25
|
+
agent's in-context memory. memory (Memory): The in-context memory of the agent.
|
|
26
|
+
tools (List[str]): The tools used by the agent. This includes any memory editing
|
|
27
|
+
functions specified in `memory`. system (str): The system prompt used by the
|
|
28
|
+
agent. llm_config (LLMConfig): The LLM configuration used by the agent.
|
|
29
|
+
embedding_config (EmbeddingConfig): The embedding configuration used by the
|
|
30
|
+
agent.
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
func_return: Optional[object] = None
|
|
34
|
+
"""The function return object"""
|
|
35
|
+
|
|
36
|
+
sandbox_config_fingerprint: Optional[str] = None
|
|
37
|
+
"""The fingerprint of the config for the sandbox"""
|
|
38
|
+
|
|
39
|
+
stderr: Optional[List[str]] = None
|
|
40
|
+
"""Captured stderr from the function invocation"""
|
|
41
|
+
|
|
42
|
+
stdout: Optional[List[str]] = None
|
|
43
|
+
"""Captured stdout (prints, logs) from function invocation"""
|
|
@@ -3,10 +3,9 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
from typing import Optional
|
|
6
|
-
from typing_extensions import Literal,
|
|
6
|
+
from typing_extensions import Literal, TypedDict
|
|
7
7
|
|
|
8
8
|
from .._types import SequenceNotStr
|
|
9
|
-
from .._utils import PropertyInfo
|
|
10
9
|
|
|
11
10
|
__all__ = ["StepListParams"]
|
|
12
11
|
|
|
@@ -56,6 +55,3 @@ class StepListParams(TypedDict, total=False):
|
|
|
56
55
|
|
|
57
56
|
trace_ids: Optional[SequenceNotStr[str]]
|
|
58
57
|
"""Filter by trace ids returned by the server"""
|
|
59
|
-
|
|
60
|
-
x_project: Annotated[str, PropertyInfo(alias="X-Project")]
|
|
61
|
-
"""Filter by project slug to associate with the group (cloud only)."""
|
letta_client/types/tool.py
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
import typing
|
|
4
|
+
import inspect
|
|
4
5
|
from abc import abstractmethod
|
|
6
|
+
from typing import Dict, List, Optional
|
|
5
7
|
from textwrap import dedent
|
|
6
|
-
import inspect
|
|
7
|
-
import typing
|
|
8
8
|
|
|
9
|
-
from pydantic import Field as FieldInfo
|
|
9
|
+
from pydantic import Field, Field as FieldInfo
|
|
10
10
|
|
|
11
11
|
from .._models import BaseModel
|
|
12
12
|
from .tool_type import ToolType
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: letta-client
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.0a12
|
|
4
4
|
Summary: The official Python library for the letta API
|
|
5
5
|
Project-URL: Homepage, https://github.com/letta-ai/letta-python
|
|
6
6
|
Project-URL: Repository, https://github.com/letta-ai/letta-python
|