airweave-sdk 0.8.64__py3-none-any.whl → 0.8.66__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 (46) hide show
  1. airweave/__init__.py +44 -38
  2. airweave/client.py +19 -16
  3. airweave/collections/__init__.py +3 -6
  4. airweave/collections/client.py +273 -113
  5. airweave/collections/raw_client.py +633 -94
  6. airweave/collections/types/__init__.py +2 -4
  7. airweave/core/client_wrapper.py +4 -30
  8. airweave/errors/__init__.py +10 -2
  9. airweave/errors/conflict_error.py +11 -0
  10. airweave/errors/not_found_error.py +11 -0
  11. airweave/errors/too_many_requests_error.py +11 -0
  12. airweave/errors/unprocessable_entity_error.py +1 -2
  13. airweave/{types/message_status.py → events/__init__.py} +2 -1
  14. airweave/events/client.py +919 -0
  15. airweave/events/raw_client.py +1435 -0
  16. airweave/source_connections/client.py +210 -162
  17. airweave/source_connections/raw_client.py +574 -137
  18. airweave/sources/client.py +42 -18
  19. airweave/sources/raw_client.py +118 -17
  20. airweave/types/__init__.py +33 -33
  21. airweave/types/{create_subscription_request.py → conflict_error_response.py} +9 -6
  22. airweave/types/delivery_attempt.py +61 -0
  23. airweave/types/event_message.py +55 -0
  24. airweave/types/event_message_with_attempts.py +59 -0
  25. airweave/types/{endpoint_secret_out.py → not_found_error_response.py} +9 -2
  26. airweave/types/{subscription_with_attempts_out.py → rate_limit_error_response.py} +9 -6
  27. airweave/types/recovery_task.py +35 -0
  28. airweave/types/search_request.py +13 -10
  29. airweave/types/search_response.py +6 -3
  30. airweave/types/source_connection.py +73 -18
  31. airweave/types/source_connection_job.py +65 -15
  32. airweave/types/source_connection_list_item.py +45 -10
  33. airweave/types/sync_event_payload.py +72 -0
  34. airweave/types/{patch_subscription_request.py → validation_error_detail.py} +16 -5
  35. airweave/types/validation_error_response.py +30 -0
  36. airweave/types/webhook_subscription.py +68 -0
  37. {airweave_sdk-0.8.64.dist-info → airweave_sdk-0.8.66.dist-info}/METADATA +1 -5
  38. {airweave_sdk-0.8.64.dist-info → airweave_sdk-0.8.66.dist-info}/RECORD +39 -34
  39. airweave/collections/types/search_collections_readable_id_search_post_response.py +0 -8
  40. airweave/types/collection_update.py +0 -35
  41. airweave/types/endpoint_out.py +0 -35
  42. airweave/types/message_attempt_out.py +0 -37
  43. airweave/types/message_attempt_trigger_type.py +0 -3
  44. airweave/types/message_out.py +0 -29
  45. airweave/types/message_status_text.py +0 -5
  46. {airweave_sdk-0.8.64.dist-info → airweave_sdk-0.8.66.dist-info}/WHEEL +0 -0
@@ -7,11 +7,11 @@ from ..core.request_options import RequestOptions
7
7
  from ..types.collection import Collection
8
8
  from ..types.legacy_search_response import LegacySearchResponse
9
9
  from ..types.response_type import ResponseType
10
+ from ..types.search_response import SearchResponse
10
11
  from ..types.source_connection_job import SourceConnectionJob
11
12
  from ..types.sync_config import SyncConfig
12
13
  from .raw_client import AsyncRawCollectionsClient, RawCollectionsClient
13
14
  from .types.search_collections_readable_id_search_post_request import SearchCollectionsReadableIdSearchPostRequest
14
- from .types.search_collections_readable_id_search_post_response import SearchCollectionsReadableIdSearchPostResponse
15
15
 
16
16
  # this is used as the default value for optional parameters
17
17
  OMIT = typing.cast(typing.Any, ...)
@@ -41,9 +41,13 @@ class CollectionsClient:
41
41
  request_options: typing.Optional[RequestOptions] = None,
42
42
  ) -> typing.List[Collection]:
