noesium 0.1.0__tar.gz → 0.2.1__tar.gz
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.
- {noesium-0.1.0 → noesium-0.2.1}/LICENSE +1 -1
- noesium-0.2.1/PKG-INFO +253 -0
- noesium-0.2.1/README.md +166 -0
- noesium-0.2.1/noesium/agents/askura_agent/__init__.py +22 -0
- noesium-0.2.1/noesium/agents/askura_agent/askura_agent.py +480 -0
- noesium-0.2.1/noesium/agents/askura_agent/conversation.py +164 -0
- noesium-0.2.1/noesium/agents/askura_agent/extractor.py +175 -0
- noesium-0.2.1/noesium/agents/askura_agent/memory.py +14 -0
- noesium-0.2.1/noesium/agents/askura_agent/models.py +239 -0
- noesium-0.2.1/noesium/agents/askura_agent/prompts.py +202 -0
- noesium-0.2.1/noesium/agents/askura_agent/reflection.py +234 -0
- noesium-0.2.1/noesium/agents/askura_agent/summarizer.py +30 -0
- noesium-0.2.1/noesium/agents/askura_agent/utils.py +6 -0
- noesium-0.2.1/noesium/agents/deep_research/__init__.py +13 -0
- noesium-0.2.1/noesium/agents/deep_research/agent.py +398 -0
- noesium-0.2.1/noesium/agents/deep_research/prompts.py +84 -0
- noesium-0.2.1/noesium/agents/deep_research/schemas.py +42 -0
- noesium-0.2.1/noesium/agents/deep_research/state.py +54 -0
- noesium-0.2.1/noesium/agents/search/__init__.py +5 -0
- noesium-0.2.1/noesium/agents/search/agent.py +474 -0
- noesium-0.2.1/noesium/agents/search/state.py +28 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/__init__.py +1 -1
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/agent/base.py +10 -2
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/goalith/decomposer/llm_decomposer.py +1 -1
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/llm/__init__.py +1 -1
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/llm/base.py +2 -2
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/llm/litellm.py +42 -21
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/llm/llamacpp.py +25 -4
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/llm/ollama.py +43 -22
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/llm/openai.py +25 -5
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/llm/openrouter.py +1 -1
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/toolify/base.py +9 -2
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/toolify/config.py +2 -2
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/toolify/registry.py +21 -5
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/tracing/opik_tracing.py +7 -7
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/vector_store/__init__.py +2 -2
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/vector_store/base.py +1 -1
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/vector_store/pgvector.py +10 -13
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/vector_store/weaviate.py +2 -1
- noesium-0.2.1/noesium/toolkits/__init__.py +1 -0
- noesium-0.2.1/noesium/toolkits/arxiv_toolkit.py +310 -0
- noesium-0.2.1/noesium/toolkits/audio_aliyun_toolkit.py +441 -0
- noesium-0.2.1/noesium/toolkits/audio_toolkit.py +370 -0
- noesium-0.2.1/noesium/toolkits/bash_toolkit.py +332 -0
- noesium-0.2.1/noesium/toolkits/document_toolkit.py +454 -0
- noesium-0.2.1/noesium/toolkits/file_edit_toolkit.py +552 -0
- noesium-0.2.1/noesium/toolkits/github_toolkit.py +395 -0
- noesium-0.2.1/noesium/toolkits/gmail_toolkit.py +575 -0
- noesium-0.2.1/noesium/toolkits/image_toolkit.py +425 -0
- noesium-0.2.1/noesium/toolkits/memory_toolkit.py +398 -0
- noesium-0.2.1/noesium/toolkits/python_executor_toolkit.py +334 -0
- noesium-0.2.1/noesium/toolkits/search_toolkit.py +451 -0
- noesium-0.2.1/noesium/toolkits/serper_toolkit.py +623 -0
- noesium-0.2.1/noesium/toolkits/tabular_data_toolkit.py +537 -0
- noesium-0.2.1/noesium/toolkits/user_interaction_toolkit.py +365 -0
- noesium-0.2.1/noesium/toolkits/video_toolkit.py +168 -0
- noesium-0.2.1/noesium/toolkits/wikipedia_toolkit.py +420 -0
- noesium-0.2.1/noesium.egg-info/PKG-INFO +253 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium.egg-info/SOURCES.txt +37 -1
- noesium-0.2.1/noesium.egg-info/requires.txt +79 -0
- {noesium-0.1.0 → noesium-0.2.1}/pyproject.toml +49 -29
- noesium-0.1.0/PKG-INFO +0 -525
- noesium-0.1.0/README.md +0 -466
- noesium-0.1.0/noesium.egg-info/PKG-INFO +0 -525
- noesium-0.1.0/noesium.egg-info/requires.txt +0 -38
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/agent/__init__.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/consts.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/goalith/conflict/conflict.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/goalith/conflict/detector.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/goalith/decomposer/__init__.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/goalith/decomposer/base.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/goalith/decomposer/callable_decomposer.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/goalith/decomposer/prompts.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/goalith/decomposer/simple_decomposer.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/goalith/errors.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/goalith/goalgraph/graph.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/goalith/goalgraph/node.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/goalith/replanner/base.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/goalith/replanner/replanner.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/goalith/service.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/llm/message.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/llm/prompt.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/memory/__init__.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/memory/base.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/memory/memu/__init__.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/memory/memu/config/__init__.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/memory/memu/config/activity/config.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/memory/memu/config/event/config.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/memory/memu/config/markdown_config.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/memory/memu/config/profile/config.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/memory/memu/llm_adapter.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/memory/memu/memory/__init__.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/memory/memu/memory/actions/__init__.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/memory/memu/memory/actions/add_activity_memory.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/memory/memu/memory/actions/base_action.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/memory/memu/memory/actions/cluster_memories.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/memory/memu/memory/actions/generate_suggestions.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/memory/memu/memory/actions/get_available_categories.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/memory/memu/memory/actions/link_related_memories.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/memory/memu/memory/actions/run_theory_of_mind.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/memory/memu/memory/actions/update_memory_with_suggestions.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/memory/memu/memory/embeddings.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/memory/memu/memory/file_manager.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/memory/memu/memory/memory_agent.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/memory/memu/memory/recall_agent.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/memory/memu/memory_store.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/memory/models.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/msgbus/__init__.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/msgbus/base.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/orchestrix/__init__.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/py.typed +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/routing/__init__.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/routing/base.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/routing/router.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/routing/strategies/__init__.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/routing/strategies/dynamic_complexity.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/routing/strategies/self_assessment.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/routing/types.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/toolify/__init__.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/toolify/mcp_integration.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/toolify/toolkits/__init__.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/tracing/__init__.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/tracing/langgraph_hooks.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/tracing/token_tracker.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/utils/__init__.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/utils/logging.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/utils/statistics.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium/core/utils/typing.py +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium.egg-info/dependency_links.txt +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/noesium.egg-info/top_level.txt +0 -0
- {noesium-0.1.0 → noesium-0.2.1}/setup.cfg +0 -0
noesium-0.2.1/PKG-INFO
ADDED
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: noesium
|
|
3
|
+
Version: 0.2.1
|
|
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: aiohttp>=3.12.15
|
|
24
|
+
Requires-Dist: python-dotenv>=1.1.1
|
|
25
|
+
Requires-Dist: colorlog>=6.8.0
|
|
26
|
+
Requires-Dist: typing-extensions>=4.8.0
|
|
27
|
+
Provides-Extra: google
|
|
28
|
+
Requires-Dist: google-genai>=1.5.0; extra == "google"
|
|
29
|
+
Requires-Dist: google-api-python-client>=2.174.0; extra == "google"
|
|
30
|
+
Requires-Dist: google-auth-oauthlib>=1.2.2; extra == "google"
|
|
31
|
+
Requires-Dist: google-auth>=2.40.3; extra == "google"
|
|
32
|
+
Provides-Extra: aliyun
|
|
33
|
+
Requires-Dist: aliyun-python-sdk-core<3.0.0,>=2.13.1; extra == "aliyun"
|
|
34
|
+
Provides-Extra: llm
|
|
35
|
+
Requires-Dist: litellm>=1.0.0; extra == "llm"
|
|
36
|
+
Requires-Dist: openai>=1.0.0; extra == "llm"
|
|
37
|
+
Requires-Dist: instructor>=1.10.0; extra == "llm"
|
|
38
|
+
Provides-Extra: local-llm
|
|
39
|
+
Requires-Dist: ollama>=0.5.3; extra == "local-llm"
|
|
40
|
+
Requires-Dist: llama-cpp-python>=0.3.16; extra == "local-llm"
|
|
41
|
+
Requires-Dist: huggingface-hub>=0.34.4; extra == "local-llm"
|
|
42
|
+
Provides-Extra: ai-providers-all
|
|
43
|
+
Requires-Dist: noesium[aliyun,google,llm,local-llm]; extra == "ai-providers-all"
|
|
44
|
+
Provides-Extra: langchain
|
|
45
|
+
Requires-Dist: langchain-core>=0.3.72; extra == "langchain"
|
|
46
|
+
Requires-Dist: langchain-text-splitters>=0.3.0; extra == "langchain"
|
|
47
|
+
Requires-Dist: langchain-ollama>=0.2.0; extra == "langchain"
|
|
48
|
+
Requires-Dist: langgraph>=0.5.4; extra == "langchain"
|
|
49
|
+
Provides-Extra: agents
|
|
50
|
+
Requires-Dist: noesium[langchain]; extra == "agents"
|
|
51
|
+
Requires-Dist: bubus>=1.5.6; extra == "agents"
|
|
52
|
+
Provides-Extra: postgres
|
|
53
|
+
Requires-Dist: psycopg2-binary>=2.9.0; extra == "postgres"
|
|
54
|
+
Requires-Dist: psycopg2>=2.9.10; extra == "postgres"
|
|
55
|
+
Provides-Extra: weaviate
|
|
56
|
+
Requires-Dist: weaviate-client<5,>=4; extra == "weaviate"
|
|
57
|
+
Requires-Dist: protobuf<6,>=5; extra == "weaviate"
|
|
58
|
+
Provides-Extra: datascience
|
|
59
|
+
Requires-Dist: networkx>=3.5; extra == "datascience"
|
|
60
|
+
Requires-Dist: matplotlib>=3.8.0; extra == "datascience"
|
|
61
|
+
Requires-Dist: pexpect>=4.9.0; extra == "datascience"
|
|
62
|
+
Requires-Dist: ipython>=8.18.0; extra == "datascience"
|
|
63
|
+
Requires-Dist: pandas>=2.0.0; extra == "datascience"
|
|
64
|
+
Provides-Extra: mcp
|
|
65
|
+
Requires-Dist: mcp>=1.0.0; extra == "mcp"
|
|
66
|
+
Provides-Extra: tools
|
|
67
|
+
Requires-Dist: noesium[aliyun,datascience,google,mcp]; extra == "tools"
|
|
68
|
+
Requires-Dist: wizsearch<2.0.0,>=1.0.1; extra == "tools"
|
|
69
|
+
Requires-Dist: arxiv>=2.2.0; extra == "tools"
|
|
70
|
+
Requires-Dist: pillow<12.0,>=10.1.0; extra == "tools"
|
|
71
|
+
Requires-Dist: pymupdf>=1.23.0; extra == "tools"
|
|
72
|
+
Requires-Dist: openpyxl>=3.1.5; extra == "tools"
|
|
73
|
+
Requires-Dist: wikipedia-api>=0.6.0; extra == "tools"
|
|
74
|
+
Requires-Dist: aiofiles>=24.1.0; extra == "tools"
|
|
75
|
+
Provides-Extra: all
|
|
76
|
+
Requires-Dist: noesium[agents,ai-providers-all,postgres,tools,weaviate]; extra == "all"
|
|
77
|
+
Provides-Extra: dev
|
|
78
|
+
Requires-Dist: pytest<9,>=8.2; extra == "dev"
|
|
79
|
+
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
|
|
80
|
+
Requires-Dist: pytest-asyncio>=1.1.0; extra == "dev"
|
|
81
|
+
Requires-Dist: black>=23.0.0; extra == "dev"
|
|
82
|
+
Requires-Dist: isort>=5.12.0; extra == "dev"
|
|
83
|
+
Requires-Dist: mypy>=1.10.0; extra == "dev"
|
|
84
|
+
Requires-Dist: autoflake>=2.3.1; extra == "dev"
|
|
85
|
+
Requires-Dist: flake8>=7.3.0; extra == "dev"
|
|
86
|
+
Dynamic: license-file
|
|
87
|
+
|
|
88
|
+
# Noesium
|
|
89
|
+
|
|
90
|
+
[](https://github.com/mirasoth/noesium/actions/workflows/ci.yml)
|
|
91
|
+
[](https://pypi.org/project/noesium/)
|
|
92
|
+
[](https://deepwiki.com/mirasoth/noesium)
|
|
93
|
+
|
|
94
|
+
Project Noesium is 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/caesar0301/mas-talk-2508/blob/master/mas-talk-xmingc.pdf)).
|
|
95
|
+
|
|
96
|
+
## Installation
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
pip install -U noesium
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Core Modules
|
|
103
|
+
|
|
104
|
+
| Module | Description |
|
|
105
|
+
|--------|-------------|
|
|
106
|
+
| **LLM Integration** (`noesium.core.llm`) | Multi-provider support (OpenAI, OpenRouter, Ollama, LlamaCPP, LiteLLM), dynamic routing, token tracking |
|
|
107
|
+
| **Goal Management** (`noesium.core.goalith`) | LLM-based goal decomposition, DAG-based goal graph, dependency tracking |
|
|
108
|
+
| **Tool Management** (`noesium.core.toolify`) | Tool registry, MCP integration, 17+ built-in toolkits |
|
|
109
|
+
| **Memory** (`noesium.core.memory`) | MemU integration, embedding-based retrieval, multi-category storage |
|
|
110
|
+
| **Vector Store** (`noesium.core.vector_store`) | PGVector and Weaviate support, semantic search |
|
|
111
|
+
| **Message Bus** (`noesium.core.msgbus`) | Event-driven architecture, watchdog patterns |
|
|
112
|
+
| **Routing** (`noesium.core.routing`) | Dynamic complexity-based model selection |
|
|
113
|
+
| **Tracing** (`noesium.core.tracing`) | Token usage monitoring, Opik integration |
|
|
114
|
+
|
|
115
|
+
## Built-in Agents
|
|
116
|
+
|
|
117
|
+
- **AskuraAgent** - Conversational agent for collecting semi-structured information via human-in-the-loop workflows
|
|
118
|
+
- **SearchAgent** - Web search with query polishing, multi-engine support, and optional content crawling
|
|
119
|
+
- **DeepResearchAgent** - Iterative research with LLM-powered reflection and citation generation
|
|
120
|
+
- **MemoryAgent** - Memory management with categorization, embedding search, and memory linking
|
|
121
|
+
|
|
122
|
+
## Quick Start
|
|
123
|
+
|
|
124
|
+
### LLM Client
|
|
125
|
+
|
|
126
|
+
```python
|
|
127
|
+
from noesium.core.llm import get_llm_client
|
|
128
|
+
|
|
129
|
+
# Create client (supports openai, openrouter, ollama, llamacpp)
|
|
130
|
+
client = get_llm_client(provider="openai", api_key="sk-...")
|
|
131
|
+
|
|
132
|
+
# Chat completion
|
|
133
|
+
response = client.completion([{"role": "user", "content": "Hello!"}])
|
|
134
|
+
|
|
135
|
+
# Structured output
|
|
136
|
+
from pydantic import BaseModel
|
|
137
|
+
|
|
138
|
+
class Answer(BaseModel):
|
|
139
|
+
text: str
|
|
140
|
+
confidence: float
|
|
141
|
+
|
|
142
|
+
client = get_llm_client(provider="openai", structured_output=True)
|
|
143
|
+
result = client.structured_completion(messages, Answer)
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Tool Management
|
|
147
|
+
|
|
148
|
+
```python
|
|
149
|
+
from noesium.core.toolify import BaseToolkit, ToolkitConfig, ToolkitRegistry, register_toolkit
|
|
150
|
+
|
|
151
|
+
@register_toolkit("calculator")
|
|
152
|
+
class CalculatorToolkit(BaseToolkit):
|
|
153
|
+
def get_tools_map(self):
|
|
154
|
+
return {"add": self.add, "multiply": self.multiply}
|
|
155
|
+
|
|
156
|
+
def add(self, a: float, b: float) -> float:
|
|
157
|
+
return a + b
|
|
158
|
+
|
|
159
|
+
def multiply(self, a: float, b: float) -> float:
|
|
160
|
+
return a * b
|
|
161
|
+
|
|
162
|
+
# Use toolkit
|
|
163
|
+
config = ToolkitConfig(name="calculator")
|
|
164
|
+
calc = ToolkitRegistry.create_toolkit("calculator", config)
|
|
165
|
+
result = calc.call_tool("add", a=5, b=3)
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### Goal Decomposition
|
|
169
|
+
|
|
170
|
+
```python
|
|
171
|
+
from noesium.core.goalith.goalgraph.node import GoalNode
|
|
172
|
+
from noesium.core.goalith.goalgraph.graph import GoalGraph
|
|
173
|
+
from noesium.core.goalith.decomposer import LLMDecomposer
|
|
174
|
+
|
|
175
|
+
# Create and decompose a goal
|
|
176
|
+
goal = GoalNode(description="Plan a product launch", priority=8.0)
|
|
177
|
+
graph = GoalGraph()
|
|
178
|
+
graph.add_node(goal)
|
|
179
|
+
|
|
180
|
+
decomposer = LLMDecomposer()
|
|
181
|
+
subgoals = decomposer.decompose(goal, context={"budget": "$50,000"})
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### Search Agent
|
|
185
|
+
|
|
186
|
+
```python
|
|
187
|
+
from noesium.agents.search import SearchAgent, SearchConfig
|
|
188
|
+
|
|
189
|
+
config = SearchConfig(
|
|
190
|
+
polish_query=True,
|
|
191
|
+
search_engines=["tavily"],
|
|
192
|
+
max_results_per_engine=5
|
|
193
|
+
)
|
|
194
|
+
agent = SearchAgent(config=config)
|
|
195
|
+
results = await agent.search("latest developments in quantum computing")
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### Deep Research Agent
|
|
199
|
+
|
|
200
|
+
```python
|
|
201
|
+
from noesium.agents.deep_research import DeepResearchAgent, DeepResearchConfig
|
|
202
|
+
|
|
203
|
+
config = DeepResearchConfig(
|
|
204
|
+
number_of_initial_queries=3,
|
|
205
|
+
max_research_loops=3,
|
|
206
|
+
web_search_citation_enabled=True
|
|
207
|
+
)
|
|
208
|
+
agent = DeepResearchAgent(config=config)
|
|
209
|
+
result = await agent.research("What are the implications of AI on healthcare?")
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
## Environment Variables
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
# LLM Providers
|
|
216
|
+
export NOESIUM_LLM_PROVIDER="openai"
|
|
217
|
+
export OPENAI_API_KEY="sk-..."
|
|
218
|
+
export OPENROUTER_API_KEY="sk-..."
|
|
219
|
+
export OLLAMA_BASE_URL="http://localhost:11434"
|
|
220
|
+
export LLAMACPP_MODEL_PATH="/path/to/model.gguf"
|
|
221
|
+
|
|
222
|
+
# Vector Store (PostgreSQL)
|
|
223
|
+
export POSTGRES_HOST="localhost"
|
|
224
|
+
export POSTGRES_PORT="5432"
|
|
225
|
+
export POSTGRES_DB="vectordb"
|
|
226
|
+
export POSTGRES_USER="postgres"
|
|
227
|
+
export POSTGRES_PASSWORD="postgres"
|
|
228
|
+
|
|
229
|
+
# Search Tools
|
|
230
|
+
export SERPER_API_KEY="..."
|
|
231
|
+
export JINA_API_KEY="..."
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
## Examples
|
|
235
|
+
|
|
236
|
+
See the `examples/` directory for comprehensive usage examples:
|
|
237
|
+
|
|
238
|
+
- `examples/agents/` - Agent demos (Askura, Search, DeepResearch)
|
|
239
|
+
- `examples/llm/` - LLM provider examples and token tracking
|
|
240
|
+
- `examples/goals/` - Goal decomposition patterns
|
|
241
|
+
- `examples/memory/` - Memory agent operations
|
|
242
|
+
- `examples/tools/` - Toolkit demonstrations
|
|
243
|
+
- `examples/vector_store/` - PGVector and Weaviate usage
|
|
244
|
+
|
|
245
|
+
## Documentation
|
|
246
|
+
|
|
247
|
+
- **Design Specifications**: `specs/` directory contains RFCs for system architecture
|
|
248
|
+
- **Agent Details**: See `AGENTS.md` for comprehensive agent and toolkit documentation
|
|
249
|
+
- **Toolify System**: `noesium/core/toolify/README.md`
|
|
250
|
+
|
|
251
|
+
## License
|
|
252
|
+
|
|
253
|
+
MIT License - see [LICENSE](LICENSE) file for details.
|
noesium-0.2.1/README.md
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
# Noesium
|
|
2
|
+
|
|
3
|
+
[](https://github.com/mirasoth/noesium/actions/workflows/ci.yml)
|
|
4
|
+
[](https://pypi.org/project/noesium/)
|
|
5
|
+
[](https://deepwiki.com/mirasoth/noesium)
|
|
6
|
+
|
|
7
|
+
Project Noesium is 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/caesar0301/mas-talk-2508/blob/master/mas-talk-xmingc.pdf)).
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
pip install -U noesium
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Core Modules
|
|
16
|
+
|
|
17
|
+
| Module | Description |
|
|
18
|
+
|--------|-------------|
|
|
19
|
+
| **LLM Integration** (`noesium.core.llm`) | Multi-provider support (OpenAI, OpenRouter, Ollama, LlamaCPP, LiteLLM), dynamic routing, token tracking |
|
|
20
|
+
| **Goal Management** (`noesium.core.goalith`) | LLM-based goal decomposition, DAG-based goal graph, dependency tracking |
|
|
21
|
+
| **Tool Management** (`noesium.core.toolify`) | Tool registry, MCP integration, 17+ built-in toolkits |
|
|
22
|
+
| **Memory** (`noesium.core.memory`) | MemU integration, embedding-based retrieval, multi-category storage |
|
|
23
|
+
| **Vector Store** (`noesium.core.vector_store`) | PGVector and Weaviate support, semantic search |
|
|
24
|
+
| **Message Bus** (`noesium.core.msgbus`) | Event-driven architecture, watchdog patterns |
|
|
25
|
+
| **Routing** (`noesium.core.routing`) | Dynamic complexity-based model selection |
|
|
26
|
+
| **Tracing** (`noesium.core.tracing`) | Token usage monitoring, Opik integration |
|
|
27
|
+
|
|
28
|
+
## Built-in Agents
|
|
29
|
+
|
|
30
|
+
- **AskuraAgent** - Conversational agent for collecting semi-structured information via human-in-the-loop workflows
|
|
31
|
+
- **SearchAgent** - Web search with query polishing, multi-engine support, and optional content crawling
|
|
32
|
+
- **DeepResearchAgent** - Iterative research with LLM-powered reflection and citation generation
|
|
33
|
+
- **MemoryAgent** - Memory management with categorization, embedding search, and memory linking
|
|
34
|
+
|
|
35
|
+
## Quick Start
|
|
36
|
+
|
|
37
|
+
### LLM Client
|
|
38
|
+
|
|
39
|
+
```python
|
|
40
|
+
from noesium.core.llm import get_llm_client
|
|
41
|
+
|
|
42
|
+
# Create client (supports openai, openrouter, ollama, llamacpp)
|
|
43
|
+
client = get_llm_client(provider="openai", api_key="sk-...")
|
|
44
|
+
|
|
45
|
+
# Chat completion
|
|
46
|
+
response = client.completion([{"role": "user", "content": "Hello!"}])
|
|
47
|
+
|
|
48
|
+
# Structured output
|
|
49
|
+
from pydantic import BaseModel
|
|
50
|
+
|
|
51
|
+
class Answer(BaseModel):
|
|
52
|
+
text: str
|
|
53
|
+
confidence: float
|
|
54
|
+
|
|
55
|
+
client = get_llm_client(provider="openai", structured_output=True)
|
|
56
|
+
result = client.structured_completion(messages, Answer)
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Tool Management
|
|
60
|
+
|
|
61
|
+
```python
|
|
62
|
+
from noesium.core.toolify import BaseToolkit, ToolkitConfig, ToolkitRegistry, register_toolkit
|
|
63
|
+
|
|
64
|
+
@register_toolkit("calculator")
|
|
65
|
+
class CalculatorToolkit(BaseToolkit):
|
|
66
|
+
def get_tools_map(self):
|
|
67
|
+
return {"add": self.add, "multiply": self.multiply}
|
|
68
|
+
|
|
69
|
+
def add(self, a: float, b: float) -> float:
|
|
70
|
+
return a + b
|
|
71
|
+
|
|
72
|
+
def multiply(self, a: float, b: float) -> float:
|
|
73
|
+
return a * b
|
|
74
|
+
|
|
75
|
+
# Use toolkit
|
|
76
|
+
config = ToolkitConfig(name="calculator")
|
|
77
|
+
calc = ToolkitRegistry.create_toolkit("calculator", config)
|
|
78
|
+
result = calc.call_tool("add", a=5, b=3)
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Goal Decomposition
|
|
82
|
+
|
|
83
|
+
```python
|
|
84
|
+
from noesium.core.goalith.goalgraph.node import GoalNode
|
|
85
|
+
from noesium.core.goalith.goalgraph.graph import GoalGraph
|
|
86
|
+
from noesium.core.goalith.decomposer import LLMDecomposer
|
|
87
|
+
|
|
88
|
+
# Create and decompose a goal
|
|
89
|
+
goal = GoalNode(description="Plan a product launch", priority=8.0)
|
|
90
|
+
graph = GoalGraph()
|
|
91
|
+
graph.add_node(goal)
|
|
92
|
+
|
|
93
|
+
decomposer = LLMDecomposer()
|
|
94
|
+
subgoals = decomposer.decompose(goal, context={"budget": "$50,000"})
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Search Agent
|
|
98
|
+
|
|
99
|
+
```python
|
|
100
|
+
from noesium.agents.search import SearchAgent, SearchConfig
|
|
101
|
+
|
|
102
|
+
config = SearchConfig(
|
|
103
|
+
polish_query=True,
|
|
104
|
+
search_engines=["tavily"],
|
|
105
|
+
max_results_per_engine=5
|
|
106
|
+
)
|
|
107
|
+
agent = SearchAgent(config=config)
|
|
108
|
+
results = await agent.search("latest developments in quantum computing")
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Deep Research Agent
|
|
112
|
+
|
|
113
|
+
```python
|
|
114
|
+
from noesium.agents.deep_research import DeepResearchAgent, DeepResearchConfig
|
|
115
|
+
|
|
116
|
+
config = DeepResearchConfig(
|
|
117
|
+
number_of_initial_queries=3,
|
|
118
|
+
max_research_loops=3,
|
|
119
|
+
web_search_citation_enabled=True
|
|
120
|
+
)
|
|
121
|
+
agent = DeepResearchAgent(config=config)
|
|
122
|
+
result = await agent.research("What are the implications of AI on healthcare?")
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Environment Variables
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
# LLM Providers
|
|
129
|
+
export NOESIUM_LLM_PROVIDER="openai"
|
|
130
|
+
export OPENAI_API_KEY="sk-..."
|
|
131
|
+
export OPENROUTER_API_KEY="sk-..."
|
|
132
|
+
export OLLAMA_BASE_URL="http://localhost:11434"
|
|
133
|
+
export LLAMACPP_MODEL_PATH="/path/to/model.gguf"
|
|
134
|
+
|
|
135
|
+
# Vector Store (PostgreSQL)
|
|
136
|
+
export POSTGRES_HOST="localhost"
|
|
137
|
+
export POSTGRES_PORT="5432"
|
|
138
|
+
export POSTGRES_DB="vectordb"
|
|
139
|
+
export POSTGRES_USER="postgres"
|
|
140
|
+
export POSTGRES_PASSWORD="postgres"
|
|
141
|
+
|
|
142
|
+
# Search Tools
|
|
143
|
+
export SERPER_API_KEY="..."
|
|
144
|
+
export JINA_API_KEY="..."
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## Examples
|
|
148
|
+
|
|
149
|
+
See the `examples/` directory for comprehensive usage examples:
|
|
150
|
+
|
|
151
|
+
- `examples/agents/` - Agent demos (Askura, Search, DeepResearch)
|
|
152
|
+
- `examples/llm/` - LLM provider examples and token tracking
|
|
153
|
+
- `examples/goals/` - Goal decomposition patterns
|
|
154
|
+
- `examples/memory/` - Memory agent operations
|
|
155
|
+
- `examples/tools/` - Toolkit demonstrations
|
|
156
|
+
- `examples/vector_store/` - PGVector and Weaviate usage
|
|
157
|
+
|
|
158
|
+
## Documentation
|
|
159
|
+
|
|
160
|
+
- **Design Specifications**: `specs/` directory contains RFCs for system architecture
|
|
161
|
+
- **Agent Details**: See `AGENTS.md` for comprehensive agent and toolkit documentation
|
|
162
|
+
- **Toolify System**: `noesium/core/toolify/README.md`
|
|
163
|
+
|
|
164
|
+
## License
|
|
165
|
+
|
|
166
|
+
MIT License - see [LICENSE](LICENSE) file for details.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"""
|
|
2
|
+
AskuraAgent - A general-purpose dynamic conversation agent.
|
|
3
|
+
|
|
4
|
+
AskuraAgent provides a flexible, configurable framework for human-in-the-loop
|
|
5
|
+
conversations that adapt to different user communication styles and dynamically
|
|
6
|
+
collect required information through natural conversation flow.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from .askura_agent import AskuraAgent
|
|
10
|
+
from .conversation import ConversationManager
|
|
11
|
+
from .extractor import InformationExtractor
|
|
12
|
+
from .models import AskuraConfig, AskuraResponse, AskuraState, InformationSlot
|
|
13
|
+
|
|
14
|
+
__all__ = [
|
|
15
|
+
"AskuraAgent",
|
|
16
|
+
"AskuraConfig",
|
|
17
|
+
"AskuraState",
|
|
18
|
+
"AskuraResponse",
|
|
19
|
+
"ConversationManager",
|
|
20
|
+
"InformationExtractor",
|
|
21
|
+
"InformationSlot",
|
|
22
|
+
]
|