noesium 0.1.0__py3-none-any.whl → 0.2.1__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. noesium/agents/askura_agent/__init__.py +22 -0
  2. noesium/agents/askura_agent/askura_agent.py +480 -0
  3. noesium/agents/askura_agent/conversation.py +164 -0
  4. noesium/agents/askura_agent/extractor.py +175 -0
  5. noesium/agents/askura_agent/memory.py +14 -0
  6. noesium/agents/askura_agent/models.py +239 -0
  7. noesium/agents/askura_agent/prompts.py +202 -0
  8. noesium/agents/askura_agent/reflection.py +234 -0
  9. noesium/agents/askura_agent/summarizer.py +30 -0
  10. noesium/agents/askura_agent/utils.py +6 -0
  11. noesium/agents/deep_research/__init__.py +13 -0
  12. noesium/agents/deep_research/agent.py +398 -0
  13. noesium/agents/deep_research/prompts.py +84 -0
  14. noesium/agents/deep_research/schemas.py +42 -0
  15. noesium/agents/deep_research/state.py +54 -0
  16. noesium/agents/search/__init__.py +5 -0
  17. noesium/agents/search/agent.py +474 -0
  18. noesium/agents/search/state.py +28 -0
  19. noesium/core/__init__.py +1 -1
  20. noesium/core/agent/base.py +10 -2
  21. noesium/core/goalith/decomposer/llm_decomposer.py +1 -1
  22. noesium/core/llm/__init__.py +1 -1
  23. noesium/core/llm/base.py +2 -2
  24. noesium/core/llm/litellm.py +42 -21
  25. noesium/core/llm/llamacpp.py +25 -4
  26. noesium/core/llm/ollama.py +43 -22
  27. noesium/core/llm/openai.py +25 -5
  28. noesium/core/llm/openrouter.py +1 -1
  29. noesium/core/toolify/base.py +9 -2
  30. noesium/core/toolify/config.py +2 -2
  31. noesium/core/toolify/registry.py +21 -5
  32. noesium/core/tracing/opik_tracing.py +7 -7
  33. noesium/core/vector_store/__init__.py +2 -2
  34. noesium/core/vector_store/base.py +1 -1
  35. noesium/core/vector_store/pgvector.py +10 -13
  36. noesium/core/vector_store/weaviate.py +2 -1
  37. noesium/toolkits/__init__.py +1 -0
  38. noesium/toolkits/arxiv_toolkit.py +310 -0
  39. noesium/toolkits/audio_aliyun_toolkit.py +441 -0
  40. noesium/toolkits/audio_toolkit.py +370 -0
  41. noesium/toolkits/bash_toolkit.py +332 -0
  42. noesium/toolkits/document_toolkit.py +454 -0
  43. noesium/toolkits/file_edit_toolkit.py +552 -0
  44. noesium/toolkits/github_toolkit.py +395 -0
  45. noesium/toolkits/gmail_toolkit.py +575 -0
  46. noesium/toolkits/image_toolkit.py +425 -0
  47. noesium/toolkits/memory_toolkit.py +398 -0
  48. noesium/toolkits/python_executor_toolkit.py +334 -0
  49. noesium/toolkits/search_toolkit.py +451 -0
  50. noesium/toolkits/serper_toolkit.py +623 -0
  51. noesium/toolkits/tabular_data_toolkit.py +537 -0
  52. noesium/toolkits/user_interaction_toolkit.py +365 -0
  53. noesium/toolkits/video_toolkit.py +168 -0
  54. noesium/toolkits/wikipedia_toolkit.py +420 -0
  55. noesium-0.2.1.dist-info/METADATA +253 -0
  56. {noesium-0.1.0.dist-info → noesium-0.2.1.dist-info}/RECORD +59 -23
  57. {noesium-0.1.0.dist-info → noesium-0.2.1.dist-info}/licenses/LICENSE +1 -1
  58. noesium-0.1.0.dist-info/METADATA +0 -525
  59. {noesium-0.1.0.dist-info → noesium-0.2.1.dist-info}/WHEEL +0 -0
  60. {noesium-0.1.0.dist-info → noesium-0.2.1.dist-info}/top_level.txt +0 -0
