agno 2.3.24__py3-none-any.whl → 2.3.26__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 (70) hide show
  1. agno/agent/agent.py +357 -28
  2. agno/db/base.py +214 -0
  3. agno/db/dynamo/dynamo.py +47 -0
  4. agno/db/firestore/firestore.py +47 -0
  5. agno/db/gcs_json/gcs_json_db.py +47 -0
  6. agno/db/in_memory/in_memory_db.py +47 -0
  7. agno/db/json/json_db.py +47 -0
  8. agno/db/mongo/async_mongo.py +229 -0
  9. agno/db/mongo/mongo.py +47 -0
  10. agno/db/mongo/schemas.py +16 -0
  11. agno/db/mysql/async_mysql.py +47 -0
  12. agno/db/mysql/mysql.py +47 -0
  13. agno/db/postgres/async_postgres.py +231 -0
  14. agno/db/postgres/postgres.py +239 -0
  15. agno/db/postgres/schemas.py +19 -0
  16. agno/db/redis/redis.py +47 -0
  17. agno/db/singlestore/singlestore.py +47 -0
  18. agno/db/sqlite/async_sqlite.py +242 -0
  19. agno/db/sqlite/schemas.py +18 -0
  20. agno/db/sqlite/sqlite.py +239 -0
  21. agno/db/surrealdb/surrealdb.py +47 -0
  22. agno/knowledge/chunking/code.py +90 -0
  23. agno/knowledge/chunking/document.py +62 -2
  24. agno/knowledge/chunking/strategy.py +14 -0
  25. agno/knowledge/knowledge.py +7 -1
  26. agno/knowledge/reader/arxiv_reader.py +1 -0
  27. agno/knowledge/reader/csv_reader.py +1 -0
  28. agno/knowledge/reader/docx_reader.py +1 -0
  29. agno/knowledge/reader/firecrawl_reader.py +1 -0
  30. agno/knowledge/reader/json_reader.py +1 -0
  31. agno/knowledge/reader/markdown_reader.py +1 -0
  32. agno/knowledge/reader/pdf_reader.py +1 -0
  33. agno/knowledge/reader/pptx_reader.py +1 -0
  34. agno/knowledge/reader/s3_reader.py +1 -0
  35. agno/knowledge/reader/tavily_reader.py +1 -0
  36. agno/knowledge/reader/text_reader.py +1 -0
  37. agno/knowledge/reader/web_search_reader.py +1 -0
  38. agno/knowledge/reader/website_reader.py +1 -0
  39. agno/knowledge/reader/wikipedia_reader.py +1 -0
  40. agno/knowledge/reader/youtube_reader.py +1 -0
  41. agno/knowledge/utils.py +1 -0
  42. agno/learn/__init__.py +65 -0
  43. agno/learn/config.py +463 -0
  44. agno/learn/curate.py +185 -0
  45. agno/learn/machine.py +690 -0
  46. agno/learn/schemas.py +1043 -0
  47. agno/learn/stores/__init__.py +35 -0
  48. agno/learn/stores/entity_memory.py +3275 -0
  49. agno/learn/stores/learned_knowledge.py +1583 -0
  50. agno/learn/stores/protocol.py +117 -0
  51. agno/learn/stores/session_context.py +1217 -0
  52. agno/learn/stores/user_memory.py +1495 -0
  53. agno/learn/stores/user_profile.py +1220 -0
  54. agno/learn/utils.py +209 -0
  55. agno/models/base.py +59 -0
  56. agno/os/routers/agents/router.py +4 -4
  57. agno/os/routers/knowledge/knowledge.py +7 -0
  58. agno/os/routers/teams/router.py +3 -3
  59. agno/os/routers/workflows/router.py +5 -5
  60. agno/os/utils.py +55 -3
  61. agno/team/team.py +131 -0
  62. agno/tools/browserbase.py +78 -6
  63. agno/tools/google_bigquery.py +11 -2
  64. agno/utils/agent.py +30 -1
  65. agno/workflow/workflow.py +198 -0
  66. {agno-2.3.24.dist-info → agno-2.3.26.dist-info}/METADATA +24 -2
  67. {agno-2.3.24.dist-info → agno-2.3.26.dist-info}/RECORD +70 -56
  68. {agno-2.3.24.dist-info → agno-2.3.26.dist-info}/WHEEL +0 -0
  69. {agno-2.3.24.dist-info → agno-2.3.26.dist-info}/licenses/LICENSE +0 -0
  70. {agno-2.3.24.dist-info → agno-2.3.26.dist-info}/top_level.txt +0 -0