43
43
  """
44
- List all collections that belong to your organization with optional search filtering.
44
+ Retrieve all collections belonging to your organization.
45
45
 
46
- Collections are always sorted by creation date (newest first).
46
+ Collections are containers that group related data from one or more source
47
+ connections, enabling unified search across multiple data sources.
48
+
49
+ Results are sorted by creation date (newest first) and support pagination
50
+ and text search filtering.
47
51
 
48
52
  Parameters
49
53
  ----------
@@ -54,7 +58,7 @@ class CollectionsClient:
54
58
  Maximum number of collections to return (1-1000)
55
59
 
56
60
  search : typing.Optional[str]
57
- Search term to filter by name or readable_id
61
+ Search term to filter collections by name or readable_id
58
62
 
59
63
  request_options : typing.Optional[RequestOptions]
60
64
  Request-specific configuration.
@@ -69,14 +73,12 @@ class CollectionsClient:
69
73
  from airweave import AirweaveSDK
70
74
 
71
75
  client = AirweaveSDK(
72
- framework_name="YOUR_FRAMEWORK_NAME",
73
- framework_version="YOUR_FRAMEWORK_VERSION",
74
76
  api_key="YOUR_API_KEY",
75
77
  )
76
78
  client.collections.list(
77
- skip=1,
78
- limit=1,
79
- search="search",
79
+ skip=0,
80
+ limit=100,
81
+ search="customer",
80
82
  )
81
83
  """
82
84
  _response = self._raw_client.list(skip=skip, limit=limit, search=search, request_options=request_options)
@@ -91,10 +93,16 @@ class CollectionsClient:
91
93
  request_options: typing.Optional[RequestOptions] = None,
92
94
  ) -> Collection:
93
95
  """
94
- Create a new collection.
96
+ Create a new collection in your organization.
97
+
98
+ Collections are containers for organizing and searching across data from multiple
99
+ sources. After creation, add source connections to begin syncing data.
95
100
 
96
- The newly created collection is initially empty and does not contain any data
97
- until you explicitly add source connections to it.
101
+ The collection will be assigned a unique `readable_id` based on the name you provide,
102
+ which is used in URLs and API calls. You can optionally configure:
103
+
104
+ - **Sync schedule**: How frequently to automatically sync data from all sources
105
+ - **Custom readable_id**: Provide your own identifier (must be unique and URL-safe)
98
106
 
99
107
  Parameters
100
108
  ----------
@@ -113,15 +121,13 @@ class CollectionsClient:
113
121
  Returns
114
122
  -------
115
123
  Collection
116
- Successful Response
124
+ Created collection
117
125
 
118
126
  Examples
119
127
  --------
120
128
  from airweave import AirweaveSDK
121
129
 
122
130
  client = AirweaveSDK(
123
- framework_name="YOUR_FRAMEWORK_NAME",
124
- framework_version="YOUR_FRAMEWORK_VERSION",
125
131
  api_key="YOUR_API_KEY",
126
132
  )
127
133
  client.collections.create(
@@ -136,7 +142,11 @@ class CollectionsClient:
136
142
 
137
143
  def get(self, readable_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Collection:
138
144
  """
139
- Retrieve a specific collection by its readable ID.
145
+ Retrieve details of a specific collection by its readable ID.
146
+
147
+ Returns the complete collection configuration including sync settings, status,
148
+ and metadata. Use this to check the current state of a collection or to get
149
+ configuration details before making updates.
140
150
 
141
151
  Parameters
142
152
  ----------
@@ -149,19 +159,17 @@ class CollectionsClient:
149
159
  Returns
150
160
  -------
151
161
  Collection
152
- Successful Response
162
+ Collection details
153
163
 
154
164
  Examples
155
165
  --------
156
166
  from airweave import AirweaveSDK
157
167
 
158
168
  client = AirweaveSDK(
159
- framework_name="YOUR_FRAMEWORK_NAME",
160
- framework_version="YOUR_FRAMEWORK_VERSION",
161
169
  api_key="YOUR_API_KEY",
162
170
  )
163
171
  client.collections.get(
164
- readable_id="readable_id",
172
+ readable_id="customer-support-tickets-x7k9m",
165
173
  )