@@ -1,8 +1,26 @@
1
- noesium/core/__init__.py,sha256=A43qGT8y35NZfO8qGLwRdmizmQqgWAUGr0a2LmSz7ZY,151
1
+ noesium/agents/askura_agent/__init__.py,sha256=JMQpxNxvUdV_H236RcW8F7PTvpZi57sAUR5ZCfY4A2E,672
2
+ noesium/agents/askura_agent/askura_agent.py,sha256=wbvnZoAO7SSepF99nLXdNl49xJOe4Ea1aOp3eJf2CVY,20660
3
+ noesium/agents/askura_agent/conversation.py,sha256=wigf25vdi1h0acWBN_hU2Tnjv05pmy6m2IN4eEBaSR8,7177
4
+ noesium/agents/askura_agent/extractor.py,sha256=THzRCy120O23pUoNb1kzpKpUuffL8nPMOXCPuEYeCdY,7474
5
+ noesium/agents/askura_agent/memory.py,sha256=SgacTTFH7yzUlUPxvupEXI1aE8r3fiCiU2BlZ0QSWiM,243
6
+ noesium/agents/askura_agent/models.py,sha256=3Sm1vPSQ0dVFrPyrp6SZ5AR_BJVfC_WTNwdaqQ_lCKE,8163
7
+ noesium/agents/askura_agent/prompts.py,sha256=BrQe1hk-ayQnPWxk0TcteE-by_Twh70ejHVrRFlxUpY,9874
8
+ noesium/agents/askura_agent/reflection.py,sha256=hJNMsu4-H1qO7QVNSjne4Id0NQgjHyNssy5ZI0pXVXE,10447
9
+ noesium/agents/askura_agent/summarizer.py,sha256=99obYfSVmZMvJSj3vP7eFYmULt_expODU_5DX_vyOuc,1140
10
+ noesium/agents/askura_agent/utils.py,sha256=afTjj7snsxu9MPzuZigB7PzDfHUB9C_LsTX8WEGxDkc,236
11
+ noesium/agents/deep_research/__init__.py,sha256=Fi-mJNj7ovIqAXA35vqIm1dvZE7W90sGeI6aEnV6Pmg,255
12
+ noesium/agents/deep_research/agent.py,sha256=O1nbwdyWnHWSpHWSYBMqPUC_QQbMPpHmGOV91aXki2k,15710
13
+ noesium/agents/deep_research/prompts.py,sha256=xMhUoGby76WApBfSL6bjacRahDzNpQM1Se472kZ-Ty8,3878
14
+ noesium/agents/deep_research/schemas.py,sha256=kLGtQgLlnTG5sllobK0xKdsgxdgBuTWDmk8ef1rMWp8,1509
15
+ noesium/agents/deep_research/state.py,sha256=kIXDTV1-rRYNIHPPspDVVrsnHrVJT0T45sXcwx7YNG4,1199
16
+ noesium/agents/search/__init__.py,sha256=rh_CriiUt-s6Ux8qgu39k4bBl_vkETVgCBKB54_CBZM,65
17
+ noesium/agents/search/agent.py,sha256=Fffg_nHQmVrlN2YSf-6q9k07OrELun0Rg9jxO90KxBA,19495
18
+ noesium/agents/search/state.py,sha256=uKio0wJxkjWbW_VDKoDg21XPLZMIgSMF1BRfHy92X9g,581
19
+ noesium/core/__init__.py,sha256=03RptDWvn2mnMVqC5SHGXjzh2WkfuWZ0oetPC3y5T4k,151
2
20
  noesium/core/consts.py,sha256=kQkfpHhtuDMZbr6E02C1VvMZiTmBgNuRsJo2WF8kcqU,155
3
21
  noesium/core/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
22
  noesium/core/agent/__init__.py,sha256=Bds12umS_T4WzSXriph3DL_Bndf_Dz7pbhchv4dEoJQ,306
5
- noesium/core/agent/base.py,sha256=FyAPigcAfEMgZXZ60gccn2n-7JLCRazeEr6LvkRUhoA,8548
23
+ noesium/core/agent/base.py,sha256=cHyhkX8S_vZ_J9N_YChPRyPlsMU4twzvpa0szJE1rjw,8694
6
24
  noesium/core/goalith/errors.py,sha256=xCDeys0secxL_8_AqWjigV3c6UnQ-M-FpS8BOe2-Hgs,543
7
25
  noesium/core/goalith/service.py,sha256=8nvDhZMrhujS9brfVai6LKA2H_jgi9SrQ_UG5X4xKSk,611
8
26
  noesium/core/goalith/conflict/conflict.py,sha256=olnEPlmuKyXrL3XWfe13pe3N-k7VgsVBo6U-DwiXDJc,3683
@@ -10,21 +28,21 @@ noesium/core/goalith/conflict/detector.py,sha256=v7ZqwlmQwMEgR3m_iFjPD5fEzPfusQs
10
28
  noesium/core/goalith/decomposer/__init__.py,sha256=iX-Ev5rzihigxMGQEoTPk8PHvTRIvq0766NfG76dVLo,272
11
29
  noesium/core/goalith/decomposer/base.py,sha256=Pg5Gaw7w7mgTrXktw8ijGsnYmHakvpraq1twcnDUczs,1265
12
30
  noesium/core/goalith/decomposer/callable_decomposer.py,sha256=MTFm_VdjnuWgLNK9VA5zD17GI1YMiPYkbVUO08Ua2sA,2055
13
- noesium/core/goalith/decomposer/llm_decomposer.py,sha256=5ERtdPR204k5Au89nvrOH-fZaDl9a-UPYZQo8tAWwXA,12249
31
+ noesium/core/goalith/decomposer/llm_decomposer.py,sha256=_tZtNCQuvS8xvIAk5H_2KgOARJ_oN4eZ2J8uqad-bp8,12249
14
32
  noesium/core/goalith/decomposer/prompts.py,sha256=23-bFA80dWC_WcTB0BiPj7SwYFkgPrmjQNGhkhwj8BA,5235
15
33
  noesium/core/goalith/decomposer/simple_decomposer.py,sha256=k0TmDO7flkOzI4zWBm3UzqgjxMm0KWCWp4vItY1bIrI,1852
16
34
  noesium/core/goalith/goalgraph/graph.py,sha256=JIoGw2X4Sefxi5eoTx7N_MGcD33YYU3vHYb6xAzoKwY,16549
17
35
  noesium/core/goalith/goalgraph/node.py,sha256=Q7bXV0o0-E_anxUH6rLfZaYXZh2xEjeTRCQ5Hx0T3gQ,6998
18
36
  noesium/core/goalith/replanner/base.py,sha256=HBWU5uBftT3uzW8e8_g258EZdj2hAHxpH7UWMRiy4hk,780
19
37
  noesium/core/goalith/replanner/replanner.py,sha256=AI53IWCQ7D_eJ98aW7UkoALote0vOlxfq-XA0UCVn-g,1082