agno/db/base.py CHANGED
@@ -37,6 +37,7 @@ class BaseDb(ABC):
37
37
  traces_table: Optional[str] = None,
38
38
  spans_table: Optional[str] = None,
39
39
  versions_table: Optional[str] = None,
40
+ learnings_table: Optional[str] = None,
40
41
  id: Optional[str] = None,
41
42
  ):
42
43
  self.id = id or str(uuid4())
@@ -49,6 +50,7 @@ class BaseDb(ABC):
49
50
  self.trace_table_name = traces_table or "agno_traces"
50
51
  self.span_table_name = spans_table or "agno_spans"
51
52
  self.versions_table_name = versions_table or "agno_schema_versions"
53
+ self.learnings_table_name = learnings_table or "agno_learnings"
52
54
 
53
55
  @abstractmethod
54
56
  def table_exists(self, table_name: str) -> bool:
@@ -497,6 +499,111 @@ class BaseDb(ABC):
497
499
  def upsert_cultural_knowledge(self, cultural_knowledge: CulturalKnowledge) -> Optional[CulturalKnowledge]:
498
500
  raise NotImplementedError
499
501
 
502
+ # --- Learnings ---
503
+ @abstractmethod
504
+ def get_learning(
505
+ self,
506
+ learning_type: str,
507
+ user_id: Optional[str] = None,
508
+ agent_id: Optional[str] = None,
509
+ team_id: Optional[str] = None,
510
+ session_id: Optional[str] = None,
511
+ namespace: Optional[str] = None,
512
+ entity_id: Optional[str] = None,
513
+ entity_type: Optional[str] = None,
514
+ ) -> Optional[Dict[str, Any]]:
515
+ """Retrieve a learning record.
516
+
517
+ Args:
518
+ learning_type: Type of learning ('user_profile', 'session_context', etc.)
519
+ user_id: Filter by user ID.
520
+ agent_id: Filter by agent ID.
521
+ team_id: Filter by team ID.
522
+ session_id: Filter by session ID.
523
+ namespace: Filter by namespace ('user', 'global', or custom).
524
+ entity_id: Filter by entity ID (for entity-specific learnings).
525
+ entity_type: Filter by entity type ('person', 'company', etc.).
526
+
527
+ Returns:
528
+ Dict with 'content' key containing the learning data, or None.
529
+ """
530
+ raise NotImplementedError
531
+
532
+ @abstractmethod
533
+ def upsert_learning(
534
+ self,
535
+ id: str,
536
+ learning_type: str,
537
+ content: Dict[str, Any],
538
+ user_id: Optional[str] = None,
539
+ agent_id: Optional[str] = None,
540
+ team_id: Optional[str] = None,
541
+ session_id: Optional[str] = None,
542
+ namespace: Optional[str] = None,
543
+ entity_id: Optional[str] = None,
544
+ entity_type: Optional[str] = None,
545
+ metadata: Optional[Dict[str, Any]] = None,
546
+ ) -> None:
547
+ """Insert or update a learning record.
548
+
549
+ Args:
550
+ id: Unique identifier for the learning.
551
+ learning_type: Type of learning ('user_profile', 'session_context', etc.)
552
+ content: The learning content as a dict.
553
+ user_id: Associated user ID.
554
+ agent_id: Associated agent ID.
555
+ team_id: Associated team ID.
556
+ session_id: Associated session ID.
557
+ namespace: Namespace for scoping ('user', 'global', or custom).
558
+ entity_id: Associated entity ID (for entity-specific learnings).
559
+ entity_type: Entity type ('person', 'company', etc.).
560
+ metadata: Optional metadata.
561
+ """
562
+ raise NotImplementedError
563
+
564
+ @abstractmethod
565
+ def delete_learning(self, id: str) -> bool:
566
+ """Delete a learning record.
567
+
568
+ Args:
569
+ id: The learning ID to delete.
570
+
571
+ Returns:
572
+ True if deleted, False otherwise.
573
+ """
574
+ raise NotImplementedError
575
+
576
+ @abstractmethod
577
+ def get_learnings(
578
+ self,
579
+ learning_type: Optional[str] = None,
580
+ user_id: Optional[str] = None,
581
+ agent_id: Optional[str] = None,
582
+ team_id: Optional[str] = None,
583
+ session_id: Optional[str] = None,
584
+ namespace: Optional[str] = None,
585
+ entity_id: Optional[str] = None,
586
+ entity_type: Optional[str] = None,
587
+ limit: Optional[int] = None,
588
+ ) -> List[Dict[str, Any]]:
589
+ """Get multiple learning records.
590
+
591
+ Args:
592
+ learning_type: Filter by learning type.
593
+ user_id: Filter by user ID.
594
+ agent_id: Filter by agent ID.
595
+ team_id: Filter by team ID.
596
+ session_id: Filter by session ID.
597
+ namespace: Filter by namespace ('user', 'global', or custom).
598
+ entity_id: Filter by entity ID (for entity-specific learnings).
599
+ entity_type: Filter by entity type ('person', 'company', etc.).
600
+ limit: Maximum number of records to return.
601
+
602
+ Returns:
603
+ List of learning records.
604
+ """
605
+ raise NotImplementedError
606
+
500
607
 