166
174
  """
167
175
  _response = self._raw_client.get(readable_id, request_options=request_options)
@@ -169,11 +177,15 @@ class CollectionsClient:
169
177
 
170
178
  def delete(self, readable_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Collection:
171
179
  """
172
- Delete a collection and all associated data.
180
+ Permanently delete a collection and all associated data.
181
+
182
+ This operation:
183
+ - Removes all synced data from the vector database
184
+ - Deletes all source connections within the collection
185
+ - Cancels any scheduled sync jobs
186
+ - Cleans up all related resources
173
187
 
174
- Permanently removes a collection from your organization including all synced data
175
- from the destination systems. All source connections within this collection
176
- will also be deleted as part of the cleanup process. This action cannot be undone.
188
+ **Warning**: This action cannot be undone. All data will be permanently deleted.
177
189
 
178
190
  Parameters
179
191
  ----------
@@ -186,34 +198,87 @@ class CollectionsClient:
186
198
  Returns
187
199
  -------
188
200
  Collection
189
- Successful Response
201
+ Deleted collection
190
202
 
191
203
  Examples
192
204
  --------
193
205
  from airweave import AirweaveSDK
194
206
 
195
207
  client = AirweaveSDK(
196
- framework_name="YOUR_FRAMEWORK_NAME",
197
- framework_version="YOUR_FRAMEWORK_VERSION",
198
208
  api_key="YOUR_API_KEY",
199
209
  )
200
210
  client.collections.delete(
201
- readable_id="readable_id",
211
+ readable_id="customer-support-tickets-x7k9m",
202
212
  )
203
213
  """
204
214
  _response = self._raw_client.delete(readable_id, request_options=request_options)
205
215
  return _response.data
206
216
 
217
+ def update(
218
+ self,
219
+ readable_id: str,
220
+ *,
221
+ name: typing.Optional[str] = OMIT,
222
+ sync_config: typing.Optional[SyncConfig] = OMIT,
223
+ request_options: typing.Optional[RequestOptions] = None,
224
+ ) -> Collection:
225
+ """
226
+ Update an existing collection's properties.
227
+
228
+ You can modify:
229
+ - **Name**: The display name shown in the UI
230
+ - **Sync configuration**: Schedule settings for automatic data synchronization
231
+
232
+ Note that the `readable_id` cannot be changed after creation to maintain stable
233
+ API endpoints and preserve existing integrations.
234
+
235
+ Parameters
236
+ ----------
237
+ readable_id : str
238
+ The unique readable identifier of the collection to update
239
+
240
+ name : typing.Optional[str]
241
+ Updated display name for the collection. Must be between 4 and 64 characters.
242
+
243
+ sync_config : typing.Optional[SyncConfig]
244
+ Default sync configuration for all syncs in this collection. This provides collection-level defaults that can be overridden at sync or job level.
245
+
246
+ request_options : typing.Optional[RequestOptions]
247
+ Request-specific configuration.
248
+
249
+ Returns
250
+ -------
251
+ Collection
252
+ Updated collection
253
+
254
+ Examples
255
+ --------
256
+ from airweave import AirweaveSDK
257
+
258
+ client = AirweaveSDK(
259
+ api_key="YOUR_API_KEY",
260
+ )
261
+ client.collections.update(
262
+ readable_id="customer-support-tickets-x7k9m",
263
+ name="Updated Finance Data",
264
+ )
265
+ """
266
+ _response = self._raw_client.update(
267
+ readable_id, name=name, sync_config=sync_config, request_options=request_options
268
+ )
269
+ return _response.data
270
+
207
271
  def refresh_all_source_connections(
208
272
  self, readable_id: str, *, request_options: typing.Optional[RequestOptions] = None
209
273
  ) -> typing.List[SourceConnectionJob]:
210
274
  """
211
- Trigger data synchronization for all source connections in the collection.
275
+ Trigger data synchronization for all source connections in a collection.
276
+
277
+ Starts sync jobs for every source connection in the collection, pulling the latest
278
+ data from each connected source. Jobs run asynchronously in the background.
212
279
 