20
- noesium/core/llm/__init__.py,sha256=7RBY8ydEBYtmUGgCPmpJXpB-_Zwr5D63S8s4FY-gBPY,5245
21
- noesium/core/llm/base.py,sha256=TiCp5Qobfm4vVuvo4wdg4IrPS7DjjpS0XYznWlIy6N8,4532
22
- noesium/core/llm/litellm.py,sha256=2HQxr_jF12SqGnzUy1WUILoWkB_Qt0fKi6cHRgaPJFA,19358
23
- noesium/core/llm/llamacpp.py,sha256=b_oY2s6QybMnLf1EhNbeIIwJQek7Qd_L0wMmymSsM10,17832
38
+ noesium/core/llm/__init__.py,sha256=nGrmUVsfFlPocn2XGaTBnPVFjapz7jaow9rB7MKSCIU,5245
39
+ noesium/core/llm/base.py,sha256=Vy7GAkLPTTK42219slYv-7Id-ZgHFdVayuMlHzlnstE,4532
40
+ noesium/core/llm/litellm.py,sha256=yHplcL2hIvr0IUSQCGQZtyv_wKfv77ABxhyBZ_p-cIw,19990
41
+ noesium/core/llm/llamacpp.py,sha256=0VPkEju57qZ0D9W1fRwI3PaxrAXGhm1rfW-2VL7dcuk,18430
24
42
  noesium/core/llm/message.py,sha256=GUUdNVynSwzPZp6_Xq3ICv-9sQFyOVvsvSo_n1C1_uE,5775
25
- noesium/core/llm/ollama.py,sha256=NnxrxBwzHP1N5FH1VJgsyQqKSn3rF8B__Z32OV6Bm8Y,15593
26
- noesium/core/llm/openai.py,sha256=gCySMHiRNG5r8fsjQe_HyCueZVfSqnf-_kfEL3p4UMk,19052
27
- noesium/core/llm/openrouter.py,sha256=0Vkzz-YOszXfA0FOKERzM6h4Dwhts07Lp8j0OxsOe-c,3131
43
+ noesium/core/llm/ollama.py,sha256=jnxEbIZvWJ8az6nnMjrtCYWZfaojWfVcGmhWwGXEb6E,16226
44
+ noesium/core/llm/openai.py,sha256=x3xJ216hKAoHOJqmzb6RnigDX8NlHIRq9U4-kis2F5k,19617
45
+ noesium/core/llm/openrouter.py,sha256=Any9wZq-2IOserudom5IYNC5zrJc_Q2amnfw8Bh0D24,3131
28
46
  noesium/core/llm/prompt.py,sha256=LVL7qZhvUWBdCYmoM3ybbLOnhnUBu6reM6J75KQ1qeA,19753
29
47
  noesium/core/memory/__init__.py,sha256=P-Qk09fXVexIt-NvHR5b4ZqZ2Z9n4SRpOcevR3NxLzM,265
30
48
  noesium/core/memory/base.py,sha256=wN5X1tN3LqQTCYJjiefBTZYZivMdru83eEs2F6pVKQU,15648
@@ -62,25 +80,43 @@ noesium/core/routing/strategies/__init__.py,sha256=643Cw5-Nbm12Pa2YoFyP-Xqve_VCp
62
80
  noesium/core/routing/strategies/dynamic_complexity.py,sha256=kXI6Mn3Hhpg-chtJkQQ4ZiHMzRjG73SoB2BFEFrN3IQ,13637
63
81
  noesium/core/routing/strategies/self_assessment.py,sha256=A_VFvEbUkYBIRz-wHxqPJ6h-1PJs2O5AIX6eiJaNkAI,5459
64
82
  noesium/core/toolify/__init__.py,sha256=mVvZSu4FykwrIl6S4unI2CXk0CVebhb-bHG-0lv1r_U,957
65
- noesium/core/toolify/base.py,sha256=iO79UqJ8E_k2pK1QUMV2ziPf7e9smWMzvSPG-XnFXFI,11439
66
- noesium/core/toolify/config.py,sha256=UIEDz2iWGzCFXU45_J1bj3V0YPPIvsa4imFNc6yNTjk,4261
83
+ noesium/core/toolify/base.py,sha256=cThGND1xtalv5iD6riH3cg3oP80QzdH7x-NAEoZ6FBQ,11568
84
+ noesium/core/toolify/config.py,sha256=F4AlLgSGNHB2f6VJfEjqz0zqavOaXUbc2DjkgX29iqQ,4261
67
85
  noesium/core/toolify/mcp_integration.py,sha256=AEnkRWBR_XQ3nzq6gWkp2mjXz5DCKwUskvyVffxWzWw,9181
68
- noesium/core/toolify/registry.py,sha256=DbBUR4j55ux-So8-1HTG3TPscuPA1VUlDWbkdxcG8M4,5765
86
+ noesium/core/toolify/registry.py,sha256=ZqKmwnRNjprDeYsbjRqYfuABtz0tEtVAeLMeBAdKPdk,6409
69
87
  noesium/core/toolify/toolkits/__init__.py,sha256=-TFS324sAs74G6m1sbnI2QTmGW_oeHMn8WiKGoK2gcU,25
70
88
  noesium/core/tracing/__init__.py,sha256=BQ_AZGHPpcDPCZXsTuhrbud-PD20eBOIUgQ1p3BiuMk,986
71
89
  noesium/core/tracing/langgraph_hooks.py,sha256=8clMfaziTI--UrG40H2XzK4TSIQ5v6ZvEZxhoskThug,13793