501
608
  class AsyncBaseDb(ABC):
502
609
  """Base abstract class for all our async database implementations."""
@@ -513,6 +620,7 @@ class AsyncBaseDb(ABC):
513
620
  spans_table: Optional[str] = None,
514
621
  culture_table: Optional[str] = None,
515
622
  versions_table: Optional[str] = None,
623
+ learnings_table: Optional[str] = None,
516
624
  ):
517
625
  self.id = id or str(uuid4())
518
626
  self.session_table_name = session_table or "agno_sessions"
@@ -524,6 +632,7 @@ class AsyncBaseDb(ABC):
524
632
  self.span_table_name = spans_table or "agno_spans"
525
633
  self.culture_table_name = culture_table or "agno_culture"
526
634
  self.versions_table_name = versions_table or "agno_schema_versions"
635
+ self.learnings_table_name = learnings_table or "agno_learnings"
527
636
 
528
637
  async def _create_all_tables(self) -> None:
529
638
  """Create all tables for this database. Override in subclasses."""
@@ -964,3 +1073,108 @@ class AsyncBaseDb(ABC):
964
1073
  self, cultural_knowledge: CulturalKnowledge, deserialize: Optional[bool] = True
965
1074
  ) -> Optional[Union[CulturalKnowledge, Dict[str, Any]]]:
966
1075
  raise NotImplementedError