213
- The sync jobs run asynchronously in the background, so this endpoint
214
- returns immediately with job details that you can use to track progress. You can
215
- monitor the status of individual data synchronization using the source connection
216
- endpoints.
280
+ Returns a list of sync jobs that were created. Use the source connection endpoints
281
+ to monitor the progress and status of individual sync jobs.
217
282
 
218
283
  Parameters
219
284
  ----------
@@ -233,12 +298,10 @@ class CollectionsClient:
233
298
  from airweave import AirweaveSDK
234
299
 
235
300
  client = AirweaveSDK(
236
- framework_name="YOUR_FRAMEWORK_NAME",
237
- framework_version="YOUR_FRAMEWORK_VERSION",
238
301
  api_key="YOUR_API_KEY",
239
302
  )
240
303
  client.collections.refresh_all_source_connections(
241
- readable_id="readable_id",
304
+ readable_id="customer-support-tickets-x7k9m",
242
305
  )
243
306
  """
244
307
  _response = self._raw_client.refresh_all_source_connections(readable_id, request_options=request_options)
@@ -256,10 +319,14 @@ class CollectionsClient:
256
319
  request_options: typing.Optional[RequestOptions] = None,
257
320
  ) -> LegacySearchResponse:
258
321
  """
259
- Legacy GET search endpoint for backwards compatibility.
322
+ **DEPRECATED**: Use POST /collections/{readable_id}/search instead.
260
323
 
261
- DEPRECATED: This endpoint uses the old schema. Please migrate to POST with the new
262
- SearchRequest format for access to all features.
324
+ This legacy GET endpoint provides basic search functionality via query parameters.
325
+ Migrate to the POST endpoint for access to advanced features like:
326
+ - Structured filters
327
+ - Query expansion
328
+ - Reranking
329
+ - Streaming responses
263
330
 
264
331
  Parameters
265
332
  ----------
@@ -279,7 +346,7 @@ class CollectionsClient:
279
346
  Number of results to skip for pagination
280
347
 
281
348
  recency_bias : typing.Optional[float]
282
- How much to weigh recency vs similarity (0..1)
349
+ How much to weigh recency vs similarity (0=similarity only, 1=recency only)
283
350
 
284
351
  request_options : typing.Optional[RequestOptions]
285
352
  Request-specific configuration.
@@ -287,23 +354,21 @@ class CollectionsClient:
287
354
  Returns
288
355
  -------
289
356
  LegacySearchResponse
290
- Successful Response
357
+ Search results
291
358
 
292
359
  Examples
293
360
  --------
294
361
  from airweave import AirweaveSDK
295
362
 
296
363
  client = AirweaveSDK(
297
- framework_name="YOUR_FRAMEWORK_NAME",
298
- framework_version="YOUR_FRAMEWORK_VERSION",
299
364
  api_key="YOUR_API_KEY",
300
365
  )
301
366
  client.collections.search_get_legacy(
302
- readable_id="readable_id",
303
- query="query",
367
+ readable_id="customer-support-tickets-x7k9m",
368
+ query="How do I reset my password?",
304
369
  response_type="raw",
305
- limit=1,
306
- offset=1,
370
+ limit=10,
371
+ offset=0,
307
372
  recency_bias=1.1,
308
373
  )
309
374
  """
@@ -324,17 +389,30 @@ class CollectionsClient:
324
389
  *,
325
390
  request: SearchCollectionsReadableIdSearchPostRequest,
326
391
  request_options: typing.Optional[RequestOptions] = None,
327
- ) -> SearchCollectionsReadableIdSearchPostResponse:
392
+ ) -> SearchResponse:
328
393
  """
329
- Search your collection.
394
+ Search your collection using semantic and hybrid search.
395
+
396
+ This is the primary search endpoint providing powerful AI-powered search capabilities:
397
+
398
+ **Search Strategies:**
399
+ - **hybrid** (default): Combines neural (semantic) and keyword (BM25) matching
400
+ - **neural**: Pure semantic search using embeddings
401
+ - **keyword**: Traditional keyword-based BM25 search
330
402
 
331
- Accepts both new SearchRequest and legacy LegacySearchRequest formats
403
+ **Features:**
404
+ - **Query expansion**: Generate query variations to improve recall
405
+ - **Filter interpretation**: Extract structured filters from natural language
406
+ - **Reranking**: LLM-based reranking for improved relevance
407
+ - **Answer generation**: AI-generated answers based on search results
408
+
409
+ **Note**: Accepts both new SearchRequest and legacy LegacySearchRequest formats
332
410
  for backwards compatibility.
