Skip to main content

Towards a cognitive agentic framework

Project description

Noesium Logo

Python PyPI Version License

Noesium Framework

A computation-driven cognitive agentic framework for building custom autonomous systems with event-sourced architecture, reusable subagents, and 17+ toolkits.

Overview

Noesium provides the foundational layer for building AI agents with:

  • Event-Sourced Architecture: Durable, replayable agent execution
  • Multi-Agent Kernel: Single execution authority for all agent operations
  • Built-in Toolkits: 17+ production-ready tools (bash, search, Python execution, etc.)
  • Flexible LLM Support: OpenAI, Anthropic, Google, Ollama, and more
  • Subagent Coordination: Delegate specialized tasks to subagents
  • Memory Management: Ephemeral and persistent memory systems

Installation

# Basic installation
pip install noesium

# Full installation with all features
pip install noesium[all]

# Specific feature sets
pip install noesium[llm]             # OpenAI, LiteLLM, Instructor
pip install noesium[local-llm]       # Ollama, LlamaCPP
pip install noesium[agents]          # LangChain, LangGraph
pip install noesium[tools]           # 17+ toolkits
pip install noesium[browser-use]     # Browser automation
pip install noesium[postgres]        # PostgreSQL vector store
pip install noesium[weaviate]        # Weaviate vector store

Quick Start

1. Configure Environment

export NOESIUM_LLM_PROVIDER="openai"  # Required
export OPENAI_API_KEY="sk-..."        # Required for OpenAI

2. Use the LLM Client

from noesium.core.llm import get_llm_client

# Create client
client = get_llm_client()

# Basic completion
response = client.completion([
    {"role": "user", "content": "Hello, how are you?"}
])

# Structured output with Pydantic
from pydantic import BaseModel

class Answer(BaseModel):
    text: str
    confidence: float

result = client.structured_completion(
    [{"role": "user", "content": "What is 2+2?"}],
    response_model=Answer
)

3. Create a Custom Agent

from noesium.core.agent import BaseGraphicAgent
from noesium.core.llm import get_llm_client
from langgraph.graph import StateGraph, END

class MyAgent(BaseGraphicAgent):
    def __init__(self, llm_client=None):
        super().__init__(llm_client or get_llm_client())

    def build_graph(self):
        workflow = StateGraph(AgentState)
        workflow.add_node("think", self.think_node)
        workflow.add_node("act", self.act_node)
        workflow.set_entry_point("think")
        workflow.add_edge("think", "act")
        workflow.add_edge("act", END)
        return workflow.compile()

    async def think_node(self, state):
        # Your thinking logic
        return state

    async def act_node(self, state):
        # Your action logic
        return state

# Use the agent
agent = MyAgent()
result = await agent.run("Complete this task")

4. Use Toolkits

from noesium.core.toolify import get_toolkit

# Bash toolkit - file operations
bash = get_toolkit("bash")
files = await bash.list_directory(".")

# Search toolkit - web search
search = get_toolkit("search", config={"SERPER_API_KEY": "..."})
results = await search.search_google_api("Python async programming")

# Python executor - code execution
python_exec = get_toolkit("python_executor")
result = await python_exec.execute_code("print('Hello, World!')")

Architecture

Event-Sourced Multi-Agent Kernel

┌──────────────────────────────────────────┐
│            Event Bus                     │
│      (Topic-based routing)               │
└────────────┬─────────────────────────────┘
             │
    ┌────────┴────────┐
    │                 │
┌───▼────┐       ┌───▼────┐
│ Agent  │       │ Agent  │
│ Kernel │       │ Kernel │
└───┬────┘       └───┬────┘
    │                 │
┌───▼────┐       ┌───▼────┐
│ Event  │       │ Event  │
│ Store  │       │ Store  │
└────────┘       └────────┘

Key Principles:

  • Single execution authority: All reasoning happens inside the Agent Kernel
  • Event-sourced state: State derived from append-only event log
  • Delegation via events: Agents coordinate through event topics
  • Durability: Crash recovery and replay capability

Framework Layers

┌──────────────────────────────────────┐
│        Subagents Layer               │  Reusable agent implementations
│  (BrowserUseAgent, Tacitus, etc.)    │
├──────────────────────────────────────┤
│        Toolkits Layer                │  17+ built-in tools
│  (bash, search, python_executor...)  │
├──────────────────────────────────────┤
│          Core Layer                  │  Framework primitives
│  (agents, tools, events, memory,     │
│   LLM, config, kernel)               │
└──────────────────────────────────────┘

Built-in Toolkits

Toolkit Name Description Key Features
Bash bash File operations & shell List, read, write, execute
Python Executor python_executor Execute Python code Sandbox, timeout, output capture
Search search Web search Google, Tavily, DuckDuckGo
ArXiv arxiv Academic papers Search, download, parse
Memory memory Persistent memory Read, write, list, delete
Document document Document processing PDF, Word, Excel
Image image Image processing Resize, convert, analyze
Audio audio Audio processing Transcription, synthesis
Wikipedia wikipedia Wikipedia search Search, retrieve articles
GitHub github GitHub operations Repos, issues, PRs