1076
+
1077
+ # --- Learnings ---
1078
+ @abstractmethod
1079
+ async def get_learning(
1080
+ self,
1081
+ learning_type: str,
1082
+ user_id: Optional[str] = None,
1083
+ agent_id: Optional[str] = None,
1084
+ team_id: Optional[str] = None,
1085
+ session_id: Optional[str] = None,
1086
+ namespace: Optional[str] = None,
1087
+ entity_id: Optional[str] = None,
1088
+ entity_type: Optional[str] = None,
1089
+ ) -> Optional[Dict[str, Any]]:
1090
+ """Async retrieve a learning record.
1091
+
1092
+ Args:
1093
+ learning_type: Type of learning ('user_profile', 'session_context', etc.)
1094
+ user_id: Filter by user ID.
1095
+ agent_id: Filter by agent ID.
1096
+ team_id: Filter by team ID.
1097
+ session_id: Filter by session ID.
1098
+ namespace: Filter by namespace ('user', 'global', or custom).
1099
+ entity_id: Filter by entity ID (for entity-specific learnings).
1100
+ entity_type: Filter by entity type ('person', 'company', etc.).
1101
+
1102
+ Returns:
1103
+ Dict with 'content' key containing the learning data, or None.
1104
+ """
1105
+ raise NotImplementedError
1106
+
1107
+ @abstractmethod
1108
+ async def upsert_learning(
1109
+ self,
1110
+ id: str,
1111
+ learning_type: str,
1112
+ content: Dict[str, Any],
1113
+ user_id: Optional[str] = None,
1114
+ agent_id: Optional[str] = None,
1115
+ team_id: Optional[str] = None,
1116
+ session_id: Optional[str] = None,
1117
+ namespace: Optional[str] = None,
1118
+ entity_id: Optional[str] = None,
1119
+ entity_type: Optional[str] = None,
1120
+ metadata: Optional[Dict[str, Any]] = None,
1121
+ ) -> None:
1122
+ """Async insert or update a learning record.
1123
+
1124
+ Args:
1125
+ id: Unique identifier for the learning.
1126
+ learning_type: Type of learning ('user_profile', 'session_context', etc.)
1127
+ content: The learning content as a dict.
1128
+ user_id: Associated user ID.
1129
+ agent_id: Associated agent ID.
1130
+ team_id: Associated team ID.
1131
+ session_id: Associated session ID.
1132
+ namespace: Namespace for scoping ('user', 'global', or custom).
1133
+ entity_id: Associated entity ID (for entity-specific learnings).
1134
+ entity_type: Entity type ('person', 'company', etc.).
1135
+ metadata: Optional metadata.
1136
+ """
1137
+ raise NotImplementedError
1138
+
1139
+ @abstractmethod
1140
+ async def delete_learning(self, id: str) -> bool:
1141
+ """Async delete a learning record.
1142
+
1143
+ Args:
1144
+ id: The learning ID to delete.
1145
+
1146
+ Returns:
1147
+ True if deleted, False otherwise.
1148
+ """
1149
+ raise NotImplementedError
1150
+
1151
+ @abstractmethod
1152
+ async def get_learnings(
1153
+ self,
1154
+ learning_type: Optional[str] = None,
1155
+ user_id: Optional[str] = None,
1156
+ agent_id: Optional[str] = None,
1157
+ team_id: Optional[str] = None,
1158
+ session_id: Optional[str] = None,
1159
+ namespace: Optional[str] = None,
1160
+ entity_id: Optional[str] = None,
1161
+ entity_type: Optional[str] = None,
1162
+ limit: Optional[int] = None,
1163
+ ) -> List[Dict[str, Any]]:
1164
+ """Async get multiple learning records.
1165
+
1166
+ Args:
1167
+ learning_type: Filter by learning type.
1168
+ user_id: Filter by user ID.
1169
+ agent_id: Filter by agent ID.
1170
+ team_id: Filter by team ID.
1171
+ session_id: Filter by session ID.
1172
+ namespace: Filter by namespace ('user', 'global', or custom).
1173
+ entity_id: Filter by entity ID (for entity-specific learnings).
1174
+ entity_type: Filter by entity type ('person', 'company', etc.).
1175
+ limit: Maximum number of records to return.
1176
+
1177
+ Returns:
1178
+ List of learning records.
1179
+ """
1180
+ raise NotImplementedError
agno/db/dynamo/dynamo.py CHANGED
@@ -2779,3 +2779,50 @@ class DynamoDb(BaseDb):
2779
2779
  except Exception as e:
