Personal AGI Operating Core
Project description
🌌 MONAD (v0.1)
Personal AGI Operating Core
🇨🇳 简体中文 (Chinese) • How It Works • Installation • Architecture
MONAD is not a chatbot or a simple tool-matcher. It is a self-learning, objective-driven autonomous rational agent core.
Unlike traditional agents that rely on a predefined, hardcoded set of tools, MONAD acts like a rational entity with basic "instincts". It has no memory and no pre-loaded knowledge of how to perform specific tasks (like checking the weather or searching the web).
Instead, it autonomously learns how to complete your tasks by writing and executing Python code on the fly, and then saving those successful experiences as reusable skills.
🧠 Core Philosophy
- File System as Database: The system itself has no memory of past sessions. It persists all learned information (axioms, environment knowledge, learned skills, user context, and experiences) directly to local Markdown files. No vector databases, no RAG, zero external dependencies.
- Absolute Rationality: MONAD follows a strict reasoning loop (
Analyze → Self-check → Learn → Execute → Reflect) to accomplish goals logically. - Self-Learning & Self-Evolving: Instead of shipping with 100 tools, MONAD ships with only 4 basic instincts (hands 🤲, voice 🗣️, eyes 👁️, dialogue 💬). It learns everything else by generating code.
- LLM as a Command Executor: The LLM's own training data is disregarded. All factual information must be retrieved from the real world via code execution or web perception.
- Search First, Ask Later: When stuck during execution (errors, missing packages, unfamiliar tools), MONAD's first instinct is to search the web via
web_fetch, never to guess. But if the user's intent is unclear, MONAD asks the user first. In short: unclear query → ask user; execution problem → search first.
⚡ Basic Capabilities ("Instincts")
MONAD comes with only four built-in capabilities:
| Capability | Metaphor | Description |
|---|---|---|
🐍 python_exec |
Hands 🤲 | Evaluate arbitrary Python code. Process data, call APIs, read/write files, install libraries—learn to do anything. |
💻 shell |
Voice 🗣️ | Execute shell commands on the host operating system. |
👁️ web_fetch |
Eyes 👁️ | Perceive the internet directly. Fetch web pages with 3 modes: fast (HTTP), stealth (anti-bot), browser (JS render). Powered by Scrapling. |
🙋 ask_user |
Dialogue 💬 | Ask the user for clarification when it truly cannot proceed independently. |
📂 Knowledge Architecture
MONAD uses Categorized Memory instead of semantic retrieval (RAG).
knowledge/
├── axioms/ # System axioms & core behavioral principles
├── environment/ # World knowledge (e.g., search engine URLs, API endpoints)
├── user/ # Categorized user context (No RAG used here)
│ ├── facts.md # Objective facts & preferences (e.g., prefers Python)
│ ├── mood.md # Current state & mood
│ └── goals.md # Long-term goals & ongoing projects
├── skills/ # Auto-generated reusable Python skills
├── experiences/ # Execution logs and post-task reflections
├── protocols/ # Error handling protocols
└── tools/ # Documentation for the 4 basic capabilities
⚙️ How It Works
When you give MONAD an objective (e.g., "What is the weather in Hangzhou today?"):
- Analyze & Self-Check: The Reasoner loads the knowledge base and checks if a
get_weatherskill already exists. - Plan & Act: If no skill exists, it writes a Python script using
python_execto call a free weather API (e.g., Open-Meteo). - Observe & Adjust: It runs the code, observes the standard output. If it crashes, it analyzes the error, patches the code, and retries.
- Answer: It formats the final retrieved real-world data for the user.
- Reflect & Learn: After the task, the
Reflectionmodule analyzes what happened. TheSkillBuilderthen evaluates if the logic should be extracted into a new permanent skill file.
🚀 Installation
1. Install via pip (Recommended)
pip install monad-core
Alternatively, install from source:
git clone https://github.com/hscspring/Monad.git
cd Monad
pip install -e .
2. Install Browser Engine (Required)
MONAD's web_fetch capability requires the Chromium browser engine to parse dynamic web pages:
playwright install chromium
3. Configure your LLM
On your first run, MONAD will initialize its workspace in ~/.monad/. Update ~/.monad/.env with your LLM Base URL, API Key, and Model name.
💻 Usage
Once installed, you can start the MONAD agent from any directory in your terminal.
Start Web UI (Default)
Launch the modern browser-based interface:
monad
Interactive Terminal Mode (Classic)
Start the continuous ReAct agent loop in the CLI:
monad --cli
Self-Test
Verify all modules load correctly and the LLM connection is functioning:
monad --test
Unit Tests
Run the test suite for all tools:
python -m pytest tests/ -v
Built with pure rational reasoning 💡
Project details
Release history Release notifications | RSS feed
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 monad_core-0.1.6.tar.gz.
File metadata
- Download URL: monad_core-0.1.6.tar.gz
- Upload date:
- Size: 54.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8bcdda0f1482dfb03254ef7870103f64c26d1d898d1cc415dbc56772e9d72e9e
|
|
| MD5 |
900300b537e656db99e77b2a0ff04330
|
|
| BLAKE2b-256 |
61f76e4c416f58aaf69fd72926d84dbf766d070f51e8d9fefdd8d81fe9880aa4
|
File details
Details for the file monad_core-0.1.6-py3-none-any.whl.
File metadata
- Download URL: monad_core-0.1.6-py3-none-any.whl
- Upload date:
- Size: 63.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04d92412d2002fffd69180bd4ef8e52c66a95acbaa74020feafc83dc602ed115
|
|
| MD5 |
443e547b7145a631f008877785abc4f9
|
|
| BLAKE2b-256 |
0833373fc9aeadafb57afe1e82ecf54b9d4d61c874f061e5f2c115b544f90633
|