hindsight-client 0.2.1__py3-none-any.whl → 0.4.0__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 (60) hide show
  1. hindsight_client/__init__.py +9 -8
  2. hindsight_client/hindsight_client.py +396 -59
  3. {hindsight_client-0.2.1.dist-info → hindsight_client-0.4.0.dist-info}/METADATA +1 -1
  4. hindsight_client-0.4.0.dist-info/RECORD +89 -0
  5. hindsight_client_api/__init__.py +27 -0
  6. hindsight_client_api/api/__init__.py +2 -0
  7. hindsight_client_api/api/banks_api.py +1012 -131
  8. hindsight_client_api/api/directives_api.py +1619 -0
  9. hindsight_client_api/api/entities_api.py +29 -9
  10. hindsight_client_api/api/memory_api.py +713 -73
  11. hindsight_client_api/api/mental_models_api.py +1897 -0
  12. hindsight_client_api/api/monitoring_api.py +246 -0
  13. hindsight_client_api/api/operations_api.py +350 -4
  14. hindsight_client_api/models/__init__.py +25 -0
  15. hindsight_client_api/models/add_background_request.py +2 -2
  16. hindsight_client_api/models/async_operation_submit_response.py +89 -0
  17. hindsight_client_api/models/background_response.py +10 -3
  18. hindsight_client_api/models/bank_list_item.py +6 -6
  19. hindsight_client_api/models/bank_profile_response.py +11 -4
  20. hindsight_client_api/models/bank_stats_response.py +15 -4
  21. hindsight_client_api/models/consolidation_response.py +89 -0
  22. hindsight_client_api/models/create_bank_request.py +8 -1
  23. hindsight_client_api/models/create_directive_request.py +95 -0
  24. hindsight_client_api/models/create_mental_model_request.py +100 -0
  25. hindsight_client_api/models/create_mental_model_response.py +87 -0
  26. hindsight_client_api/models/directive_list_response.py +95 -0
  27. hindsight_client_api/models/directive_response.py +113 -0
  28. hindsight_client_api/models/document_response.py +5 -3
  29. hindsight_client_api/models/entity_list_response.py +9 -3
  30. hindsight_client_api/models/features_info.py +91 -0
  31. hindsight_client_api/models/graph_data_response.py +4 -2
  32. hindsight_client_api/models/list_tags_response.py +101 -0
  33. hindsight_client_api/models/memory_item.py +9 -2
  34. hindsight_client_api/models/mental_model_list_response.py +95 -0
  35. hindsight_client_api/models/mental_model_response.py +126 -0
  36. hindsight_client_api/models/mental_model_trigger.py +87 -0
  37. hindsight_client_api/models/operation_response.py +1 -1
  38. hindsight_client_api/models/operation_status_response.py +131 -0
  39. hindsight_client_api/models/operations_list_response.py +8 -2
  40. hindsight_client_api/models/recall_request.py +22 -3
  41. hindsight_client_api/models/recall_result.py +9 -2
  42. hindsight_client_api/models/reflect_based_on.py +115 -0
  43. hindsight_client_api/models/reflect_directive.py +91 -0
  44. hindsight_client_api/models/reflect_include_options.py +13 -2
  45. hindsight_client_api/models/reflect_llm_call.py +89 -0
  46. hindsight_client_api/models/reflect_mental_model.py +96 -0
  47. hindsight_client_api/models/reflect_request.py +22 -3
  48. hindsight_client_api/models/reflect_response.py +34 -11
  49. hindsight_client_api/models/reflect_tool_call.py +100 -0
  50. hindsight_client_api/models/reflect_trace.py +105 -0
  51. hindsight_client_api/models/retain_request.py +10 -3
  52. hindsight_client_api/models/retain_response.py +21 -3
  53. hindsight_client_api/models/tag_item.py +89 -0
  54. hindsight_client_api/models/token_usage.py +91 -0
  55. hindsight_client_api/models/tool_calls_include_options.py +87 -0
  56. hindsight_client_api/models/update_directive_request.py +120 -0
  57. hindsight_client_api/models/update_mental_model_request.py +125 -0
  58. hindsight_client_api/models/version_response.py +93 -0
  59. hindsight_client-0.2.1.dist-info/RECORD +0 -62
  60. {hindsight_client-0.2.1.dist-info → hindsight_client-0.4.0.dist-info}/WHEEL +0 -0
@@ -17,11 +17,12 @@ from typing import Any, Dict, List, Optional, Tuple, Union
17
17
  from typing_extensions import Annotated
18
18
 
19
19
  from pydantic import Field, StrictInt, StrictStr
20
- from typing import Optional
20
+ from typing import Any, Optional
21
21
  from typing_extensions import Annotated
22
22
  from hindsight_client_api.models.delete_response import DeleteResponse
23
23
  from hindsight_client_api.models.graph_data_response import GraphDataResponse
24
24
  from hindsight_client_api.models.list_memory_units_response import ListMemoryUnitsResponse
25
+ from hindsight_client_api.models.list_tags_response import ListTagsResponse
25
26
  from hindsight_client_api.models.recall_request import RecallRequest
26
27
  from hindsight_client_api.models.recall_response import RecallResponse
27
28
  from hindsight_client_api.models.reflect_request import ReflectRequest
@@ -347,6 +348,614 @@ class MemoryApi:
347
348
  self,
348
349
  bank_id: StrictStr,
349
350
  type: Optional[StrictStr] = None,