2780
2780
  log_error(f"Error getting spans: {e}")
2781
2781
  return []
2782
+
2783
+ # -- Learning methods (stubs) --
2784
+ def get_learning(
2785
+ self,
2786
+ learning_type: str,
2787
+ user_id: Optional[str] = None,
2788
+ agent_id: Optional[str] = None,
2789
+ team_id: Optional[str] = None,
2790
+ session_id: Optional[str] = None,
2791
+ namespace: Optional[str] = None,
2792
+ entity_id: Optional[str] = None,
2793
+ entity_type: Optional[str] = None,
2794
+ ) -> Optional[Dict[str, Any]]:
2795
+ raise NotImplementedError("Learning methods not yet implemented for DynamoDb")
2796
+
2797
+ def upsert_learning(
2798
+ self,
2799
+ id: str,
2800
+ learning_type: str,
2801
+ content: Dict[str, Any],
2802
+ user_id: Optional[str] = None,
2803
+ agent_id: Optional[str] = None,
2804
+ team_id: Optional[str] = None,
2805
+ session_id: Optional[str] = None,
2806
+ namespace: Optional[str] = None,
2807
+ entity_id: Optional[str] = None,
2808
+ entity_type: Optional[str] = None,
2809
+ metadata: Optional[Dict[str, Any]] = None,
2810
+ ) -> None:
2811
+ raise NotImplementedError("Learning methods not yet implemented for DynamoDb")
2812
+
2813
+ def delete_learning(self, id: str) -> bool:
2814
+ raise NotImplementedError("Learning methods not yet implemented for DynamoDb")
2815
+
2816
+ def get_learnings(
2817
+ self,
2818
+ learning_type: Optional[str] = None,
2819
+ user_id: Optional[str] = None,
2820
+ agent_id: Optional[str] = None,
2821
+ team_id: Optional[str] = None,
2822
+ session_id: Optional[str] = None,
2823
+ namespace: Optional[str] = None,
2824
+ entity_id: Optional[str] = None,
2825
+ entity_type: Optional[str] = None,
2826
+ limit: Optional[int] = None,
2827
+ ) -> List[Dict[str, Any]]:
2828
+ raise NotImplementedError("Learning methods not yet implemented for DynamoDb")
@@ -2377,3 +2377,50 @@ class FirestoreDb(BaseDb):
2377
2377
  except Exception as e:
2378
2378
  log_error(f"Error getting spans: {e}")
2379
2379
  return []
2380
+
2381
+ # -- Learning methods (stubs) --
2382
+ def get_learning(
2383
+ self,
2384
+ learning_type: str,
2385
+ user_id: Optional[str] = None,
2386
+ agent_id: Optional[str] = None,
2387
+ team_id: Optional[str] = None,
2388
+ session_id: Optional[str] = None,
2389
+ namespace: Optional[str] = None,
2390
+ entity_id: Optional[str] = None,
2391
+ entity_type: Optional[str] = None,
2392
+ ) -> Optional[Dict[str, Any]]:
2393
+ raise NotImplementedError("Learning methods not yet implemented for FirestoreDb")
2394
+
2395
+ def upsert_learning(
2396
+ self,
2397
+ id: str,
2398
+ learning_type: str,
2399
+ content: Dict[str, Any],
2400
+ user_id: Optional[str] = None,
2401
+ agent_id: Optional[str] = None,
2402
+ team_id: Optional[str] = None,
2403
+ session_id: Optional[str] = None,
2404
+ namespace: Optional[str] = None,
2405
+ entity_id: Optional[str] = None,
2406
+ entity_type: Optional[str] = None,
2407
+ metadata: Optional[Dict[str, Any]] = None,
2408
+ ) -> None:
2409
+ raise NotImplementedError("Learning methods not yet implemented for FirestoreDb")
2410
+
2411
+ def delete_learning(self, id: str) -> bool:
2412
+ raise NotImplementedError("Learning methods not yet implemented for FirestoreDb")
2413
+
2414
+ def get_learnings(
2415
+ self,
2416
+ learning_type: Optional[str] = None,
2417
+ user_id: Optional[str] = None,
2418
+ agent_id: Optional[str] = None,
2419
+ team_id: Optional[str] = None,
2420
+ session_id: Optional[str] = None,
2421
+ namespace: Optional[str] = None,
2422
+ entity_id: Optional[str] = None,
2423
+ entity_type: Optional[str] = None,
2424
+ limit: Optional[int] = None,
2425
+ ) -> List[Dict[str, Any]]:
2426
+ raise NotImplementedError("Learning methods not yet implemented for FirestoreDb")
@@ -1789,3 +1789,50 @@ class GcsJsonDb(BaseDb):
1789
1789
  except Exception as e:
1790
1790
  log_error(f"Error getting spans: {e}")
1791
1791
  return []
1792
+
1793
+ # -- Learning methods (stubs) --
1794
+ def get_learning(
1795
+ self,
1796
+ learning_type: str,
1797
+ user_id: Optional[str] = None,
1798
+ agent_id: Optional[str] = None,
1799
+ team_id: Optional[str] = None,
1800
+ session_id: Optional[str] = None,
1801
+ namespace: Optional[str] = None,
1802
+ entity_id: Optional[str] = None,
1803
+ entity_type: Optional[str] = None,
1804
+ ) -> Optional[Dict[str, Any]]:
1805
+ raise NotImplementedError("Learning methods not yet implemented for GcsJsonDb")
1806
+
1807
+ def upsert_learning(
1808
+ self,
1809
+ id: str,
1810
+ learning_type: str,
1811
+ content: Dict[str, Any],
1812
+ user_id: Optional[str] = None,
1813
+ agent_id: Optional[str] = None,
1814
+ team_id: Optional[str] = None,
1815
+ session_id: Optional[str] = None,
1816
+ namespace: Optional[str] = None,
1817
+ entity_id: Optional[str] = None,
1818
+ entity_type: Optional[str] = None,
1819
+ metadata: Optional[Dict[str, Any]] = None,
1820
+ ) -> None:
1821
+ raise NotImplementedError("Learning methods not yet implemented for GcsJsonDb")
1822
+
1823
+ def delete_learning(self, id: str) -> bool:
1824
+ raise NotImplementedError("Learning methods not yet implemented for GcsJsonDb")
1825
+
1826
+ def get_learnings(
1827
+ self,
1828
+ learning_type: Optional[str] = None,
1829
+ user_id: Optional[str] = None,
1830
+ agent_id: Optional[str] = None,
1831
+ team_id: Optional[str] = None,
1832
+ session_id: Optional[str] = None,
1833
+ namespace: Optional[str] = None,
1834
+ entity_id: Optional[str] = None,
1835
+ entity_type: Optional[str] = None,
1836
+ limit: Optional[int] = None,
1837
+ ) -> List[Dict[str, Any]]:
1838
+ raise NotImplementedError("Learning methods not yet implemented for GcsJsonDb")
@@ -1310,3 +1310,50 @@ class InMemoryDb(BaseDb):
1310
1310
  List[Span]: List of matching spans.