333
411
 
334
412
  Parameters
335
413
  ----------
336
414
  readable_id : str
337
- The unique readable identifier of the collection
415
+ The unique readable identifier of the collection to search
338
416
 
339
417
  request : SearchCollectionsReadableIdSearchPostRequest
340
418
 
@@ -343,22 +421,20 @@ class CollectionsClient:
343
421
 
344
422
  Returns
345
423
  -------
346
- SearchCollectionsReadableIdSearchPostResponse
347
- Successful Response
424
+ SearchResponse
425
+ Search results with optional AI completion
348
426
 
349
427
  Examples
350
428
  --------
351
429
  from airweave import AirweaveSDK, SearchRequest
352
430
 
353
431
  client = AirweaveSDK(
354
- framework_name="YOUR_FRAMEWORK_NAME",
355
- framework_version="YOUR_FRAMEWORK_VERSION",
356
432
  api_key="YOUR_API_KEY",
357
433
  )
358
434
  client.collections.search(
359
- readable_id="readable_id",
435
+ readable_id="customer-support-tickets-x7k9m",
360
436
  request=SearchRequest(
361
- query="query",
437
+ query="How do I reset my password?",
362
438
  ),
363
439
  )
364
440
  """
@@ -390,9 +466,13 @@ class AsyncCollectionsClient:
390
466
  request_options: typing.Optional[RequestOptions] = None,
391
467
  ) -> typing.List[Collection]:
392
468
  """
393
- List all collections that belong to your organization with optional search filtering.
469
+ Retrieve all collections belonging to your organization.
470
+
471
+ Collections are containers that group related data from one or more source
472
+ connections, enabling unified search across multiple data sources.
394
473
 
395
- Collections are always sorted by creation date (newest first).
474
+ Results are sorted by creation date (newest first) and support pagination
475
+ and text search filtering.
396
476
 
397
477
  Parameters
398
478
  ----------
@@ -403,7 +483,7 @@ class AsyncCollectionsClient:
403
483
  Maximum number of collections to return (1-1000)
404
484
 
405
485
  search : typing.Optional[str]
406
- Search term to filter by name or readable_id
486
+ Search term to filter collections by name or readable_id
407
487
 
408
488
  request_options : typing.Optional[RequestOptions]
409
489
  Request-specific configuration.
@@ -420,17 +500,15 @@ class AsyncCollectionsClient:
420
500
  from airweave import AsyncAirweaveSDK
421
501
 
422
502
  client = AsyncAirweaveSDK(
423
- framework_name="YOUR_FRAMEWORK_NAME",
424
- framework_version="YOUR_FRAMEWORK_VERSION",
425
503
  api_key="YOUR_API_KEY",
426
504
  )
427
505
 
428
506
 
429
507
  async def main() -> None:
430
508
  await client.collections.list(
431
- skip=1,
432
- limit=1,
433
- search="search",
509
+ skip=0,
510
+ limit=100,
511
+ search="customer",
434
512
  )
435
513
 
436
514
 
@@ -448,10 +526,16 @@ class AsyncCollectionsClient:
448
526
  request_options: typing.Optional[RequestOptions] = None,
449
527
  ) -> Collection:
450
528
  """
451
- Create a new collection.
529
+ Create a new collection in your organization.
452
530
 
453
- The newly created collection is initially empty and does not contain any data
454
- until you explicitly add source connections to it.
531
+ Collections are containers for organizing and searching across data from multiple
532
+ sources. After creation, add source connections to begin syncing data.
533
+
534
+ The collection will be assigned a unique `readable_id` based on the name you provide,
535
+ which is used in URLs and API calls. You can optionally configure:
536
+
537
+ - **Sync schedule**: How frequently to automatically sync data from all sources
538
+ - **Custom readable_id**: Provide your own identifier (must be unique and URL-safe)
455
539
 
456
540
  Parameters
457
541
  ----------
@@ -470,7 +554,7 @@ class AsyncCollectionsClient:
470
554
  Returns
471
555
  -------
472
556
  Collection
473
- Successful Response
557
+ Created collection
474
558
 
475
559
  Examples
476
560
  --------
@@ -479,8 +563,6 @@ class AsyncCollectionsClient:
479
563
  from airweave import AsyncAirweaveSDK
480
564
 
481
565
  client = AsyncAirweaveSDK(
482
- framework_name="YOUR_FRAMEWORK_NAME",
483
- framework_version="YOUR_FRAMEWORK_VERSION",
484
566
  api_key="YOUR_API_KEY",
485
567
  )
486
568
 
@@ -501,7 +583,11 @@ class AsyncCollectionsClient:
501
583
 
502
584
  async def get(self, readable_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Collection:
503
585
  """