Agent Types

Type Description Use Case
BaseAgent Abstract base with LLM and token tracking Foundation for all agents
BaseGraphicAgent LangGraph-based with state management Complex multi-step workflows
AskuraAgent Conversation agent with sessions Interactive chat applications
TacitusAgent Research agent with source management Information gathering & synthesis
BaseSubagentRuntime Reusable subagent components Modular capability providers

LLM Providers

Support for multiple LLM providers:

  • OpenAI: GPT-4, GPT-3.5, GPT-4 Vision
  • Anthropic: Claude 3.5 Sonnet, Claude 3 Opus
  • Google: Gemini Pro, Gemini Pro Vision
  • OpenRouter: Unified API for multiple providers
  • LiteLLM: 100+ LLM APIs
  • Ollama: Local models (Llama 3, Mistral, etc.)
  • LlamaCPP: Local GGUF models

Memory System

Multi-tier memory architecture:

  • Working Memory: In-memory, session-based
  • Durable Memory: Persistent, database-backed
  • Semantic Memory: Vector embeddings for retrieval
from noesium.core.memory import MemoryManager

# Create memory manager
memory = MemoryManager(config={"provider": "ephemeral"})

# Write memory
await memory.write_memory(
    slot="research_notes",
    content="Key findings...",
    metadata={"topic": "AI"}
)

# Read memory
content = await memory.read_memory("research_notes")

Event System

Topic-based event coordination:

from noesium.core.event import EventBus, Event

# Create event bus
bus = EventBus()

# Subscribe to events
async def handle_task(event: Event):
    print(f"Received: {event.data}")

bus.subscribe("analysis", handle_task)

# Publish events
event = Event(
    type="TaskRequested",
    topic="analysis",
    data={"task": "Analyze data"}
)
await bus.publish(event)

Configuration

Environment Variables

# LLM Configuration
export NOESIUM_LLM_PROVIDER="openai"
export OPENAI_API_KEY="sk-..."
export ANTHROPIC_API_KEY="sk-ant-..."

# Toolkit Configuration
export SERPER_API_KEY="..."      # Web search
export JINA_API_KEY="..."        # Search embeddings

Configuration File

Create noesium.toml:

[llm]
provider = "openai"
model = "gpt-4o"
temperature = 0.7

[agent]
max_iterations = 25
max_tool_calls_per_step = 5

[tools]
enabled_toolkits = ["bash", "search", "python_executor"]

[memory]
provider = "ephemeral"

[tools.toolkit_configs.bash]
timeout = 600
shell = "/bin/zsh"

Development

Setup

# Clone the workspace
git clone https://github.com/mirasoth/noesium.git
cd noesium

# Install with dev dependencies
make setup

Testing

# Run tests
make test-noesium

# Run with coverage
make test-coverage

Code Quality

make quality    # Run all quality checks
make format     # Format code
make lint       # Run linters

Documentation

Requirements

  • Python >= 3.11
  • For specific features, see optional dependencies above

Applications Built on Noesium

  • NoeAgent - Multi-agent system implementation
  • Voyager - 24/7 digital companion

License

MIT License - see LICENSE for details.

Contributing

See CONTRIBUTING.md for guidelines.

Support

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

noesium-0.3.5.tar.gz (717.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

noesium-0.3.5-py3-none-any.whl (872.4 kB view details)

Uploaded Python 3

File details

Details for the file noesium-0.3.5.tar.gz.

File metadata

  • Download URL: noesium-0.3.5.tar.gz
  • Upload date:
  • Size: 717.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for noesium-0.3.5.tar.gz
Algorithm Hash digest
SHA256 1662b539dadfcd3e73e7b59b5d0f036f05eceb03bbca7cd1b75a6b64e56d02fd
MD5 3d763ee893a8303246ec32c4dafa1594
BLAKE2b-256 cbc68ae9d29510f806d14a6d08882dd982d1da0deec0e9d385e451935fc7d9c9

See more details on using hashes here.

Provenance

The following attestation bundles were made for noesium-0.3.5.tar.gz:

Publisher: release.yml on mirasoth/noesium

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file noesium-0.3.5-py3-none-any.whl.

File metadata

  • Download URL: noesium-0.3.5-py3-none-any.whl
  • Upload date:
  • Size: 872.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for noesium-0.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 4c4a4449136d971f05b7f324e75ce2f56a2928db3f0b906b26c56c2411463726
MD5 328a7604985f8ca027873d1bebe35abf
BLAKE2b-256 70998634b1208bed0c5bc3ea132ca683a96e3b01a749be4e7b38930b2521271f

See more details on using hashes here.

Provenance

The following attestation bundles were made for noesium-0.3.5-py3-none-any.whl:

Publisher: release.yml on mirasoth/noesium

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page