1311
1311
  """
1312
1312
  raise NotImplementedError
1313
+
1314
+ # -- Learning methods (stubs) --
1315
+ def get_learning(
1316
+ self,
1317
+ learning_type: str,
1318
+ user_id: Optional[str] = None,
1319
+ agent_id: Optional[str] = None,
1320
+ team_id: Optional[str] = None,
1321
+ session_id: Optional[str] = None,
1322
+ namespace: Optional[str] = None,
1323
+ entity_id: Optional[str] = None,
1324
+ entity_type: Optional[str] = None,
1325
+ ) -> Optional[Dict[str, Any]]:
1326
+ raise NotImplementedError("Learning methods not yet implemented for InMemoryDb")
1327
+
1328
+ def upsert_learning(
1329
+ self,
1330
+ id: str,
1331
+ learning_type: str,
1332
+ content: Dict[str, Any],
1333
+ user_id: Optional[str] = None,
1334
+ agent_id: Optional[str] = None,
1335
+ team_id: Optional[str] = None,
1336
+ session_id: Optional[str] = None,
1337
+ namespace: Optional[str] = None,
1338
+ entity_id: Optional[str] = None,
1339
+ entity_type: Optional[str] = None,
1340
+ metadata: Optional[Dict[str, Any]] = None,
1341
+ ) -> None:
1342
+ raise NotImplementedError("Learning methods not yet implemented for InMemoryDb")
1343
+
1344
+ def delete_learning(self, id: str) -> bool:
1345
+ raise NotImplementedError("Learning methods not yet implemented for InMemoryDb")
1346
+
1347
+ def get_learnings(
1348
+ self,
1349
+ learning_type: Optional[str] = None,
1350
+ user_id: Optional[str] = None,
1351
+ agent_id: Optional[str] = None,
1352
+ team_id: Optional[str] = None,
1353
+ session_id: Optional[str] = None,
1354
+ namespace: Optional[str] = None,
1355
+ entity_id: Optional[str] = None,
1356
+ entity_type: Optional[str] = None,
1357
+ limit: Optional[int] = None,
1358
+ ) -> List[Dict[str, Any]]:
1359
+ raise NotImplementedError("Learning methods not yet implemented for InMemoryDb")
agno/db/json/json_db.py CHANGED
@@ -1775,3 +1775,50 @@ class JsonDb(BaseDb):
1775
1775
  except Exception as e:
1776
1776
  log_error(f"Error getting spans: {e}")
1777
1777
  return []
1778
+
1779
+ # -- Learning methods (stubs) --
1780
+ def get_learning(
1781
+ self,
1782
+ learning_type: str,
1783
+ user_id: Optional[str] = None,
1784
+ agent_id: Optional[str] = None,
1785
+ team_id: Optional[str] = None,
1786
+ session_id: Optional[str] = None,
1787
+ namespace: Optional[str] = None,
1788
+ entity_id: Optional[str] = None,
1789
+ entity_type: Optional[str] = None,
1790
+ ) -> Optional[Dict[str, Any]]:
1791
+ raise NotImplementedError("Learning methods not yet implemented for JsonDb")
1792
+
1793
+ def upsert_learning(
1794
+ self,
1795
+ id: str,
1796
+ learning_type: str,
1797
+ content: Dict[str, Any],
1798
+ user_id: Optional[str] = None,
1799
+ agent_id: Optional[str] = None,
1800
+ team_id: Optional[str] = None,
1801
+ session_id: Optional[str] = None,
1802
+ namespace: Optional[str] = None,
1803
+ entity_id: Optional[str] = None,
1804
+ entity_type: Optional[str] = None,
1805
+ metadata: Optional[Dict[str, Any]] = None,
1806
+ ) -> None:
1807
+ raise NotImplementedError("Learning methods not yet implemented for JsonDb")
1808
+
1809
+ def delete_learning(self, id: str) -> bool:
1810
+ raise NotImplementedError("Learning methods not yet implemented for JsonDb")
1811
+
1812
+ def get_learnings(
1813
+ self,
1814
+ learning_type: Optional[str] = None,
1815
+ user_id: Optional[str] = None,
1816
+ agent_id: Optional[str] = None,
1817
+ team_id: Optional[str] = None,
1818
+ session_id: Optional[str] = None,
1819
+ namespace: Optional[str] = None,
1820
+ entity_id: Optional[str] = None,
1821
+ entity_type: Optional[str] = None,
1822
+ limit: Optional[int] = None,
1823
+ ) -> List[Dict[str, Any]]:
1824
+ raise NotImplementedError("Learning methods not yet implemented for JsonDb")