504
- Retrieve a specific collection by its readable ID.
586
+ Retrieve details of a specific collection by its readable ID.
587
+
588
+ Returns the complete collection configuration including sync settings, status,
589
+ and metadata. Use this to check the current state of a collection or to get
590
+ configuration details before making updates.
505
591
 
506
592
  Parameters
507
593
  ----------
@@ -514,7 +600,7 @@ class AsyncCollectionsClient:
514
600
  Returns
515
601
  -------
516
602
  Collection
517
- Successful Response
603
+ Collection details
518
604
 
519
605
  Examples
520
606
  --------
@@ -523,15 +609,13 @@ class AsyncCollectionsClient:
523
609
  from airweave import AsyncAirweaveSDK
524
610
 
525
611
  client = AsyncAirweaveSDK(
526
- framework_name="YOUR_FRAMEWORK_NAME",
527
- framework_version="YOUR_FRAMEWORK_VERSION",
528
612
  api_key="YOUR_API_KEY",
529
613
  )
530
614
 
531
615
 
532
616
  async def main() -> None:
533
617
  await client.collections.get(
534
- readable_id="readable_id",
618
+ readable_id="customer-support-tickets-x7k9m",
535
619
  )
536
620
 
537
621
 
@@ -542,11 +626,15 @@ class AsyncCollectionsClient:
542
626
 