351
+ limit: Optional[StrictInt] = None,
352
+ authorization: Optional[StrictStr] = None,
353
+ _request_timeout: Union[
354
+ None,
355
+ Annotated[StrictFloat, Field(gt=0)],
356
+ Tuple[
357
+ Annotated[StrictFloat, Field(gt=0)],
358
+ Annotated[StrictFloat, Field(gt=0)]
359
+ ]
360
+ ] = None,
361
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
362
+ _content_type: Optional[StrictStr] = None,
363
+ _headers: Optional[Dict[StrictStr, Any]] = None,
364
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
365
+ ) -> GraphDataResponse:
366
+ """Get memory graph data
367
+
368
+ Retrieve graph data for visualization, optionally filtered by type (world/experience/opinion).
369
+
370
+ :param bank_id: (required)
371
+ :type bank_id: str
372
+ :param type:
373
+ :type type: str
374
+ :param limit:
375
+ :type limit: int
376
+ :param authorization:
377
+ :type authorization: str
378
+ :param _request_timeout: timeout setting for this request. If one
379
+ number provided, it will be total request
380
+ timeout. It can also be a pair (tuple) of
381
+ (connection, read) timeouts.
382
+ :type _request_timeout: int, tuple(int, int), optional
383
+ :param _request_auth: set to override the auth_settings for an a single
384
+ request; this effectively ignores the
385
+ authentication in the spec for a single request.
386
+ :type _request_auth: dict, optional
387
+ :param _content_type: force content-type for the request.
388
+ :type _content_type: str, Optional
389
+ :param _headers: set to override the headers for a single
390
+ request; this effectively ignores the headers
391
+ in the spec for a single request.
392
+ :type _headers: dict, optional
393
+ :param _host_index: set to override the host_index for a single
394
+ request; this effectively ignores the host_index
395
+ in the spec for a single request.
396
+ :type _host_index: int, optional
397
+ :return: Returns the result object.
398
+ """ # noqa: E501
399
+
400
+ _param = self._get_graph_serialize(
401
+ bank_id=bank_id,
402
+ type=type,
403
+ limit=limit,
404
+ authorization=authorization,
405
+ _request_auth=_request_auth,
406
+ _content_type=_content_type,
407
+ _headers=_headers,
408
+ _host_index=_host_index
409
+ )
410
+
411
+ _response_types_map: Dict[str, Optional[str]] = {
412
+ '200': "GraphDataResponse",
413
+ '422': "HTTPValidationError",
414
+ }
415
+ response_data = await self.api_client.call_api(
416
+ *_param,
417
+ _request_timeout=_request_timeout
418
+ )
419
+ await response_data.read()
420
+ return self.api_client.response_deserialize(
421
+ response_data=response_data,
422
+ response_types_map=_response_types_map,
423
+ ).data
424
+
425
+
426
+ @validate_call
427
+ async def get_graph_with_http_info(
428
+ self,
429
+ bank_id: StrictStr,
430
+ type: Optional[StrictStr] = None,
431
+ limit: Optional[StrictInt] = None,
432
+ authorization: Optional[StrictStr] = None,
433
+ _request_timeout: Union[
434
+ None,
435
+ Annotated[StrictFloat, Field(gt=0)],
436
+ Tuple[
437
+ Annotated[StrictFloat, Field(gt=0)],
438
+ Annotated[StrictFloat, Field(gt=0)]
439
+ ]
440
+ ] = None,
441
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
442
+ _content_type: Optional[StrictStr] = None,
443
+ _headers: Optional[Dict[StrictStr, Any]] = None,
444
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
445
+ ) -> ApiResponse[GraphDataResponse]:
446
+ """Get memory graph data
447
+
448
+ Retrieve graph data for visualization, optionally filtered by type (world/experience/opinion).
449
+
450
+ :param bank_id: (required)
451
+ :type bank_id: str
452
+ :param type:
453
+ :type type: str
454
+ :param limit:
455
+ :type limit: int
456
+ :param authorization:
457
+ :type authorization: str
458
+ :param _request_timeout: timeout setting for this request. If one
459
+ number provided, it will be total request
460
+ timeout. It can also be a pair (tuple) of
461
+ (connection, read) timeouts.
462
+ :type _request_timeout: int, tuple(int, int), optional
463
+ :param _request_auth: set to override the auth_settings for an a single
464
+ request; this effectively ignores the
465
+ authentication in the spec for a single request.
466
+ :type _request_auth: dict, optional
467
+ :param _content_type: force content-type for the request.
468
+ :type _content_type: str, Optional
469
+ :param _headers: set to override the headers for a single
470
+ request; this effectively ignores the headers
471
+ in the spec for a single request.
472
+ :type _headers: dict, optional
473
+ :param _host_index: set to override the host_index for a single
474
+ request; this effectively ignores the host_index
475
+ in the spec for a single request.
476
+ :type _host_index: int, optional
477
+ :return: Returns the result object.
478
+ """ # noqa: E501
479
+
480
+ _param = self._get_graph_serialize(
481
+ bank_id=bank_id,
482
+ type=type,
483
+ limit=limit,
484
+ authorization=authorization,
485
+ _request_auth=_request_auth,
486
+ _content_type=_content_type,
487
+ _headers=_headers,
488
+ _host_index=_host_index
489
+ )
490
+
491
+ _response_types_map: Dict[str, Optional[str]] = {
492
+ '200': "GraphDataResponse",
493
+ '422': "HTTPValidationError",
494
+ }
495
+ response_data = await self.api_client.call_api(
496
+ *_param,
497
+ _request_timeout=_request_timeout
498
+ )
499
+ await response_data.read()
500
+ return self.api_client.response_deserialize(
501
+ response_data=response_data,
502
+ response_types_map=_response_types_map,
503
+ )
504
+
505
+
506
+ @validate_call
507
+ async def get_graph_without_preload_content(
508
+ self,
509
+ bank_id: StrictStr,
510
+ type: Optional[StrictStr] = None,
511
+ limit: Optional[StrictInt] = None,
512
+ authorization: Optional[StrictStr] = None,
513
+ _request_timeout: Union[
514
+ None,
515
+ Annotated[StrictFloat, Field(gt=0)],
516
+ Tuple[
517
+ Annotated[StrictFloat, Field(gt=0)],
518
+ Annotated[StrictFloat, Field(gt=0)]
519
+ ]
520
+ ] = None,
521
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
522
+ _content_type: Optional[StrictStr] = None,
523
+ _headers: Optional[Dict[StrictStr, Any]] = None,
524
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
525
+ ) -> RESTResponseType:
526
+ """Get memory graph data
527
+
528
+ Retrieve graph data for visualization, optionally filtered by type (world/experience/opinion).
529
+
530
+ :param bank_id: (required)
531
+ :type bank_id: str
532
+ :param type:
533
+ :type type: str
534
+ :param limit:
535
+ :type limit: int
536
+ :param authorization:
537
+ :type authorization: str
538
+ :param _request_timeout: timeout setting for this request. If one
539
+ number provided, it will be total request
540
+ timeout. It can also be a pair (tuple) of
541
+ (connection, read) timeouts.
542
+ :type _request_timeout: int, tuple(int, int), optional
543
+ :param _request_auth: set to override the auth_settings for an a single
544
+ request; this effectively ignores the
545
+ authentication in the spec for a single request.
546
+ :type _request_auth: dict, optional
547
+ :param _content_type: force content-type for the request.
548
+ :type _content_type: str, Optional
549
+ :param _headers: set to override the headers for a single
550
+ request; this effectively ignores the headers
551
+ in the spec for a single request.
552
+ :type _headers: dict, optional
553
+ :param _host_index: set to override the host_index for a single
554
+ request; this effectively ignores the host_index
555
+ in the spec for a single request.
556
+ :type _host_index: int, optional
557
+ :return: Returns the result object.
558
+ """ # noqa: E501
559
+
560
+ _param = self._get_graph_serialize(
561
+ bank_id=bank_id,
562
+ type=type,
563
+ limit=limit,
564
+ authorization=authorization,
565
+ _request_auth=_request_auth,
566
+ _content_type=_content_type,
567
+ _headers=_headers,
568
+ _host_index=_host_index
569
+ )
570
+
571
+ _response_types_map: Dict[str, Optional[str]] = {
572
+ '200': "GraphDataResponse",
573
+ '422': "HTTPValidationError",
574
+ }
575
+ response_data = await self.api_client.call_api(
576
+ *_param,
577
+ _request_timeout=_request_timeout
578
+ )
579
+ return response_data.response
580
+
581
+
582
+ def _get_graph_serialize(
583
+ self,
584
+ bank_id,
585
+ type,
586
+ limit,
587
+ authorization,
588
+ _request_auth,
589
+ _content_type,
590
+ _headers,
591
+ _host_index,
592
+ ) -> RequestSerialized:
593
+
594
+ _host = None
595
+
596
+ _collection_formats: Dict[str, str] = {
597
+ }
598
+
599
+ _path_params: Dict[str, str] = {}
600
+ _query_params: List[Tuple[str, str]] = []
601
+ _header_params: Dict[str, Optional[str]] = _headers or {}
602
+ _form_params: List[Tuple[str, str]] = []
603
+ _files: Dict[
604
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
605
+ ] = {}
606
+ _body_params: Optional[bytes] = None
607
+
608
+ # process the path parameters
609
+ if bank_id is not None:
610
+ _path_params['bank_id'] = bank_id
611
+ # process the query parameters
612
+ if type is not None:
613
+
614
+ _query_params.append(('type', type))
615
+
616
+ if limit is not None:
617
+
618
+ _query_params.append(('limit', limit))
619
+
620
+ # process the header parameters
621
+ if authorization is not None:
622
+ _header_params['authorization'] = authorization
623
+ # process the form parameters
624
+ # process the body parameter
625
+
626
+
627
+ # set the HTTP header `Accept`
628
+ if 'Accept' not in _header_params:
629
+ _header_params['Accept'] = self.api_client.select_header_accept(
630
+ [
631
+ 'application/json'
632
+ ]
633
+ )
634
+
635
+
636
+ # authentication setting
637
+ _auth_settings: List[str] = [
638
+ ]
639
+
640
+ return self.api_client.param_serialize(
641
+ method='GET',
642
+ resource_path='/v1/default/banks/{bank_id}/graph',
643
+ path_params=_path_params,
644
+ query_params=_query_params,
645
+ header_params=_header_params,
646
+ body=_body_params,
647
+ post_params=_form_params,
648
+ files=_files,
649
+ auth_settings=_auth_settings,
650
+ collection_formats=_collection_formats,
651
+ _host=_host,
652
+ _request_auth=_request_auth
653
+ )
654
+
655
+
656
+
657
+
658
+ @validate_call
659
+ async def get_memory(
660
+ self,
661
+ bank_id: StrictStr,
662
+ memory_id: StrictStr,
663
+ authorization: Optional[StrictStr] = None,
664
+ _request_timeout: Union[
665
+ None,
666
+ Annotated[StrictFloat, Field(gt=0)],
667
+ Tuple[
668
+ Annotated[StrictFloat, Field(gt=0)],
669
+ Annotated[StrictFloat, Field(gt=0)]
670
+ ]
671
+ ] = None,
672
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
673
+ _content_type: Optional[StrictStr] = None,
674
+ _headers: Optional[Dict[StrictStr, Any]] = None,
675
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
676
+ ) -> object:
677
+ """Get memory unit
678
+
679
+ Get a single memory unit by ID with all its metadata including entities and tags.
680
+
681
+ :param bank_id: (required)
682
+ :type bank_id: str
683
+ :param memory_id: (required)
684
+ :type memory_id: str
685
+ :param authorization:
686
+ :type authorization: str
687
+ :param _request_timeout: timeout setting for this request. If one
688
+ number provided, it will be total request
689
+ timeout. It can also be a pair (tuple) of
690
+ (connection, read) timeouts.
691
+ :type _request_timeout: int, tuple(int, int), optional
692
+ :param _request_auth: set to override the auth_settings for an a single
693
+ request; this effectively ignores the
694
+ authentication in the spec for a single request.
695
+ :type _request_auth: dict, optional
696
+ :param _content_type: force content-type for the request.
697
+ :type _content_type: str, Optional
698
+ :param _headers: set to override the headers for a single
699
+ request; this effectively ignores the headers
700
+ in the spec for a single request.
701
+ :type _headers: dict, optional
702
+ :param _host_index: set to override the host_index for a single
703
+ request; this effectively ignores the host_index
704
+ in the spec for a single request.
705
+ :type _host_index: int, optional
706
+ :return: Returns the result object.
707
+ """ # noqa: E501
708
+
709
+ _param = self._get_memory_serialize(
710
+ bank_id=bank_id,
711
+ memory_id=memory_id,
712
+ authorization=authorization,
713
+ _request_auth=_request_auth,
714
+ _content_type=_content_type,
715
+ _headers=_headers,
716
+ _host_index=_host_index
717
+ )
718
+
719
+ _response_types_map: Dict[str, Optional[str]] = {
720
+ '200': "object",
721
+ '422': "HTTPValidationError",
722
+ }
723
+ response_data = await self.api_client.call_api(
724
+ *_param,
725
+ _request_timeout=_request_timeout
726
+ )
727
+ await response_data.read()
728
+ return self.api_client.response_deserialize(
729
+ response_data=response_data,
730
+ response_types_map=_response_types_map,
731
+ ).data
732
+
733
+
734
+ @validate_call
735
+ async def get_memory_with_http_info(
736
+ self,
737
+ bank_id: StrictStr,
738
+ memory_id: StrictStr,
739
+ authorization: Optional[StrictStr] = None,
740
+ _request_timeout: Union[
741
+ None,
742
+ Annotated[StrictFloat, Field(gt=0)],
743
+ Tuple[
744
+ Annotated[StrictFloat, Field(gt=0)],
745
+ Annotated[StrictFloat, Field(gt=0)]
746
+ ]
747
+ ] = None,
748
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
749
+ _content_type: Optional[StrictStr] = None,
750
+ _headers: Optional[Dict[StrictStr, Any]] = None,
751
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
752
+ ) -> ApiResponse[object]:
753
+ """Get memory unit
754
+
755
+ Get a single memory unit by ID with all its metadata including entities and tags.
756
+
757
+ :param bank_id: (required)
758
+ :type bank_id: str
759
+ :param memory_id: (required)
760
+ :type memory_id: str
761
+ :param authorization:
762
+ :type authorization: str
763
+ :param _request_timeout: timeout setting for this request. If one
764
+ number provided, it will be total request
765
+ timeout. It can also be a pair (tuple) of
766
+ (connection, read) timeouts.
767
+ :type _request_timeout: int, tuple(int, int), optional
768
+ :param _request_auth: set to override the auth_settings for an a single
769
+ request; this effectively ignores the
770
+ authentication in the spec for a single request.
771
+ :type _request_auth: dict, optional
772
+ :param _content_type: force content-type for the request.
773
+ :type _content_type: str, Optional
774
+ :param _headers: set to override the headers for a single
775
+ request; this effectively ignores the headers
776
+ in the spec for a single request.
777
+ :type _headers: dict, optional
778
+ :param _host_index: set to override the host_index for a single
779
+ request; this effectively ignores the host_index
780
+ in the spec for a single request.
781
+ :type _host_index: int, optional
782
+ :return: Returns the result object.
783
+ """ # noqa: E501
784
+
785
+ _param = self._get_memory_serialize(
786
+ bank_id=bank_id,
787
+ memory_id=memory_id,
788
+ authorization=authorization,
789
+ _request_auth=_request_auth,
790
+ _content_type=_content_type,
791
+ _headers=_headers,
792
+ _host_index=_host_index
793
+ )
794
+
795
+ _response_types_map: Dict[str, Optional[str]] = {
796
+ '200': "object",
797
+ '422': "HTTPValidationError",
798
+ }
799
+ response_data = await self.api_client.call_api(
800
+ *_param,
801
+ _request_timeout=_request_timeout
802
+ )
803
+ await response_data.read()
804
+ return self.api_client.response_deserialize(
805
+ response_data=response_data,
806
+ response_types_map=_response_types_map,
807
+ )
808
+
809
+
810
+ @validate_call
811
+ async def get_memory_without_preload_content(
812
+ self,
813
+ bank_id: StrictStr,
814
+ memory_id: StrictStr,
815
+ authorization: Optional[StrictStr] = None,
816
+ _request_timeout: Union[
817
+ None,
818
+ Annotated[StrictFloat, Field(gt=0)],
819
+ Tuple[
820
+ Annotated[StrictFloat, Field(gt=0)],
821
+ Annotated[StrictFloat, Field(gt=0)]
822
+ ]
823
+ ] = None,
824
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
825
+ _content_type: Optional[StrictStr] = None,
826
+ _headers: Optional[Dict[StrictStr, Any]] = None,
827
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
828
+ ) -> RESTResponseType:
829
+ """Get memory unit
830
+
831
+ Get a single memory unit by ID with all its metadata including entities and tags.
832
+
833
+ :param bank_id: (required)
834
+ :type bank_id: str
835
+ :param memory_id: (required)
836
+ :type memory_id: str
837
+ :param authorization:
838
+ :type authorization: str
839
+ :param _request_timeout: timeout setting for this request. If one
840
+ number provided, it will be total request
841
+ timeout. It can also be a pair (tuple) of
842
+ (connection, read) timeouts.
843
+ :type _request_timeout: int, tuple(int, int), optional
844
+ :param _request_auth: set to override the auth_settings for an a single
845
+ request; this effectively ignores the
846
+ authentication in the spec for a single request.
847
+ :type _request_auth: dict, optional
848
+ :param _content_type: force content-type for the request.
849
+ :type _content_type: str, Optional
850
+ :param _headers: set to override the headers for a single
851
+ request; this effectively ignores the headers
852
+ in the spec for a single request.
853
+ :type _headers: dict, optional
854
+ :param _host_index: set to override the host_index for a single
855
+ request; this effectively ignores the host_index
856
+ in the spec for a single request.
857
+ :type _host_index: int, optional
858
+ :return: Returns the result object.
859
+ """ # noqa: E501
860
+
861
+ _param = self._get_memory_serialize(
862
+ bank_id=bank_id,
863
+ memory_id=memory_id,
864
+ authorization=authorization,
865
+ _request_auth=_request_auth,
866
+ _content_type=_content_type,
867
+ _headers=_headers,
868
+ _host_index=_host_index
869
+ )
870
+
871
+ _response_types_map: Dict[str, Optional[str]] = {
872
+ '200': "object",
873
+ '422': "HTTPValidationError",
874
+ }
875
+ response_data = await self.api_client.call_api(
876
+ *_param,
877
+ _request_timeout=_request_timeout
878
+ )
879
+ return response_data.response
880
+
881
+
882
+ def _get_memory_serialize(
883
+ self,
884
+ bank_id,
885
+ memory_id,
886
+ authorization,
887
+ _request_auth,
888
+ _content_type,
889
+ _headers,
890
+ _host_index,
891
+ ) -> RequestSerialized:
892
+
893
+ _host = None
894
+
895
+ _collection_formats: Dict[str, str] = {
896
+ }
897
+
898
+ _path_params: Dict[str, str] = {}
899
+ _query_params: List[Tuple[str, str]] = []
900
+ _header_params: Dict[str, Optional[str]] = _headers or {}
901
+ _form_params: List[Tuple[str, str]] = []
902
+ _files: Dict[
903
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
904
+ ] = {}
905
+ _body_params: Optional[bytes] = None
906
+
907
+ # process the path parameters
908
+ if bank_id is not None:
909
+ _path_params['bank_id'] = bank_id
910
+ if memory_id is not None:
911
+ _path_params['memory_id'] = memory_id
912
+ # process the query parameters
913
+ # process the header parameters
914
+ if authorization is not None:
915
+ _header_params['authorization'] = authorization
916
+ # process the form parameters
917
+ # process the body parameter
918
+
919
+
920
+ # set the HTTP header `Accept`
921
+ if 'Accept' not in _header_params:
922
+ _header_params['Accept'] = self.api_client.select_header_accept(
923
+ [
924
+ 'application/json'
925
+ ]
926
+ )
927
+
928
+
929
+ # authentication setting
930
+ _auth_settings: List[str] = [
931
+ ]
932
+
933
+ return self.api_client.param_serialize(
934
+ method='GET',
935
+ resource_path='/v1/default/banks/{bank_id}/memories/{memory_id}',
936
+ path_params=_path_params,
937
+ query_params=_query_params,
938
+ header_params=_header_params,
939
+ body=_body_params,
940
+ post_params=_form_params,
941
+ files=_files,
942
+ auth_settings=_auth_settings,
943
+ collection_formats=_collection_formats,
944
+ _host=_host,
945
+ _request_auth=_request_auth
946
+ )
947
+
948
+
949
+
950
+
951
+ @validate_call
952
+ async def list_memories(
953
+ self,
954
+ bank_id: StrictStr,
955
+ type: Optional[StrictStr] = None,
956
+ q: Optional[StrictStr] = None,
957
+ limit: Optional[StrictInt] = None,
958
+ offset: Optional[StrictInt] = None,
350
959
  authorization: Optional[StrictStr] = None,
351
960
  _request_timeout: Union[
352
961
  None,
@@ -360,15 +969,21 @@ class MemoryApi:
360
969
  _content_type: Optional[StrictStr] = None,
361
970
  _headers: Optional[Dict[StrictStr, Any]] = None,
362
971
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
363
- ) -> GraphDataResponse:
364
- """Get memory graph data
972
+ ) -> ListMemoryUnitsResponse:
973
+ """List memory units
365
974
 
366
- Retrieve graph data for visualization, optionally filtered by type (world/experience/opinion). Limited to 1000 most recent items.
975
+ List memory units with pagination and optional full-text search. Supports filtering by type. Results are sorted by most recent first (mentioned_at DESC, then created_at DESC).
367
976
 
368
977
  :param bank_id: (required)
369
978
  :type bank_id: str
370
979
  :param type:
371
980
  :type type: str
981
+ :param q:
982
+ :type q: str
983
+ :param limit:
984
+ :type limit: int
985
+ :param offset:
986
+ :type offset: int
372
987
  :param authorization:
373
988
  :type authorization: str
374
989
  :param _request_timeout: timeout setting for this request. If one
@@ -393,9 +1008,12 @@ class MemoryApi:
393
1008
  :return: Returns the result object.
394
1009
  """ # noqa: E501
395
1010
 
396
- _param = self._get_graph_serialize(
1011
+ _param = self._list_memories_serialize(
397
1012
  bank_id=bank_id,
398
1013
  type=type,
1014
+ q=q,
1015
+ limit=limit,
1016
+ offset=offset,
399
1017
  authorization=authorization,
400
1018
  _request_auth=_request_auth,
401
1019
  _content_type=_content_type,
@@ -404,7 +1022,7 @@ class MemoryApi:
404
1022
  )
405
1023
 
406
1024
  _response_types_map: Dict[str, Optional[str]] = {
407
- '200': "GraphDataResponse",
1025
+ '200': "ListMemoryUnitsResponse",
408
1026
  '422': "HTTPValidationError",
409
1027
  }
410
1028
  response_data = await self.api_client.call_api(
@@ -419,10 +1037,13 @@ class MemoryApi:
419
1037
 
420
1038
 
421
1039
  @validate_call
422
- async def get_graph_with_http_info(
1040
+ async def list_memories_with_http_info(
423
1041
  self,
424
1042
  bank_id: StrictStr,
425
1043
  type: Optional[StrictStr] = None,
1044
+ q: Optional[StrictStr] = None,
1045
+ limit: Optional[StrictInt] = None,
1046
+ offset: Optional[StrictInt] = None,
426
1047
  authorization: Optional[StrictStr] = None,
427
1048
  _request_timeout: Union[
428
1049
  None,
@@ -436,15 +1057,21 @@ class MemoryApi:
436
1057
  _content_type: Optional[StrictStr] = None,
437
1058
  _headers: Optional[Dict[StrictStr, Any]] = None,
438
1059
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
439
- ) -> ApiResponse[GraphDataResponse]:
440
- """Get memory graph data
1060
+ ) -> ApiResponse[ListMemoryUnitsResponse]:
1061
+ """List memory units
441
1062
 
442
- Retrieve graph data for visualization, optionally filtered by type (world/experience/opinion). Limited to 1000 most recent items.
1063
+ List memory units with pagination and optional full-text search. Supports filtering by type. Results are sorted by most recent first (mentioned_at DESC, then created_at DESC).
443
1064
 
444
1065
  :param bank_id: (required)
445
1066
  :type bank_id: str
446
1067
  :param type:
447
1068
  :type type: str
1069
+ :param q:
1070
+ :type q: str
1071
+ :param limit:
1072
+ :type limit: int
1073
+ :param offset:
1074
+ :type offset: int
448
1075
  :param authorization:
449
1076
  :type authorization: str
450
1077
  :param _request_timeout: timeout setting for this request. If one
@@ -469,9 +1096,12 @@ class MemoryApi:
469
1096
  :return: Returns the result object.
470
1097
  """ # noqa: E501
