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

@@ -30,6 +30,7 @@ from .. import core
30
30
  from .types.update_agent_tool_rules_item import UpdateAgentToolRulesItem
31
31
  import datetime as dt
32
32
  from ..types.passage import Passage
33
+ from ..types.group import Group
33
34
  from .types.agents_search_request_search_item import AgentsSearchRequestSearchItem
34
35
  from .types.agents_search_response import AgentsSearchResponse
35
36
  from ..core.client_wrapper import AsyncClientWrapper
@@ -1089,6 +1090,74 @@ class AgentsClient:
1089
1090
  raise ApiError(status_code=_response.status_code, body=_response.text)
1090
1091
  raise ApiError(status_code=_response.status_code, body=_response_json)
1091
1092
 
1093
+ def list_agent_groups(
1094
+ self,
1095
+ agent_id: str,
1096
+ *,
1097
+ manager_type: typing.Optional[str] = None,
1098
+ request_options: typing.Optional[RequestOptions] = None,
1099
+ ) -> typing.List[Group]:
1100
+ """
1101
+ Lists the groups for an agent
1102
+
1103
+ Parameters
1104
+ ----------
1105
+ agent_id : str
1106
+
1107
+ manager_type : typing.Optional[str]
1108
+ Manager type to filter groups by
1109
+
1110
+ request_options : typing.Optional[RequestOptions]
1111
+ Request-specific configuration.
1112
+
1113
+ Returns
1114
+ -------
1115
+ typing.List[Group]
1116
+ Successful Response
1117
+
1118
+ Examples
1119
+ --------
1120
+ from letta_client import Letta
1121
+
1122
+ client = Letta(
1123
+ token="YOUR_TOKEN",
1124
+ )
1125
+ client.agents.list_agent_groups(
1126
+ agent_id="agent_id",
1127
+ )
1128
+ """
1129
+ _response = self._client_wrapper.httpx_client.request(
1130
+ f"v1/agents/{jsonable_encoder(agent_id)}/groups",
1131
+ method="GET",
1132
+ params={
1133
+ "manager_type": manager_type,
1134
+ },
1135
+ request_options=request_options,
1136
+ )
1137
+ try:
1138
+ if 200 <= _response.status_code < 300:
1139
+ return typing.cast(
1140
+ typing.List[Group],
1141
+ construct_type(
1142
+ type_=typing.List[Group], # type: ignore
1143
+ object_=_response.json(),
1144
+ ),
1145
+ )
1146
+ if _response.status_code == 422:
1147
+ raise UnprocessableEntityError(
1148
+ typing.cast(
1149
+ HttpValidationError,
1150
+ construct_type(
1151
+ type_=HttpValidationError, # type: ignore
1152
+ object_=_response.json(),
1153
+ ),
1154
+ )
1155
+ )
1156
+ _response_json = _response.json()
1157
+ except JSONDecodeError:
1158
+ raise ApiError(status_code=_response.status_code, body=_response.text)
1159
+ raise ApiError(status_code=_response.status_code, body=_response_json)
1160
+
1092
1161
  def search(
1093
1162
  self,
1094
1163
  *,
@@ -2282,6 +2351,82 @@ class AsyncAgentsClient:
2282
2351
  raise ApiError(status_code=_response.status_code, body=_response.text)
2283
2352
  raise ApiError(status_code=_response.status_code, body=_response_json)
2284
2353
 
2354
+ async def list_agent_groups(
2355
+ self,
2356
+ agent_id: str,
2357
+ *,
2358
+ manager_type: typing.Optional[str] = None,
2359
+ request_options: typing.Optional[RequestOptions] = None,
2360
+ ) -> typing.List[Group]:
2361
+ """
2362
+ Lists the groups for an agent
2363
+
2364
+ Parameters
2365
+ ----------
2366
+ agent_id : str
2367
+
2368
+ manager_type : typing.Optional[str]
2369
+ Manager type to filter groups by
2370
+
2371
+ request_options : typing.Optional[RequestOptions]
2372
+ Request-specific configuration.
2373
+
2374
+ Returns
2375
+ -------
2376
+ typing.List[Group]
2377
+ Successful Response
2378
+
2379
+ Examples
2380
+ --------
2381
+ import asyncio
2382
+
2383
+ from letta_client import AsyncLetta
2384
+
2385
+ client = AsyncLetta(
2386
+ token="YOUR_TOKEN",
2387
+ )
2388
+
2389
+
2390
+ async def main() -> None:
2391
+ await client.agents.list_agent_groups(
2392
+ agent_id="agent_id",
2393
+ )
2394
+
2395
+
2396
+ asyncio.run(main())
2397
+ """
2398
+ _response = await self._client_wrapper.httpx_client.request(
2399
+ f"v1/agents/{jsonable_encoder(agent_id)}/groups",
2400
+ method="GET",
2401
+ params={
2402
+ "manager_type": manager_type,
2403
+ },
2404
+ request_options=request_options,
2405
+ )
2406
+ try:
2407
+ if 200 <= _response.status_code < 300:
2408
+ return typing.cast(
2409
+ typing.List[Group],
2410
+ construct_type(
2411
+ type_=typing.List[Group], # type: ignore
2412
+ object_=_response.json(),
2413
+ ),
2414
+ )
2415
+ if _response.status_code == 422:
2416
+ raise UnprocessableEntityError(
2417
+ typing.cast(
2418
+ HttpValidationError,
2419
+ construct_type(
2420
+ type_=HttpValidationError, # type: ignore
2421
+ object_=_response.json(),
2422
+ ),
2423
+ )
2424
+ )
2425
+ _response_json = _response.json()
2426
+ except JSONDecodeError:
2427
+ raise ApiError(status_code=_response.status_code, body=_response.text)
2428
+ raise ApiError(status_code=_response.status_code, body=_response_json)
2429
+
2285
2430
  async def search(
2286
2431
  self,
2287
2432
  *,
@@ -16,7 +16,7 @@ class BaseClientWrapper:
16
16
  headers: typing.Dict[str, str] = {
17
17
  "X-Fern-Language": "Python",
18
18
  "X-Fern-SDK-Name": "letta-client",
19
- "X-Fern-SDK-Version": "0.1.109",
19
+ "X-Fern-SDK-Version": "0.1.110",
20
20
  }
21
21
  if self.token is not None:
22
22
  headers["Authorization"] = f"Bearer {self.token}"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: letta-client
3
- Version: 0.1.109
3
+ Version: 0.1.110
4
4
  Summary:
5
5
  Requires-Python: >=3.8,<4.0
6
6
  Classifier: Intended Audience :: Developers
@@ -2,7 +2,7 @@ letta_client/__init__.py,sha256=pij5j_AglAp0VqY5FqJ23BIaYulP95I298DZz_8H7uk,1456
2
2
  letta_client/agents/__init__.py,sha256=CveigJGrnkw3yZ8S9yZ2DpK1HV0v1fU-khsiLJJ0uaU,1452
3
3
  letta_client/agents/blocks/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
4
4
  letta_client/agents/blocks/client.py,sha256=u5zvutxoH_DqfSLWhRtNSRBC9_ezQDx682cxkxDz3JA,23822
5
- letta_client/agents/client.py,sha256=XI4O2hrctvwTH9fHJeKZ5CmFE7pHlOGW2uWhIIV0aec,89145
5
+ letta_client/agents/client.py,sha256=ku9SdcBr0WmR5pjwD1kfq4EMuH-BM3WROO-uda2pul4,93545
6
6
  letta_client/agents/context/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
7
7
  letta_client/agents/context/client.py,sha256=GKKvoG4N_K8Biz9yDjeIHpFG0C8Cwc7tHmEX3pTL_9U,4815
8
8
  letta_client/agents/core_memory/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
@@ -44,7 +44,7 @@ letta_client/blocks/client.py,sha256=LE9dsHaBxFLC3G035f0VpNDG7XKWRK8y9OXpeFCMvUw
44
44
  letta_client/client.py,sha256=k2mZqqEWciVmEQHgipjCK4kQILk74hpSqzcdNwdql9A,21212
45
45
  letta_client/core/__init__.py,sha256=OKbX2aCZXgHCDUsCouqv-OiX32xA6eFFCKIUH9M5Vzk,1591
46
46
  letta_client/core/api_error.py,sha256=RE8LELok2QCjABadECTvtDp7qejA1VmINCh6TbqPwSE,426
47
- letta_client/core/client_wrapper.py,sha256=mCPTh-fAv29eAHUUvDW2-lXI6s9DDFftf4pfLMFkxZ8,1998
47
+ letta_client/core/client_wrapper.py,sha256=s1o-Lu-f8SaQ32jinU7urCvYdVlZv0ESf-snd6TmBI0,1998
48
48
  letta_client/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
49
49
  letta_client/core/file.py,sha256=d4NNbX8XvXP32z8KpK2Xovv33nFfruIrpz0QWxlgpZk,2663
50
50
  letta_client/core/http_client.py,sha256=Z77OIxIbL4OAB2IDqjRq_sYa5yNYAWfmdhdCSSvh6Y4,19552
@@ -328,6 +328,6 @@ letta_client/voice/__init__.py,sha256=7hX85553PiRMtIMM12a0DSoFzsglNiUziYR2ekS84Q
328
328
  letta_client/voice/client.py,sha256=STjswa5oOLoP59QwTJvQwi73kgn0UzKOaXc2CsTRI4k,6912
329
329
  letta_client/voice/types/__init__.py,sha256=FRc3iKRTONE4N8Lf1IqvnqWZ2kXdrFFvkL7PxVcR8Ew,212
330
330
  letta_client/voice/types/create_voice_chat_completions_request_body.py,sha256=ZLfKgNK1T6IAwLEvaBVFfy7jEAoPUXP28n-nfmHkklc,391
331
- letta_client-0.1.109.dist-info/METADATA,sha256=b1WpltUWVR0BEUKB75ybBWVeakqmsWgu0qEGIXCD4go,5042
332
- letta_client-0.1.109.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
333
- letta_client-0.1.109.dist-info/RECORD,,
331
+ letta_client-0.1.110.dist-info/METADATA,sha256=RacTleA1LdRF1FSYNe-Z0D22N7LDPNokUMY_ExGwUug,5042
332
+ letta_client-0.1.110.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
333
+ letta_client-0.1.110.dist-info/RECORD,,