72
- noesium/core/tracing/opik_tracing.py,sha256=tEaPGcGCVwc9A99TauekFbIDgIzKDPEjt55JkypZna0,4530
90
+ noesium/core/tracing/opik_tracing.py,sha256=BdGTjsHIsNWmQsb10RUilaoFIL_s391wkSzd9o4CBn4,4530
73
91
  noesium/core/tracing/token_tracker.py,sha256=i5LMZeSLo2uwKM8UVPDdx20-D3_A2yfS6XJqS_6MIYw,5778
74
92
  noesium/core/utils/__init__.py,sha256=Pi8evCA88bp0ew2G-W9tVxuucLTxGdSVJdDlxNrP6kI,144
75
93
  noesium/core/utils/logging.py,sha256=bXD-3jukvcK384XiCFtCRyL968O4U-lXSkupwxzbj4I,5656
76
94
  noesium/core/utils/statistics.py,sha256=Us_MFv4AIJDbX-F2E7C9UeVRp1ha3SE8MFhHz6-utGc,428
77
95
  noesium/core/utils/typing.py,sha256=Z2CiZt432QiZFnLCX41j_XybGYIPziqagXmMJ1NknBs,427
78
- noesium/core/vector_store/__init__.py,sha256=Xr5AnIq_f9bF0tbm6Ltv5pnbGryplmMifIEDlFSpVoI,2473
79
- noesium/core/vector_store/base.py,sha256=PSRjWNv1EDtcrg9E2I_8yW5ddKN58KsSgTXrAh9GlDY,2926
80
- noesium/core/vector_store/pgvector.py,sha256=2tfn-hvH7Gu7MRHWW05ELLo3t_QsLPNnPJ00HhISC8E,10158
81
- noesium/core/vector_store/weaviate.py,sha256=bEGeL-DqmDmiSTRYp3eSPrZb6RT-exRDN55aGETyfZQ,14623
82
- noesium-0.1.0.dist-info/licenses/LICENSE,sha256=y8lHGeHp0BleF7gTcVubhitWtsd5op7rCe0Mna4Oo44,1069
83
- noesium-0.1.0.dist-info/METADATA,sha256=lGp4o5dGFN1hXdfBBu8d6Q1NIC-uKDeJQ2hpcPTmjCQ,16923
84
- noesium-0.1.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
85
- noesium-0.1.0.dist-info/top_level.txt,sha256=IW36N4DMZNJLo2bt_QMlnw-NZepN5fnqmEKbTbb7Tug,8
86
- noesium-0.1.0.dist-info/RECORD,,
96
+ noesium/core/vector_store/__init__.py,sha256=iLd4ouQkZhGq33vflWpyocVdnfrlFeyI_B6dM8jU9n0,2473
97
+ noesium/core/vector_store/base.py,sha256=mX9HnMUqZV0dAh37vwS9d9culNjWuA-JKwjHZcNdiYk,2926
98
+ noesium/core/vector_store/pgvector.py,sha256=GXGh38x3u28iUwW7fxOiROdoRH7uyuBL1LIY4xPB9mA,10148
99
+ noesium/core/vector_store/weaviate.py,sha256=1kCgoACKPJ63ZWYhm_LSAAK5beZmsjeubhTe0MxiWFs,14673
100
+ noesium/toolkits/__init__.py,sha256=dTspWGfE_X6-lCMSPUH_k1bL6NucAv5hdaikiLPf_8c,69
101
+ noesium/toolkits/arxiv_toolkit.py,sha256=b0ogtdkW4_Hk8orbM9NTrPzu4IyK7vq05nvN-K8W9bI,11358
102
+ noesium/toolkits/audio_aliyun_toolkit.py,sha256=wFfxYhXIXrHci8xk26qHkr1ctzk-vh1HbLlv0ywN-7E,17259
103
+ noesium/toolkits/audio_toolkit.py,sha256=CmNnQCAi5QSqgnL7lOsKab5VwWpXa5SuwqADLcUGEew,13391
104
+ noesium/toolkits/bash_toolkit.py,sha256=VQpeL2KPk2nCQg7qpZkqAaI6R5jrmu7DRx4ubBhws3M,10868
105
+ noesium/toolkits/document_toolkit.py,sha256=IlfIVkBDj8Xqet3wKGKg6mb0EQKN1Bs-Xoc_eggtQbI,15588
106
+ noesium/toolkits/file_edit_toolkit.py,sha256=aCE7KargJ28OIBblzTt1eCT7hM-H5L69cVO60XeTaCU,19393
107
+ noesium/toolkits/github_toolkit.py,sha256=Y5nZAJwEiSokKMlLpZibrart6WX_9yQT2-IiElKFo-4,14840
108
+ noesium/toolkits/gmail_toolkit.py,sha256=-yLXBl7IygByljJ99OpHNuZNOwvwPaVWUyymhFmLevA,23408
109
+ noesium/toolkits/image_toolkit.py,sha256=au1U5jNW9u5WhGYkIP9FCI582AM1DtMedWAP6TQjoPI,14506
110
+ noesium/toolkits/memory_toolkit.py,sha256=3GtqL4Lyvgsiw9LIGAJHpqpsq6rOnR-WnRtKXqNSRUU,14861
111
+ noesium/toolkits/python_executor_toolkit.py,sha256=eK9vlBp5cdG2X9jTe8I2CUlIZ9TSkvrCNm59koKHoK4,11402
112
+ noesium/toolkits/search_toolkit.py,sha256=rPCv4G5IgQqWg8hh23t8dLBxI2C498WuNfhBj0U7Ovs,17781
113
+ noesium/toolkits/serper_toolkit.py,sha256=IyXtcZttc8obMtchkzMm8PBV1o7HBAFHamLBTHjEtW4,21168
114
+ noesium/toolkits/tabular_data_toolkit.py,sha256=5kofmB5TsLPOYnPCqCvmGrHfxSRBPcNaww6oM4UZGsQ,20572
115
+ noesium/toolkits/user_interaction_toolkit.py,sha256=_FnSL75eb9f21IlV4KzVXGhda6RRJc3rvYo34Tt51nY,13650
116
+ noesium/toolkits/video_toolkit.py,sha256=zd65drrbB3AGFZGBVieadGZC7sCxemrtYUg1uoQen7E,5858
117
+ noesium/toolkits/wikipedia_toolkit.py,sha256=mQyIuMPGS-vttWWoaV-RmSg5b5MJ4hoLa1H1cUsmst0,15333
118
+ noesium-0.2.1.dist-info/licenses/LICENSE,sha256=uxyIWSLWuSDg9cwA8ehH8LvzOWPM66UGQiOTUQuqTO0,1071
119
+ noesium-0.2.1.dist-info/METADATA,sha256=9ezyGOwmVboUet9Vb5ICEo2v58Y-DI5bzTWIxtf6F5o,9579
120
+ noesium-0.2.1.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
121
+ noesium-0.2.1.dist-info/top_level.txt,sha256=IW36N4DMZNJLo2bt_QMlnw-NZepN5fnqmEKbTbb7Tug,8
122
+ noesium-0.2.1.dist-info/RECORD,,
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 Xiaming Chen
3
+ Copyright (c) 2025, Mirasoth Inc.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,525 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: noesium
3
- Version: 0.1.0
4
- Summary: Towards a cognitive agentic framework
5
- Author-email: Xiaming Chen <chenxm35@gmail.com>
6
- Maintainer-email: Xiaming Chen <chenxm35@gmail.com>
7
- License-Expression: MIT
8
- Project-URL: Homepage, https://github.com/mirasoth/noesium
9
- Project-URL: Repository, https://github.com/mirasoth/noesium
10
- Keywords: agents,multi-agent system,cognition,artificial intelligence
11
- Classifier: Development Status :: 4 - Beta
12
- Classifier: Intended Audience :: Developers
13
- Classifier: Operating System :: OS Independent
14
- Classifier: Programming Language :: Python :: 3
15
- Classifier: Programming Language :: Python :: 3.11
16
- Classifier: Programming Language :: Python :: 3.12
17
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
18
- Requires-Python: >=3.11
19
- Description-Content-Type: text/markdown
20
- License-File: LICENSE
21
- Requires-Dist: pydantic>=2.0.0
22
- Requires-Dist: requests>=2.31.0
23
- Requires-Dist: python-dotenv>=1.1.1
24
- Requires-Dist: colorlog>=6.8.0
25
- Requires-Dist: typing-extensions>=4.8.0
26
- Requires-Dist: deprecated>=1.2.18
27
- Requires-Dist: bubus>=1.5.6
28
- Requires-Dist: openai>=1.0.0
29
- Requires-Dist: instructor>=1.10.0
30
- Requires-Dist: google-genai>=1.5.0
31
- Requires-Dist: litellm>=1.0.0
32
- Requires-Dist: ollama>=0.5.3
33
- Requires-Dist: huggingface-hub>=0.34.4
34
- Requires-Dist: llama-cpp-python>=0.3.16
35
- Requires-Dist: langchain-core>=0.3.72
36
- Requires-Dist: langchain-text-splitters>=0.3.0
37
- Requires-Dist: langchain-ollama>=0.2.0
38
- Requires-Dist: langgraph>=0.5.4
39
- Requires-Dist: networkx>=3.5
40
- Requires-Dist: mcp>=1.0.0
41
- Requires-Dist: protobuf<6,>=5
42
- Requires-Dist: weaviate-client<5,>=4
43
- Requires-Dist: psycopg2>=2.9.10
44
- Requires-Dist: psycopg2-binary>=2.9.0
45
- Provides-Extra: dev
46
- Requires-Dist: pytest<9,>=8.2; extra == "dev"
47
- Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
48
- Requires-Dist: pytest-asyncio>=1.1.0; extra == "dev"
49
- Requires-Dist: pytest-tornasync>=0.6.0.post2; extra == "dev"
50
- Requires-Dist: pytest-trio>=0.8.0; extra == "dev"
51
- Requires-Dist: pytest-twisted>=1.14.3; extra == "dev"
52
- Requires-Dist: twisted>=25.5.0; extra == "dev"
53
- Requires-Dist: black>=23.0.0; extra == "dev"
54
- Requires-Dist: isort>=5.12.0; extra == "dev"
55
- Requires-Dist: flake8>=7.3.0; extra == "dev"
56
- Requires-Dist: autoflake>=2.3.1; extra == "dev"
57
- Requires-Dist: pillow>=11.3.0; extra == "dev"
58
- Dynamic: license-file
59
-
60
- # Cogents-core
61
-
62
- [![CI](https://github.com/mirasoth/noesium/actions/workflows/ci.yml/badge.svg)](https://github.com/mirasoth/noesium/actions/workflows/ci.yml)
63
- [![PyPI version](https://img.shields.io/pypi/v/noesium.svg)](https://pypi.org/project/noesium/)
64
- [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/mirasoth/noesium)
65
-
66
- This is part of [Project Cogents](https://www.xiaming.site/2025/08/30/project-cogents/), an initiative to develop a computation-driven, cognitive agentic system. This repo contains the foundational abstractions (Agent, Memory, Tool, Goal, Orchestration, and more) along with essential modules such as LLM clients, logging, message buses, model routing, and observability. For the underlying philosophy, refer to my talk on MAS ([link](https://github.com/mirasoth/mas-talk-2508/blob/master/mas-talk-xmingc.pdf)).
67
-
68
- ## Installation
69
-
70
- ```bash
71
- pip install -U noesium
72
- ```
73
-
74
- ## Core Modules
75
-
76
- Noesium offers a comprehensive set of modules for creating intelligent agent-based applications:
77
-
78
- ### LLM Integration & Management (`noesium.core.llm`)
79
- - **Multi-model support**: OpenAI, OpenRouter, Ollama, LlamaCPP, and LiteLLM
80
- - **Advanced routing**: Dynamic complexity-based and self-assessment routing strategies
81
- - **Tracing & monitoring**: Built-in token tracking and Opik tracing integration
82
- - **Extensible architecture**: Easy to add new LLM providers
83
-
84
- ### Goal Management & Planning (`noesium.core.goalith`) - *In Development*
85
- - **Goal decomposition**: LLM-based, callable, and simple goal decomposition strategies
86
- - **Graph-based structure**: DAG-based goal management with dependencies
87
- - **Node management**: Goal, subgoal, and task node creation and tracking
88
- - **Conflict detection**: Framework for automated goal conflict identification (planned)
89
- - **Replanning**: Dynamic goal replanning capabilities (planned)
90
-
91
- ### Tool Management (`noesium.core.toolify`)
92
- - **Tool registry**: Centralized tool registration and management
93
- - **MCP integration**: Model Context Protocol support for tool discovery
94
- - **Execution engine**: Robust tool execution with error handling
95
- - **Toolkit system**: Organized tool collections and configurations
96
-
97
- ### Memory Management (`noesium.core.memory`)
98
- - **MemU integration**: Advanced memory agent with categorization
99
- - **Embedding support**: Vector-based memory retrieval and linking
100
- - **Multi-category storage**: Activity, event, and profile memory types
101
- - **Memory linking**: Automatic relationship discovery between memories
102
-
103
- ### Vector Storage (`noesium.core.vector_store`)
104
- - **PGVector support**: PostgreSQL with pgvector extension
105
- - **Weaviate integration**: Cloud-native vector database
106
- - **Semantic search**: Embedding-based document retrieval
107
- - **Flexible indexing**: HNSW and DiskANN indexing strategies
108
-
109
- ### Message Bus (`noesium.core.msgbus`)
110
- - **Event-driven architecture**: Inter-component communication
111
- - **Watchdog patterns**: Monitoring and reactive behaviors
112
- - **Flexible routing**: Message filtering and delivery
113
-
114
- ### Routing & Tracing (`noesium.core.routing`, `noesium.core.tracing`)
115
- - **Smart routing**: Dynamic model selection based on complexity
116
- - **Token tracking**: Comprehensive usage monitoring
117
- - **Opik integration**: Production-ready observability
118
- - **LangGraph hooks**: Workflow tracing and debugging
119
-
120
- ## Project Structure
121
-
122
- ```
123
- noesium/core/
124
- ├── agent/ # Base agent classes and models
125
- ├── goalith/ # Goal management and planning system
126
- │ ├── decomposer/ # Goal decomposition strategies
127
- │ ├── goalgraph/ # Graph data structures
128
- │ ├── conflict/ # Conflict detection
129
- │ └── replanner/ # Dynamic replanning
130
- ├── llm/ # LLM provider implementations
131
- ├── memory/ # Memory management system
132
- │ └── memu/ # MemU memory agent integration
133
- ├── toolify/ # Tool management and execution
134
- ├── vector_store/ # Vector database integrations
135
- ├── msgbus/ # Message bus system
136
- ├── routing/ # LLM routing strategies
137
- ├── tracing/ # Token tracking and observability
138
- └── utils/ # Utilities and logging
139
- ```
140
-
141
- ## Quick Start
142
-
143
- ### 1. LLM Client Usage
144
-
145
- ```python
146
- from noesium.core.llm import get_llm_client
147
-
148
- # OpenAI/OpenRouter providers
149
- client = get_llm_client(provider="openai", api_key="sk-...")
150
- client = get_llm_client(provider="openrouter", api_key="sk-...")
151
-
152
- # Local providers
153
- client = get_llm_client(provider="ollama", base_url="http://localhost:11434")
154
- client = get_llm_client(provider="llamacpp", model_path="/path/to/model.gguf")
155
-
156
- # Basic chat completion
157
- response = client.completion([
158
- {"role": "user", "content": "Hello!"}
159
- ])
160
-
161
- # Structured output (requires structured_output=True)
162
- from pydantic import BaseModel
163
-
164
- class Response(BaseModel):
165
- answer: str
166
- confidence: float
167
-
168
- client = get_llm_client(provider="openai", structured_output=True)
169
- result = client.structured_completion(messages, Response)
170
- ```
171
-
172
- ### 2. Goal Management with Goalith
173
-
174
- **Note**: The Goalith goal management system is currently under development. The core components are available but the full service integration is not yet complete.
175
-
176
- ```python
177
- # Basic goal node creation and management
178
- from noesium.core.goalith.goalgraph.node import GoalNode, NodeStatus
179
- from noesium.core.goalith.goalgraph.graph import GoalGraph
180
- from noesium.core.goalith.decomposer import LLMDecomposer
181
-
182
- # Create a goal node
183
- goal_node = GoalNode(
184
- description="Plan and execute a product launch",
185
- priority=8.0,
186
- context={
187
- "budget": "$50,000",
188
- "timeline": "3 months",
189
- "target_audience": "young professionals"
190
- },
191
- tags=["product", "launch", "marketing"]
192
- )
193
-
194
- # Create goal graph for management
195
- graph = GoalGraph()
196
- graph.add_node(goal_node)
197
-
198
- # Use LLM decomposer directly
199
- decomposer = LLMDecomposer()
200
- subgoals = decomposer.decompose(goal_node, context={
201
- "team_size": "5 people",
202
- "experience_level": "intermediate"
203
- })
204
-
205
- print(f"Goal: {goal_node.description}")
206
- print(f"Status: {goal_node.status}")
207
- print(f"Generated {len(subgoals)} subgoals")
208
- ```
209
-
210
- ### 3. Memory Management
211
-
212
- ```python
213
- from noesium.core.memory.memu import MemoryAgent
214
-
215
- # Initialize memory agent
216
- memory_agent = MemoryAgent(
217
- agent_id="my_agent",
218
- user_id="user123",
219
- memory_dir="/tmp/memory_storage",
220
- enable_embeddings=True
221
- )
222
-
223
- # Add activity memory
224
- activity_content = """
225
- USER: Hi, I'm Sarah and I work as a software engineer.
226
- ASSISTANT: Nice to meet you Sarah! What kind of projects do you work on?
227
- USER: I mainly work on web applications using Python and React.
228
- """
229
-
230
- result = memory_agent.call_function(
231
- "add_activity_memory",
232
- {
233
- "character_name": "Sarah",
234
- "content": activity_content
235
- }
236
- )
237
-
238
- # Generate memory suggestions
239
- if result.get("success"):
240
- memory_items = result.get("memory_items", [])
241
- suggestions = memory_agent.call_function(
242
- "generate_memory_suggestions",
243
- {
244
- "character_name": "Sarah",
245
- "new_memory_items": memory_items
246
- }
247
- )
248
- ```
249
-
250
- ### 4. Vector Store Operations
251
-
252
- ```python
253
- from noesium.core.vector_store import PGVectorStore
254
- from noesium.core.llm import get_llm_client
255
-
256
- # Initialize vector store
257
- vector_store = PGVectorStore(
258
- collection_name="my_documents",
259
- embedding_model_dims=768,
260
- dbname="vectordb",
261
- user="postgres",
262
- password="postgres",
263
- host="localhost",
264
- port=5432
265
- )
266
-
267
- # Initialize embedding client
268
- embed_client = get_llm_client(provider="ollama", embed_model="nomic-embed-text")
269
-
270
- # Prepare documents
271
- documents = [
272
- {
273
- "id": "doc1",
274
- "content": "Machine learning is a subset of AI...",
275
- "metadata": {"category": "AI", "type": "definition"}
276
- }
277
- ]
278
-
279
- # Generate embeddings and store
280
- vectors = []
281
- payloads = []
282
- ids = []
283
-
284
- for doc in documents:
285
- embedding = embed_client.embed(doc["content"])
286
- vectors.append(embedding)
287
- payloads.append(doc["metadata"])
288
- ids.append(doc["id"])
289
-
290
- # Insert into vector store
291
- vector_store.insert(vectors=vectors, payloads=payloads, ids=ids)
292
-
293
- # Search
294
- query = "What is artificial intelligence?"
295
- query_embedding = embed_client.embed(query)
296
- results = vector_store.search(query=query, vectors=query_embedding, limit=5)
297
- ```
298
-
299
- ### 5. Tool Management
300
-
301
- ```python
302
- from noesium.core.toolify import BaseToolkit, ToolkitConfig, ToolkitRegistry, register_toolkit
303
- from typing import Dict, Callable
304
-
305
- # Create a custom toolkit using decorator
306
- @register_toolkit("calculator")
307
- class CalculatorToolkit(BaseToolkit):
308
- def get_tools_map(self) -> Dict[str, Callable]:
309
- return {
310
- "add": self.add,
311
- "multiply": self.multiply
312
- }
313
-
314
- def add(self, a: float, b: float) -> float:
315
- """Add two numbers."""
316
- return a + b
317
-
318
- def multiply(self, a: float, b: float) -> float:
319
- """Multiply two numbers."""
320
- return a * b
321
-
322
- # Alternative: Manual registration
323
- config = ToolkitConfig(name="calculator", description="Basic math operations")
324
- ToolkitRegistry.register("calculator", CalculatorToolkit)
325
-
326
- # Create and use toolkit
327
- calculator = ToolkitRegistry.create_toolkit("calculator", config)
328
- result = calculator.call_tool("add", a=5, b=3)
329
- print(f"5 + 3 = {result}")
330
- ```
331
-
332
- ### 6. Message Bus and Events
333
-
334
- ```python
335
- from noesium.core.msgbus import EventBus, BaseEvent, BaseWatchdog
336
-
337
- # Define custom event
338
- class TaskCompleted(BaseEvent):
339
- def __init__(self, task_id: str, result: str):
340
- super().__init__()
341
- self.task_id = task_id
342
- self.result = result
343
-
344
- # Create event bus
345
- bus = EventBus()
346
-
347
- # Define watchdog
348
- class TaskWatchdog(BaseWatchdog):
349
- def handle_event(self, event: BaseEvent):
350
- if isinstance(event, TaskCompleted):
351
- print(f"Task {event.task_id} completed with result: {event.result}")
352
-
353
- # Register watchdog and publish event
354
- watchdog = TaskWatchdog()
355
- bus.register_watchdog(watchdog)
356
- bus.publish(TaskCompleted("task_1", "success"))
357
- ```
358
-
359
- ### 7. Token Tracking and Tracing
360
-
361
- ```python
362
- from noesium.core.tracing import get_token_tracker
363
- from noesium.core.llm import get_llm_client
364
-
365
- # Initialize client and tracker
366
- client = get_llm_client(provider="openai")
367
- tracker = get_token_tracker()
368
-
369
- # Reset tracker
370
- tracker.reset()
371
-
372
- # Make LLM calls (automatically tracked)
373
- response1 = client.completion([{"role": "user", "content": "Hello"}])
374
- response2 = client.completion([{"role": "user", "content": "How are you?"}])
375
-
376
- # Get usage statistics
377
- stats = tracker.get_stats()
378
- print(f"Total tokens: {stats['total_tokens']}")
379
- print(f"Total calls: {stats['total_calls']}")
380
- print(f"Average tokens per call: {stats.get('avg_tokens_per_call', 0)}")
381
- ```
382
-
383
- ## Environment Variables
384
-
385
- Set these environment variables for different providers:
386
-
387
- ```bash
388
- # Default LLM provider
389
- export COGENTS_LLM_PROVIDER="openai"
390
-
391
- # OpenAI
392
- export OPENAI_API_KEY="sk-..."
393
-
394
- # OpenRouter
395
- export OPENROUTER_API_KEY="sk-..."
396
-
397
- # LlamaCPP
398
- export LLAMACPP_MODEL_PATH="/path/to/model.gguf"
399
-
400
- # Ollama
401
- export OLLAMA_BASE_URL="http://localhost:11434"
402
-
403
- # PostgreSQL (for vector store)
404
- export POSTGRES_HOST="localhost"
405
- export POSTGRES_PORT="5432"
406
- export POSTGRES_DB="vectordb"
407
- export POSTGRES_USER="postgres"
408
- export POSTGRES_PASSWORD="postgres"
409
- ```
410
-
411
- ## Advanced Usage
412
-
413
- ### Custom Goal Decomposer
414
-
415
- ```python
416
- from noesium.core.goalith.decomposer.base import GoalDecomposer
417
- from noesium.core.goalith.goalgraph.node import GoalNode
418
- from typing import List, Dict, Any, Optional
419
- import copy
420
-
421
- class CustomDecomposer(GoalDecomposer):
422
- @property
423
- def name(self) -> str:
424
- return "custom_decomposer"
425
-
426
- def decompose(self, goal_node: GoalNode, context: Optional[Dict[str, Any]] = None) -> List[GoalNode]:
427
- # Custom decomposition logic
428
- subtasks = [
429
- "Research requirements",
430
- "Design solution",
431
- "Implement features",
432
- "Test and deploy"
433
- ]
434
-
435
- nodes = []
436
- for i, subtask in enumerate(subtasks):
437
- # Deep copy context to avoid shared references
438
- context_copy = copy.deepcopy(goal_node.context) if goal_node.context else {}
439
-
440
- node = GoalNode(
441
- description=subtask,
442
- parent=goal_node.id,
443
- priority=goal_node.priority - i * 0.1,
444
- context=context_copy,
445
- tags=goal_node.tags.copy() if goal_node.tags else [],
446
- decomposer_name=self.name
447
- )
448
- nodes.append(node)
449
-
450
- return nodes
451
-
452
- # Use the decomposer directly
453
- custom_decomposer = CustomDecomposer()
454
- goal_node = GoalNode(description="Build a web application")
455
- subgoals = custom_decomposer.decompose(goal_node)
456
- ```
457
-
458
- ### LLM Routing Strategies
459
-
460
- ```python
461
- from noesium.core.routing import ModelRouter, DynamicComplexityStrategy
462
- from noesium.core.llm import get_llm_client
463
-
464
- # Create a lite client for complexity assessment
465
- lite_client = get_llm_client(provider="ollama", chat_model="llama3.2:1b")
466
-
467
- # Create router with dynamic complexity strategy
468
- router = ModelRouter(
469
- strategy="dynamic_complexity",
470
- lite_client=lite_client,
471
- strategy_config={
472
- "complexity_threshold_low": 0.3,
473
- "complexity_threshold_high": 0.7
474
- }
475
- )
476
-
477
- # Route queries to get tier recommendations
478
- simple_query = "What is 2+2?"
479
- result = router.route(simple_query)
480
- print(f"Query: {simple_query}")
481
- print(f"Recommended tier: {result.tier}") # Likely ModelTier.LITE
482
- print(f"Confidence: {result.confidence}")
483
-
484
- complex_query = "Explain quantum computing and its applications"
485
- result = router.route(complex_query)
486
- print(f"Query: {complex_query}")
487
- print(f"Recommended tier: {result.tier}") # Likely ModelTier.POWER
488
- print(f"Confidence: {result.confidence}")
489
-
490
- # Get recommended model configuration
491
- routing_result, model_config = router.route_and_configure(complex_query)
492
- print(f"Recommended config: {model_config}")
493
- ```
494
-
495
- ## Examples
496
-
497
- Check the `examples/` directory for comprehensive usage examples:
498
-
499
- - **LLM Examples**: `examples/llm/` - OpenAI, Ollama, LlamaCPP, token tracking
500
- - **Goal Management**: `examples/goals/` - Goal decomposition and planning
501
- - **Memory Examples**: `examples/memory/` - Memory agent operations
502
- - **Vector Store**: `examples/vector_store/` - PGVector and Weaviate usage
503
- - **Message Bus**: `examples/msgbus/` - Event-driven patterns
504
- - **Tools**: Various toolkit implementations
505
-
506
- ## Development
507
-
508
- ```bash
509
- # Install development dependencies
510
- make install
511
-
512
- # Run tests
513
- make test
514
-
515
- # Run specific test categories
516
- make test-unit # Unit tests only
517
- make test-integration # Integration tests only
518
-
519
- # Format code
520
- make format
521
- ```
522
-
523
- ## License
524
-
525
- MIT License - see [LICENSE](LICENSE) file for details.