471
1098
 
472
- _param = self._get_graph_serialize(
1099
+ _param = self._list_memories_serialize(
473
1100
  bank_id=bank_id,
474
1101
  type=type,
1102
+ q=q,
1103
+ limit=limit,
1104
+ offset=offset,
475
1105
  authorization=authorization,
476
1106
  _request_auth=_request_auth,
477
1107
  _content_type=_content_type,
@@ -480,7 +1110,7 @@ class MemoryApi:
480
1110
  )
481
1111
 
482
1112
  _response_types_map: Dict[str, Optional[str]] = {
483
- '200': "GraphDataResponse",
1113
+ '200': "ListMemoryUnitsResponse",
484
1114
  '422': "HTTPValidationError",
485
1115
  }
486
1116
  response_data = await self.api_client.call_api(
@@ -495,10 +1125,13 @@ class MemoryApi:
495
1125
 
496
1126
 
497
1127
  @validate_call
498
- async def get_graph_without_preload_content(
1128
+ async def list_memories_without_preload_content(
499
1129
  self,
500
1130
  bank_id: StrictStr,
501
1131
  type: Optional[StrictStr] = None,
1132
+ q: Optional[StrictStr] = None,
1133
+ limit: Optional[StrictInt] = None,
1134
+ offset: Optional[StrictInt] = None,
502
1135
  authorization: Optional[StrictStr] = None,
503
1136
  _request_timeout: Union[
504
1137
  None,
@@ -513,14 +1146,20 @@ class MemoryApi:
513
1146
  _headers: Optional[Dict[StrictStr, Any]] = None,
514
1147
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
515
1148
  ) -> RESTResponseType:
516
- """Get memory graph data
1149
+ """List memory units
517
1150
 
518
- Retrieve graph data for visualization, optionally filtered by type (world/experience/opinion). Limited to 1000 most recent items.
1151
+ List memory units with pagination and optional full-text search. Supports filtering by type. Results are sorted by most recent first (mentioned_at DESC, then created_at DESC).
519
1152
 
520
1153
  :param bank_id: (required)
521
1154
  :type bank_id: str
522
1155
  :param type:
523
1156
  :type type: str
1157
+ :param q:
1158
+ :type q: str
1159
+ :param limit:
1160
+ :type limit: int
1161
+ :param offset:
1162
+ :type offset: int
524
1163
  :param authorization:
525
1164
  :type authorization: str
526
1165
  :param _request_timeout: timeout setting for this request. If one
@@ -545,9 +1184,12 @@ class MemoryApi:
545
1184
  :return: Returns the result object.
546
1185
  """ # noqa: E501
547
1186
 
548
- _param = self._get_graph_serialize(
1187
+ _param = self._list_memories_serialize(
549
1188
  bank_id=bank_id,
550
1189
  type=type,
1190
+ q=q,
1191
+ limit=limit,
1192
+ offset=offset,
551
1193
  authorization=authorization,
552
1194
  _request_auth=_request_auth,
553
1195
  _content_type=_content_type,
@@ -556,7 +1198,7 @@ class MemoryApi:
556
1198
  )
557
1199
 
558
1200
  _response_types_map: Dict[str, Optional[str]] = {
559
- '200': "GraphDataResponse",
1201
+ '200': "ListMemoryUnitsResponse",
560
1202
  '422': "HTTPValidationError",
561
1203
  }
562
1204
  response_data = await self.api_client.call_api(
@@ -566,10 +1208,13 @@ class MemoryApi:
566
1208
  return response_data.response
567
1209
 
568
1210
 
569
- def _get_graph_serialize(
1211
+ def _list_memories_serialize(
570
1212
  self,
571
1213
  bank_id,
572
1214
  type,
1215
+ q,
1216
+ limit,
1217
+ offset,
573
1218
  authorization,
574
1219
  _request_auth,
575
1220
  _content_type,
@@ -599,6 +1244,18 @@ class MemoryApi:
599
1244
 
600
1245
  _query_params.append(('type', type))
601
1246
 
1247
+ if q is not None:
1248
+
1249
+ _query_params.append(('q', q))
1250
+
1251
+ if limit is not None:
1252
+
1253
+ _query_params.append(('limit', limit))
1254
+
1255
+ if offset is not None:
1256
+
1257
+ _query_params.append(('offset', offset))
1258
+
602
1259
  # process the header parameters
603
1260
  if authorization is not None:
604
1261
  _header_params['authorization'] = authorization
@@ -621,7 +1278,7 @@ class MemoryApi:
621
1278
 
622
1279
  return self.api_client.param_serialize(
623
1280
  method='GET',
624
- resource_path='/v1/default/banks/{bank_id}/graph',
1281
+ resource_path='/v1/default/banks/{bank_id}/memories/list',
625
1282
  path_params=_path_params,
626
1283
  query_params=_query_params,
627
1284
  header_params=_header_params,
@@ -638,13 +1295,12 @@ class MemoryApi:
638
1295
 
639
1296
 
640
1297
  @validate_call
641
- async def list_memories(
1298
+ async def list_tags(
642
1299
  self,
643
1300
  bank_id: StrictStr,
644
- type: Optional[StrictStr] = None,
645
- q: Optional[StrictStr] = None,
646
- limit: Optional[StrictInt] = None,
647
- offset: Optional[StrictInt] = None,
1301
+ q: Annotated[Optional[StrictStr], Field(description="Wildcard pattern to filter tags (e.g., 'user:*' for user:alice, '*-admin' for role-admin). Use '*' as wildcard. Case-insensitive.")] = None,
1302
+ limit: Annotated[Optional[StrictInt], Field(description="Maximum number of tags to return")] = None,
1303
+ offset: Annotated[Optional[StrictInt], Field(description="Offset for pagination")] = None,
648
1304
  authorization: Optional[StrictStr] = None,
649
1305
  _request_timeout: Union[
650
1306
  None,
@@ -658,20 +1314,18 @@ class MemoryApi:
658
1314
  _content_type: Optional[StrictStr] = None,
659
1315
  _headers: Optional[Dict[StrictStr, Any]] = None,
660
1316
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
661
- ) -> ListMemoryUnitsResponse:
662
- """List memory units
1317
+ ) -> ListTagsResponse:
1318
+ """List tags
663
1319
 
664
- List memory units with pagination and optional full-text search. Supports filtering by type. Results are sorted by most recent first (mentioned_at DESC, then created_at DESC).
1320
+ List all unique tags in a memory bank with usage counts. Supports wildcard search using '*' (e.g., 'user:*', '*-fred', 'tag*-2'). Case-insensitive.
665
1321
 
666
1322
  :param bank_id: (required)
667
1323
  :type bank_id: str
668
- :param type:
669
- :type type: str
670
- :param q:
1324
+ :param q: Wildcard pattern to filter tags (e.g., 'user:*' for user:alice, '*-admin' for role-admin). Use '*' as wildcard. Case-insensitive.
671
1325
  :type q: str
672
- :param limit:
1326
+ :param limit: Maximum number of tags to return
673
1327
  :type limit: int
674
- :param offset:
1328
+ :param offset: Offset for pagination
675
1329
  :type offset: int
676
1330
  :param authorization:
677
1331
  :type authorization: str
@@ -697,9 +1351,8 @@ class MemoryApi:
697
1351
  :return: Returns the result object.
698
1352
  """ # noqa: E501
699
1353
 
700
- _param = self._list_memories_serialize(
1354
+ _param = self._list_tags_serialize(
701
1355
  bank_id=bank_id,
702
- type=type,
703
1356
  q=q,
704
1357
  limit=limit,
705
1358
  offset=offset,
@@ -711,7 +1364,7 @@ class MemoryApi:
711
1364
  )
712
1365
 
713
1366
  _response_types_map: Dict[str, Optional[str]] = {
714
- '200': "ListMemoryUnitsResponse",
1367
+ '200': "ListTagsResponse",
715
1368
  '422': "HTTPValidationError",
716
1369
  }
717
1370
  response_data = await self.api_client.call_api(
@@ -726,13 +1379,12 @@ class MemoryApi:
726
1379
 
727
1380
 
728
1381
  @validate_call
729
- async def list_memories_with_http_info(
1382
+ async def list_tags_with_http_info(
730
1383
  self,
731
1384
  bank_id: StrictStr,
732
- type: Optional[StrictStr] = None,
733
- q: Optional[StrictStr] = None,
734
- limit: Optional[StrictInt] = None,
735
- offset: Optional[StrictInt] = None,
1385
+ q: Annotated[Optional[StrictStr], Field(description="Wildcard pattern to filter tags (e.g., 'user:*' for user:alice, '*-admin' for role-admin). Use '*' as wildcard. Case-insensitive.")] = None,
1386
+ limit: Annotated[Optional[StrictInt], Field(description="Maximum number of tags to return")] = None,
1387
+ offset: Annotated[Optional[StrictInt], Field(description="Offset for pagination")] = None,
736
1388
  authorization: Optional[StrictStr] = None,
737
1389
  _request_timeout: Union[
738
1390
  None,
@@ -746,20 +1398,18 @@ class MemoryApi:
746
1398
  _content_type: Optional[StrictStr] = None,
747
1399
  _headers: Optional[Dict[StrictStr, Any]] = None,
748
1400
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
749
- ) -> ApiResponse[ListMemoryUnitsResponse]:
750
- """List memory units
1401
+ ) -> ApiResponse[ListTagsResponse]:
1402
+ """List tags
751
1403
 
752
- List memory units with pagination and optional full-text search. Supports filtering by type. Results are sorted by most recent first (mentioned_at DESC, then created_at DESC).
1404
+ List all unique tags in a memory bank with usage counts. Supports wildcard search using '*' (e.g., 'user:*', '*-fred', 'tag*-2'). Case-insensitive.
753
1405
 
754
1406
  :param bank_id: (required)
755
1407
  :type bank_id: str
756
- :param type:
757
- :type type: str
758
- :param q:
1408
+ :param q: Wildcard pattern to filter tags (e.g., 'user:*' for user:alice, '*-admin' for role-admin). Use '*' as wildcard. Case-insensitive.
759
1409
  :type q: str
760
- :param limit:
1410
+ :param limit: Maximum number of tags to return
761
1411
  :type limit: int
762
- :param offset:
1412
+ :param offset: Offset for pagination
763
1413
  :type offset: int
764
1414
  :param authorization:
765
1415
  :type authorization: str
@@ -785,9 +1435,8 @@ class MemoryApi:
785
1435
  :return: Returns the result object.
786
1436
  """ # noqa: E501
787
1437
 
788
- _param = self._list_memories_serialize(
1438
+ _param = self._list_tags_serialize(
789
1439
  bank_id=bank_id,
790
- type=type,
791
1440
  q=q,
792
1441
  limit=limit,
793
1442
  offset=offset,
@@ -799,7 +1448,7 @@ class MemoryApi:
799
1448
  )
800
1449
 
801
1450
  _response_types_map: Dict[str, Optional[str]] = {
802
- '200': "ListMemoryUnitsResponse",
1451
+ '200': "ListTagsResponse",
803
1452
  '422': "HTTPValidationError",
804
1453
  }
805
1454
  response_data = await self.api_client.call_api(
@@ -814,13 +1463,12 @@ class MemoryApi:
814
1463
 
815
1464
 
816
1465
  @validate_call
817
- async def list_memories_without_preload_content(
1466
+ async def list_tags_without_preload_content(
818
1467
  self,
819
1468
  bank_id: StrictStr,
820
- type: Optional[StrictStr] = None,
821
- q: Optional[StrictStr] = None,
822
- limit: Optional[StrictInt] = None,
823
- offset: Optional[StrictInt] = None,
1469
+ q: Annotated[Optional[StrictStr], Field(description="Wildcard pattern to filter tags (e.g., 'user:*' for user:alice, '*-admin' for role-admin). Use '*' as wildcard. Case-insensitive.")] = None,
1470
+ limit: Annotated[Optional[StrictInt], Field(description="Maximum number of tags to return")] = None,
1471
+ offset: Annotated[Optional[StrictInt], Field(description="Offset for pagination")] = None,
824
1472
  authorization: Optional[StrictStr] = None,
825
1473
  _request_timeout: Union[
826
1474
  None,
@@ -835,19 +1483,17 @@ class MemoryApi:
835
1483
  _headers: Optional[Dict[StrictStr, Any]] = None,
836
1484
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
837
1485
  ) -> RESTResponseType:
838
- """List memory units
1486
+ """List tags
839
1487
 
840
- List memory units with pagination and optional full-text search. Supports filtering by type. Results are sorted by most recent first (mentioned_at DESC, then created_at DESC).
1488
+ List all unique tags in a memory bank with usage counts. Supports wildcard search using '*' (e.g., 'user:*', '*-fred', 'tag*-2'). Case-insensitive.
841
1489
 
842
1490
  :param bank_id: (required)
843
1491
  :type bank_id: str
844
- :param type:
845
- :type type: str
846
- :param q:
1492
+ :param q: Wildcard pattern to filter tags (e.g., 'user:*' for user:alice, '*-admin' for role-admin). Use '*' as wildcard. Case-insensitive.
847
1493
  :type q: str
848
- :param limit:
1494
+ :param limit: Maximum number of tags to return
849
1495
  :type limit: int
850
- :param offset:
1496
+ :param offset: Offset for pagination
851
1497
  :type offset: int
852
1498
  :param authorization:
853
1499
  :type authorization: str
@@ -873,9 +1519,8 @@ class MemoryApi:
873
1519
  :return: Returns the result object.
874
1520
  """ # noqa: E501
875
1521
 
876
- _param = self._list_memories_serialize(
1522
+ _param = self._list_tags_serialize(
877
1523
  bank_id=bank_id,
878
- type=type,
879
1524
  q=q,
880
1525
  limit=limit,
881
1526
  offset=offset,
@@ -887,7 +1532,7 @@ class MemoryApi:
887
1532
  )
888
1533
 
889
1534
  _response_types_map: Dict[str, Optional[str]] = {
890
- '200': "ListMemoryUnitsResponse",
1535
+ '200': "ListTagsResponse",
891
1536
  '422': "HTTPValidationError",
892
1537
  }
893
1538
  response_data = await self.api_client.call_api(
@@ -897,10 +1542,9 @@ class MemoryApi:
897
1542
  return response_data.response
898
1543
 
899
1544
 
900
- def _list_memories_serialize(
1545
+ def _list_tags_serialize(
901
1546
  self,
902
1547
  bank_id,
903
- type,
904
1548
  q,
905
1549
  limit,
906
1550
  offset,
@@ -929,10 +1573,6 @@ class MemoryApi:
929
1573
  if bank_id is not None:
930
1574
  _path_params['bank_id'] = bank_id
931
1575
  # process the query parameters
932
- if type is not None:
933
-
934
- _query_params.append(('type', type))
935
-
936
1576
  if q is not None:
937
1577
 
938
1578
  _query_params.append(('q', q))
@@ -967,7 +1607,7 @@ class MemoryApi:
967
1607
 
968
1608
  return self.api_client.param_serialize(
969
1609
  method='GET',
970
- resource_path='/v1/default/banks/{bank_id}/memories/list',
1610
+ resource_path='/v1/default/banks/{bank_id}/tags',
971
1611
  path_params=_path_params,
972
1612
  query_params=_query_params,
973
1613
  header_params=_header_params,