Towards a cognitive agentic framework
Project description
Noesium
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).
Installation
pip install -U noesium
Core Modules
| Module | Description |
|---|---|
LLM Integration (noesium.core.llm) |
Multi-provider support (OpenAI, OpenRouter, Ollama, LlamaCPP, LiteLLM), dynamic routing, token tracking |
Goal Management (noesium.core.goalith) |
LLM-based goal decomposition, DAG-based goal graph, dependency tracking |
Tool Management (noesium.core.toolify) |
Tool registry, MCP integration, 17+ built-in toolkits |
Memory (noesium.core.memory) |
MemU integration, embedding-based retrieval, multi-category storage |
Vector Store (noesium.core.vector_store) |
PGVector and Weaviate support, semantic search |
Message Bus (noesium.core.msgbus) |
Event-driven architecture, watchdog patterns |
Routing (noesium.core.routing) |
Dynamic complexity-based model selection |
Tracing (noesium.core.tracing) |
Token usage monitoring, Opik integration |
Built-in Agents
- AskuraAgent - Conversational agent for collecting semi-structured information via human-in-the-loop workflows
- SearchAgent - Web search with query polishing, multi-engine support, and optional content crawling
- DeepResearchAgent - Iterative research with LLM-powered reflection and citation generation
- MemoryAgent - Memory management with categorization, embedding search, and memory linking
Quick Start
LLM Client
from noesium.core.llm import get_llm_client
# Create client (supports openai, openrouter, ollama, llamacpp)
client = get_llm_client(provider="openai", api_key="sk-...")
# Chat completion
response = client.completion([{"role": "user", "content": "Hello!"}])
# Structured output
from pydantic import BaseModel
class Answer(BaseModel):
text: str
confidence: float
client = get_llm_client(provider="openai", structured_output=True)
result = client.structured_completion(messages, Answer)
Tool Management
from noesium.core.toolify import BaseToolkit, ToolkitConfig, ToolkitRegistry, register_toolkit
@register_toolkit("calculator")
class CalculatorToolkit(BaseToolkit):
def get_tools_map(self):
return {"add": self.add, "multiply": self.multiply}
def add(self, a: float, b: float) -> float:
return a + b
def multiply(self, a: float, b: float) -> float:
return a * b
# Use toolkit
config = ToolkitConfig(name="calculator")
calc = ToolkitRegistry.create_toolkit("calculator", config)
result = calc.call_tool("add", a=5, b=3)
Goal Decomposition
from noesium.core.goalith.goalgraph.node import GoalNode
from noesium.core.goalith.goalgraph.graph import GoalGraph
from noesium.core.goalith.decomposer import LLMDecomposer
# Create and decompose a goal
goal = GoalNode(description="Plan a product launch", priority=8.0)
graph = GoalGraph()
graph.add_node(goal)
decomposer = LLMDecomposer()
subgoals = decomposer.decompose(goal, context={"budget": "$50,000"})
Search Agent
from noesium.agents.search import SearchAgent, SearchConfig
config = SearchConfig(
polish_query=True,
search_engines=["tavily"],
max_results_per_engine=5
)
agent = SearchAgent(config=config)
results = await agent.search("latest developments in quantum computing")
Deep Research Agent
from noesium.agents.deep_research import DeepResearchAgent, DeepResearchConfig
config = DeepResearchConfig(
number_of_initial_queries=3,
max_research_loops=3,
web_search_citation_enabled=True
)
agent = DeepResearchAgent(config=config)
result = await agent.research("What are the implications of AI on healthcare?")
Environment Variables
# LLM Providers
export NOESIUM_LLM_PROVIDER="openai"
export OPENAI_API_KEY="sk-..."
export OPENROUTER_API_KEY="sk-..."
export OLLAMA_BASE_URL="http://localhost:11434"
export LLAMACPP_MODEL_PATH="/path/to/model.gguf"
# Vector Store (PostgreSQL)
export POSTGRES_HOST="localhost"
export POSTGRES_PORT="5432"
export POSTGRES_DB="vectordb"
export POSTGRES_USER="postgres"
export POSTGRES_PASSWORD="postgres"
# Search Tools
export SERPER_API_KEY="..."
export JINA_API_KEY="..."
Examples
See the examples/ directory for comprehensive usage examples:
examples/agents/- Agent demos (Askura, Search, DeepResearch)examples/llm/- LLM provider examples and token trackingexamples/goals/- Goal decomposition patternsexamples/memory/- Memory agent operationsexamples/tools/- Toolkit demonstrationsexamples/vector_store/- PGVector and Weaviate usage
Documentation
- Design Specifications:
specs/directory contains RFCs for system architecture - Agent Details: See
AGENTS.mdfor comprehensive agent and toolkit documentation - Toolify System:
noesium/core/toolify/README.md
License
MIT License - see LICENSE file for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file noesium-0.2.1.tar.gz.
File metadata
- Download URL: noesium-0.2.1.tar.gz
- Upload date:
- Size: 204.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"LMDE","version":"7","id":"gigi","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1fc8bca2ba2221dde2e3d085c081f0f39d995ccd4a0ab5075f35d26b72932a03
|
|
| MD5 |
fe970daa8832009f6631bf5ed24e35ed
|
|
| BLAKE2b-256 |
1357e7e1ed93a79a9cf53ca7483cacf8c77b9f8a459758617b896f6a81229246
|
File details
Details for the file noesium-0.2.1-py3-none-any.whl.
File metadata
- Download URL: noesium-0.2.1-py3-none-any.whl
- Upload date:
- Size: 268.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"LMDE","version":"7","id":"gigi","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f663560d4533834edf396926e972eb8685fc32f697d11fae1b1edbfc18431e0c
|
|
| MD5 |
fd612a329d5b99eef9bc9d1a6ae1d238
|
|
| BLAKE2b-256 |
febeb6a47426b58b055a661acf2978b0f23dfaf8e4f43c69cf60dfabd383a9e2
|