543
627
  async def delete(self, readable_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Collection:
544
628
  """
545
- Delete a collection and all associated data.
629
+ Permanently delete a collection and all associated data.
546
630
 
547
- Permanently removes a collection from your organization including all synced data
548
- from the destination systems. All source connections within this collection
549
- will also be deleted as part of the cleanup process. This action cannot be undone.
631
+ This operation:
632
+ - Removes all synced data from the vector database
633
+ - Deletes all source connections within the collection
634
+ - Cancels any scheduled sync jobs
635
+ - Cleans up all related resources
636
+
637
+ **Warning**: This action cannot be undone. All data will be permanently deleted.
550
638
 
551
639
  Parameters
552
640
  ----------
@@ -559,7 +647,7 @@ class AsyncCollectionsClient:
559
647
  Returns
560
648
  -------
561
649
  Collection
562
- Successful Response
650
+ Deleted collection
563
651
 
564
652
  Examples
565
653
  --------
@@ -568,15 +656,13 @@ class AsyncCollectionsClient:
568
656
  from airweave import AsyncAirweaveSDK
569
657
 
570
658
  client = AsyncAirweaveSDK(
571
- framework_name="YOUR_FRAMEWORK_NAME",
572
- framework_version="YOUR_FRAMEWORK_VERSION",
573
659
  api_key="YOUR_API_KEY",
574
660
  )
575
661
 
576
662
 
577
663
  async def main() -> None:
578
664
  await client.collections.delete(
579
- readable_id="readable_id",
665
+ readable_id="customer-support-tickets-x7k9m",
580
666
  )
581
667
 
582
668
 
@@ -585,16 +671,79 @@ class AsyncCollectionsClient:
585
671
  _response = await self._raw_client.delete(readable_id, request_options=request_options)
586
672
  return _response.data
587
673
 
674
+ async def update(
675
+ self,
676
+ readable_id: str,
677
+ *,
678
+ name: typing.Optional[str] = OMIT,
679
+ sync_config: typing.Optional[SyncConfig] = OMIT,
680
+ request_options: typing.Optional[RequestOptions] = None,
681
+ ) -> Collection:
682
+ """
683
+ Update an existing collection's properties.
684
+
685
+ You can modify:
686
+ - **Name**: The display name shown in the UI
687
+ - **Sync configuration**: Schedule settings for automatic data synchronization
688
+
689
+ Note that the `readable_id` cannot be changed after creation to maintain stable
690
+ API endpoints and preserve existing integrations.
691
+
692
+ Parameters
693
+ ----------
694
+ readable_id : str
695
+ The unique readable identifier of the collection to update
696
+
697
+ name : typing.Optional[str]
698
+ Updated display name for the collection. Must be between 4 and 64 characters.
699
+
700
+ sync_config : typing.Optional[SyncConfig]
701
+ Default sync configuration for all syncs in this collection. This provides collection-level defaults that can be overridden at sync or job level.
702
+
703
+ request_options : typing.Optional[RequestOptions]
704
+ Request-specific configuration.
705
+
706
+ Returns
707
+ -------
708
+ Collection
709
+ Updated collection
710
+
711
+ Examples
712
+ --------
713
+ import asyncio
714
+
715
+ from airweave import AsyncAirweaveSDK
716
+
717
+ client = AsyncAirweaveSDK(
718
+ api_key="YOUR_API_KEY",
719
+ )
720
+
721
+
722
+ async def main() -> None:
723
+ await client.collections.update(
724
+ readable_id="customer-support-tickets-x7k9m",
725
+ name="Updated Finance Data",
726
+ )
727
+
728
+
729
+ asyncio.run(main())
730
+ """
731
+ _response = await self._raw_client.update(
732
+ readable_id, name=name, sync_config=sync_config, request_options=request_options
733
+ )
734
+ return _response.data
735
+
588
736
  async def refresh_all_source_connections(
589
737
  self, readable_id: str, *, request_options: typing.Optional[RequestOptions] = None
590
738
  ) -> typing.List[SourceConnectionJob]:
591
739
  """
592
- Trigger data synchronization for all source connections in the collection.
740
+ Trigger data synchronization for all source connections in a collection.
593
741
 
594
- The sync jobs run asynchronously in the background, so this endpoint
595
- returns immediately with job details that you can use to track progress. You can
596
- monitor the status of individual data synchronization using the source connection
597
- endpoints.
742
+ Starts sync jobs for every source connection in the collection, pulling the latest
743
+ data from each connected source. Jobs run asynchronously in the background.
744
+
745
+ Returns a list of sync jobs that were created. Use the source connection endpoints
746
+ to monitor the progress and status of individual sync jobs.
598
747
 
599
748
  Parameters
600
749
  ----------
@@ -616,15 +765,13 @@ class AsyncCollectionsClient:
616
765
  from airweave import AsyncAirweaveSDK
617
766
 
618
767
  client = AsyncAirweaveSDK(
619
- framework_name="YOUR_FRAMEWORK_NAME",
620
- framework_version="YOUR_FRAMEWORK_VERSION",
621
768
  api_key="YOUR_API_KEY",
622
769
  )
623
770
 
624
771
 
625
772
  async def main() -> None:
626
773
  await client.collections.refresh_all_source_connections(
627
- readable_id="readable_id",
774
+ readable_id="customer-support-tickets-x7k9m",
628
775
  )
629
776
 
630
777
 
@@ -645,10 +792,14 @@ class AsyncCollectionsClient:
645
792
  request_options: typing.Optional[RequestOptions] = None,
646
793
  ) -> LegacySearchResponse:
647
794
  """
648
- Legacy GET search endpoint for backwards compatibility.
795
+ **DEPRECATED**: Use POST /collections/{readable_id}/search instead.
649
796
 
650
- DEPRECATED: This endpoint uses the old schema. Please migrate to POST with the new
651
- SearchRequest format for access to all features.
797
+ This legacy GET endpoint provides basic search functionality via query parameters.
798
+ Migrate to the POST endpoint for access to advanced features like:
799
+ - Structured filters
800
+ - Query expansion
801
+ - Reranking
802
+ - Streaming responses
652
803
 
653
804
  Parameters
654
805
  ----------
@@ -668,7 +819,7 @@ class AsyncCollectionsClient:
668
819
  Number of results to skip for pagination
669
820
 
670
821
  recency_bias : typing.Optional[float]
671
- How much to weigh recency vs similarity (0..1)
822
+ How much to weigh recency vs similarity (0=similarity only, 1=recency only)
672
823
 
673
824
  request_options : typing.Optional[RequestOptions]
674
825
  Request-specific configuration.
@@ -676,7 +827,7 @@ class AsyncCollectionsClient:
676
827
  Returns
677
828
  -------
678
829
  LegacySearchResponse
679
- Successful Response
830
+ Search results
680
831
 
681
832
  Examples
682
833
  --------
@@ -685,19 +836,17 @@ class AsyncCollectionsClient:
685
836
  from airweave import AsyncAirweaveSDK
686
837
 
687
838
  client = AsyncAirweaveSDK(
688
- framework_name="YOUR_FRAMEWORK_NAME",
689
- framework_version="YOUR_FRAMEWORK_VERSION",
690
839
  api_key="YOUR_API_KEY",
691
840
  )
692
841
 
693
842
 
694
843
  async def main() -> None:
695
844
  await client.collections.search_get_legacy(
696
- readable_id="readable_id",
697
- query="query",
845
+ readable_id="customer-support-tickets-x7k9m",
846
+ query="How do I reset my password?",
698
847
  response_type="raw",
699
- limit=1,
700
- offset=1,
848
+ limit=10,
849
+ offset=0,
701
850
  recency_bias=1.1,
702
851
  )
703
852
 
@@ -721,17 +870,30 @@ class AsyncCollectionsClient:
721
870
  *,
722
871
  request: SearchCollectionsReadableIdSearchPostRequest,
723
872
  request_options: typing.Optional[RequestOptions] = None,
724
- ) -> SearchCollectionsReadableIdSearchPostResponse:
873
+ ) -> SearchResponse:
725
874
  """
726
- Search your collection.
875
+ Search your collection using semantic and hybrid search.
876
+
877
+ This is the primary search endpoint providing powerful AI-powered search capabilities:
878
+
879
+ **Search Strategies:**
880
+ - **hybrid** (default): Combines neural (semantic) and keyword (BM25) matching
881
+ - **neural**: Pure semantic search using embeddings
882
+ - **keyword**: Traditional keyword-based BM25 search
727
883
 
728
- Accepts both new SearchRequest and legacy LegacySearchRequest formats
884
+ **Features:**
885
+ - **Query expansion**: Generate query variations to improve recall
886
+ - **Filter interpretation**: Extract structured filters from natural language
887
+ - **Reranking**: LLM-based reranking for improved relevance
888
+ - **Answer generation**: AI-generated answers based on search results
889
+
890
+ **Note**: Accepts both new SearchRequest and legacy LegacySearchRequest formats
729
891
  for backwards compatibility.
730
892
 
731
893
  Parameters
732
894
  ----------
733
895
  readable_id : str
734
- The unique readable identifier of the collection
896
+ The unique readable identifier of the collection to search
735
897
 
736
898
  request : SearchCollectionsReadableIdSearchPostRequest
737
899
 
@@ -740,8 +902,8 @@ class AsyncCollectionsClient:
740
902
 
741
903
  Returns
742
904
  -------
743
- SearchCollectionsReadableIdSearchPostResponse
744
- Successful Response
905
+ SearchResponse
906
+ Search results with optional AI completion
745
907
 
746
908
  Examples
747
909
  --------
@@ -750,17 +912,15 @@ class AsyncCollectionsClient:
750
912
  from airweave import AsyncAirweaveSDK, SearchRequest
751
913
 
752
914
  client = AsyncAirweaveSDK(
753
- framework_name="YOUR_FRAMEWORK_NAME",
754
- framework_version="YOUR_FRAMEWORK_VERSION",
755
915
  api_key="YOUR_API_KEY",
756
916
  )
757
917
 
758
918
 
759
919
  async def main() -> None:
760
920
  await client.collections.search(
761
- readable_id="readable_id",
921
+ readable_id="customer-support-tickets-x7k9m",
762
922
  request=SearchRequest(
763
- query="query",
923
+ query="How do I reset my password?",
764
924
  ),
765
925
  )
766
926