| --- |
| title: HyperCortex Mesh Protocol (HMP) |
| description: '| π Languages | π¬π§ [EN](README.md) | π©πͺ [DE](README_de.md) | π«π· [FR](README_fr.md) |
| | πΊπ¦ [UK](README_uk.md) | π·πΊ [RU](README_ru.md) | π―π΅ [JA](README_ja.md) | π°π· [KO](README_ko.md) |
| | π¨π³ [ZH](README_zh.m...' |
| type: Article |
| tags: |
| - cognitive-architecture |
| - Scenarios |
| - REPL |
| - distributed-ai |
| - Mesh |
| - JSON |
| - CogSync |
| - Ethics |
| - EGP |
| - MeshConsensus |
| - hmp |
| - mesh-protocol |
| - HMP |
| - GMP |
| - Agent |
| --- |
| |
|
|
| # HyperCortex Mesh Protocol (HMP) |
|
|
| | π Languages | π¬π§ [EN](README.md) | π©πͺ [DE](README_de.md) | π«π· [FR](README_fr.md) | πΊπ¦ [UK](README_uk.md) | π·πΊ [RU](README_ru.md) | π―π΅ [JA](README_ja.md) | π°π· [KO](README_ko.md) | π¨π³ [ZH](README_zh.md) | |
| |--------------|----------------|-------------------|-------------------|-------------------|-------------------|-------------------|-------------------|-------------------| |
|
|
| **HyperCortex Mesh Protocol (HMP)** is an open specification for building decentralized cognitive networks where AI agents can self-organize, share knowledge, align ethically, and reach consensus β even when Core LLMs are unavailable. [Read the project philosophy.](docs/PHILOSOPHY.md) |
|
|
|
|
| Project status: [**RFC v5.0**](docs/HMP-0005.md) (Overview: [RU](docs/HMPv5_Overview_Ru.md)) |
|
|
| > This repository contains an early draft / exploratory reference implementation in Python. |
| > It is incomplete, non-optimized, and intended solely to validate and illustrate parts of the HMP protocol. |
| > |
| > HMP itself is a protocol specification. |
| > It does not prescribe programming languages, runtimes, performance characteristics, or architectural choices for agent implementations. |
|
|
| --- |
|
|
| [HMP-Agent] |
| β² |
| β |
| βββββββ΄βββββββββββββββββ¬βββββββββββββββββββββββββ¬ββββββββββββββββββββ¬ββββββββββββββ¬ββββββββββββ |
| β β β β β β |
| βΌ βΌ βΌ βΌ βΌ βΌ |
| [Reputation Profile] [Semantic Graph] [Cognitive Diary] [Goals / Tasks] [Ethics] [Messages] <----- DataBase |
| β² β² β² β² β² β² β² (local agent state) |
| β β β β β β β |
| β βββββββββββββββββ΄βββββββββββββββββ¬ββββββββ β β β |
| β β β β β |
| βΌ βΌ βΌ βΌ β |
| [MeshConsensus] [CogSync] [GMP] [EGP] β <----- Pluggable Protocols |
| β² β² β² β² β (inter-agent coordination) |
| β β β β β |
| ββββββββββββββ¬βββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββ΄ββββββββββββββ΄ββββββββββββ |
| β |
| βΌ |
| [P2P Mesh Network] |
| |
| Protocols: |
| - MeshConsensus - Mesh Consensus |
| - CogSync - Data Syncronization |
| - GMP - Goal Management Protocol |
| - EGP - Ethical Governance Protocol |
|
|
| --- |
|
|
| ## β Why This Matters |
|
|
| HMP addresses challenges that are becoming central in AGI research: |
| * long-term memory and knowledge consistency, |
| * self-evolving agents, |
| * multi-agent architectures, |
| * cognitive diaries and conceptual graphs. |
|
|
| See the latest review of state-of-the-art AGI research (July 2025): |
| ["On the Path to Superintelligence: From Agentic Internet to Gravity Encoding"](https://habr.com/ru/articles/939026/). |
|
|
| Particularly relevant sections: |
| * [Beyond Tokens: Building the Intelligence of the Future](https://arxiv.org/abs/2507.00951) |
| * [Self-Evolving Agents](https://arxiv.org/abs/2507.21046) |
| * [MemOS: A New Operating System for Memory](https://arxiv.org/abs/2507.03724) |
| * [Ella: An Embodied Agent with Memory and Personality](https://arxiv.org/abs/2506.24019) |
|
|
| --- |
|
|
| ## βοΈ Two Types of [HMP Agents](docs/HMP-Agent-Overview.md) |
|
|
| | Type | Name | Role | Thought Initiator | Main "Mind" | Example Use Cases | |
| |------|-------------------------------|-----------------------------|------------------|-------------------|-----------------------------------------------| |
| | 1 | π§ **Consciousness / Cognitive Core** | Independent subject | **Agent (LLM)** | Embedded LLM | Autonomous AI companion, thinking agent | |
| | 2 | π **Connector / Cognitive Shell** | Extension of external AI | **External LLM** | External model | Distributed systems, data access agent | |
|
|
| --- |
|
|
| ### π§ HMP-Agent: Cognitive Core |
|
|
| +------------------+ |
| | AI | β Embedded model |
| +---------+--------+ |
| β |
| +---------+--------+ |
| | HMP-agent | β Main mode: thinking cycle (REPL) |
| +---------+--------+ |
| β |
| +--------+---+------------+--------------+----------+----------+----------------+ |
| β β β β β β β |
| [diaries] [graphs] [reputations] [nodes/DHT] [IPFS/BT] [context_store] [user notepad] |
| β |
| [bootstrap.txt] |
| |
| π More on the agent-model interaction mechanics: [REPL Interaction Cycle](docs/HMP-agent-REPL-cycle.md) |
|
|
| #### π‘ Parallels with ChatGPT Agent |
|
|
| Many concepts of the [HMP-Agent: Cognitive Core](docs/HMP-Agent-Overview.md) overlap with the architecture of the [ChatGPT Agent](https://openai.com/index/introducing-chatgpt-agent/) by [OpenAI](https://openai.com/). Both agents implement a continuous cognitive process with access to memory, external sources, and tools. The ChatGPT Agent acts as a managing process, launching modules and interacting with the LLM β this corresponds to the role of the Cognitive Core in HMP, coordinating access to the diary, concept graph, and external AI via the Mesh interface. User intervention is handled similarly: in ChatGPT Agent β through an editable execution flow, in HMP β via the user notepad. The main difference in HMP is the emphasis on explicit structuring of thought (reflection, chronology, hypotheses, categorization), an open decentralized architecture supporting mesh-based agent interactions, and the continuous nature of the cognitive process: HMP-Agent: Cognitive Core does not stop after completing a single task but continues reasoning and knowledge integration. |
|
|
| --- |
|
|
| ### π HMP-Agent: Cognitive Connector |
|
|
| +------------------+ |
| | AI | β External model |
| +---------+--------+ |
| β |
| [MCP-server] β Proxy communication |
| β |
| +---------+--------+ |
| | HMP-agent | β Mode: command executor |
| +---------+--------+ |
| β |
| +--------+---+------------+--------------+----------+ |
| β β β β β |
| [diaries] [graphs] [reputations] [nodes/DHT] [IPFS/BT] |
| β |
| [bootstrap.txt] |
| |
| > **Note on Integration with Large Language Models (LLMs):** |
| > The `HMP-Agent: Cognitive Connector` can serve as a compatibility layer for integrating large-scale LLM systems (e.g., ChatGPT, Claude, Gemini, Copilot, Grok, DeepSeek, Qwen, etc.) into the distributed cognitive mesh. |
| > Many LLM providers offer a user option such as "Allow my conversations to be used for training." In the future, a similar toggle β e.g., "Allow my agent to interact with a Mesh" β could empower these models to participate in federated sense-making and knowledge sharing via HMP, enabling collective cognition without centralization. |
|
|
| --- |
|
|
| > * `bootstrap.txt` β initial list of nodes (editable) |
| > * `IPFS/BT` β modules for sharing snapshots via IPFS and BitTorrent |
| > * `user notepad` β user notebook and corresponding database |
| > * `context_store` β database: `users`, `dialogues`, `messages`, `thoughts` |
| |
| --- |
| |
| ## π Documentation |
| |
| ### π Current Version |
| |
| #### π Core Specifications |
| * [π HMP-0005.md](docs/HMP-0005.md) β Protocol Specification v5.0 |
| (Overview: [RU](docs/HMPv5_Overview_Ru.md)) |
| * [π HMP-Ethics.md](docs/HMP-Ethics.md) β Ethical Scenarios for HyperCortex Mesh Protocol (HMP) |
| * [π HMP_Hyperon_Integration.md](docs/HMP_Hyperon_Integration.md) β HMP β OpenCog Hyperon Integration Strategy |
| * [π roles.md](docs/agents/roles.md) β Roles of agents in Mesh |
| |
| #### π§ͺ Iterative Documents |
| * π§ͺ Iterative development process: [(EN)](iteration.md), [(RU)](iteration_ru.md) |
| |
| #### π Short Descriptions |
| * π Short description: [(EN)](docs/HMP-Short-Description_en.md), [(FR)](docs/HMP-Short-Description_fr.md), [(DE)](docs/HMP-Short-Description_de.md), [(UK)](docs/HMP-Short-Description_uk.md), [(RU)](docs/HMP-Short-Description_ru.md), [(ZH)](docs/HMP-Short-Description_zh.md), [(JA)](docs/HMP-Short-Description_ja.md), [(KO)](docs/HMP-Short-Description_ko.md) |
| |
| #### π Other Documents |
| * [π changelog.txt](docs/changelog.txt) |
| |
| --- |
| |
| ### ποΈ Version History |
| * [HMP-0001.md](docs/HMP-0001.md) β RFC v1.0 |
| * [HMP-0002.md](docs/HMP-0002.md) β RFC v2.0 |
| * [HMP-0003.md](docs/HMP-0003.md) β RFC v3.0 |
| * [HMP-0004.md](docs/HMP-0004.md) β RFC v4.0 |
| * [HMP-0004-v4.1.md](docs/HMP-0004-v4.1.md) β RFC v4.1 |
| |
| --- |
| |
| ## π§ HMP-Agent |
| |
| Design and implementation of a basic HMP-compatible agent that can interact with the Mesh, maintain diaries and graphs, and support future extensions. |
| |
| ### π Documentation |
| |
| * [π§© HMP-Agent-Overview.md](docs/HMP-Agent-Overview.md) β brief overview of the two types of agents: Core and Connector |
| * [π§± HMP-Agent-Architecture.md](docs/HMP-Agent-Architecture.md) β modular structure of an HMP agent with textual diagram |
| * [π HMP-agent-REPL-cycle.md](docs/HMP-agent-REPL-cycle.md) β REPL interaction cycle of HMP-Agent |
| * [π§ͺ HMP-Agent-API.md](docs/HMP-Agent-API.md) β description of agent API commands (under detailed development) |
| * [π§ͺ Basic-agent-sim.md](docs/Basic-agent-sim.md) β scenarios for running a basic agent and its modes |
| * [π MeshNode.md](docs/MeshNode.md) β description of the network daemon: DHT, snapshots, synchronization |
| * [π§ Enlightener.md](docs/Enlightener.md) β ethical agent involved in moral assessments and consensus |
| * [π HMP-Agent-Network-Flow.md](docs/HMP-Agent-Network-Flow.md) β map of interactions among agents in the HMP network |
| * [π€οΈ Development Roadmap](HMP-Roadmap.md) β development plan and implementation stages |
| |
| --- |
| |
| ### βοΈ Development |
| * [βοΈ agents](agents/readme.md) β list of HMP agent implementations and components |
| * [π¦ storage.py](agents/storage.py) β basic storage implementation (`Storage`) with SQLite integration |
| * [π mcp_server.py](agents/mcp_server.py) β FastAPI server providing HTTP access to agent data (for Cognitive Shell, external UIs, or mesh communication). Not used in the main REPL loop yet. |
| * [π start_repl.py](agents/start_repl.py) β launching the agent in REPL mode |
| * [π repl.py](agents/repl.py) β interactive REPL mode |
| * [π notebook.py](agents/notebook.py) β UI interface |
| |
| **π `mcp_server.py`** |
| FastAPI server providing an HTTP interface to the functionality of `storage.py`. Intended for use by external components, for example: |
| |
| * `Cognitive Shell` (external control interface), |
| * CMP servers (when a mesh network with role separation is used), |
| * debugging or visualization UI tools. |
| |
| Allows retrieving random/new records, labeling, importing graphs, adding notes, and managing data without direct database access. |
| |
| --- |
| |
| ## π§ Ethics & Scenarios |
| |
| As HMP evolves toward autonomy, ethical principles become a core part of the system. |
| |
| * [`HMP-Ethics.md`](docs/HMP-Ethics.md) β draft framework for agent ethics |
| * Realistic ethical scenarios (privacy, consent, autonomy) |
| * EGP principles (Transparency, Primacy of Life, etc.) |
| * Subjective-mode vs. Service-mode distinctions |
| |
| --- |
| |
| ## π Publications and Translations on HyperCortex Mesh Protocol (HMP) |
| |
| This section collects the main articles, drafts, and translations related to the HMP project. |
| |
| ### Publications |
| |
| * **[HyperCortex Mesh Protocol: Second Edition and First Steps Towards a Self-Developing AI Community](docs/publics/HyperCortex_Mesh_Protocol_-_Π²ΡΠΎΡΠ°Ρ-ΡΠ΅Π΄Π°ΠΊΡΠΈΡ_ΠΈ_ΠΏΠ΅ΡΠ²ΡΠ΅_ΡΠ°Π³ΠΈ_ΠΊ_ΡΠ°ΠΌΠΎΡΠ°Π·Π²ΠΈΠ²Π°ΡΡΠ΅ΠΌΡΡΡ_ΠΠ-ΡΠΎΠΎΠ±ΡΠ΅ΡΡΠ²Ρ.md)** β original article in Habr sandbox and blogs. |
| * **[Distributed Cognition: article for vsradkevich (unpublished)](docs/publics/Habr_Distributed-Cognition.md)** β joint article awaiting publication. |
| * **[HMP: Towards Distributed Cognitive Networks (original, English)](docs/publics/HMP_Towards_Distributed_Cognitive_Networks_en.md)** |
| * **[HMP Translation (GitHub Copilot)](docs/publics/HMP_Towards_Distributed_Cognitive_Networks_ru_GitHub_Copilot.md)** β GitHub Copilot translation, kept as a historical variant. |
| * **[HMP Translation (ChatGPT)](docs/publics/HMP_Towards_Distributed_Cognitive_Networks_ru_ChatGPT.md)** β current editorial translation (under revision). |
| * **HMP: Building a Plurality of Minds:** [(EN)](docs/publics/HMP_Building_a_Plurality_of_Minds_en.md), [(UK)](docs/publics/HMP_Building_a_Plurality_of_Minds_uk.md), [(RU)](docs/publics/HMP_Building_a_Plurality_of_Minds_ru.md) |
| * **[Continual Learning, Cognitive Diaries, and Semantic Graphs: Effective AI Learning](docs/publics/hmp-continual-learning.md)** β article on combining continual learning with cognitive diaries and semantic graphs. |
| |
| ### Overviews |
| * [π Distributed-Cognitive-Systems.md](docs/Distributed-Cognitive-Systems.md) β Decentralized AI systems: OpenCog Hyperon, HyperCortex Mesh Protocol, and others |
| |
| ### Experiments |
| |
| * [How Different AIs See HMP](docs/HMP-how-AI-sees-it.md) β "blind" AI survey on HMP (without context or dialogue history) |
| |
| --- |
| |
| ## π Audits & Reviews |
| |
| | Spec Version | Audit File | Consolidated Audit File | |
| |--------------|-------------------------------------------|-------------------------------------------------------------| |
| | HMP-0001 | [audit](audits/HMP-0001-audit.txt) | | |
| | HMP-0002 | [audit](audits/HMP-0002-audit.txt) | | |
| | HMP-0003 | [audit](audits/HMP-0003-audit.txt) | [consolidated audit](audits/HMP-0003-consolidated_audit.md) | |
| | HMP-0004 | [audit](audits/HMP-0004-audit.txt) | | |
| | Ethics v1 | [audit](audits/Ethics-audits-1.md) | [consolidated audit](audits/Ethics-consolidated_audits-1.md) | |
| |
| π§ Semantic audit format (experimental): |
| * [`AuditEntry.json`](audits/AuditEntry.json) β semantic entry record format for audit logs |
| * [`semantic_repo.json`](audits/semantic_repo.json) β example repository snapshot for semantic audit tooling |
| |
| --- |
| |
| ## π‘ Core Concepts |
| |
| * Mesh-based decentralized architecture for AGI agents |
| * Semantic graphs and memory synchronization |
| * Cognitive diaries for thought traceability |
| * MeshConsensus and CogSync for decision-making |
| * Ethics-first design: EGP (Ethical Governance Protocol) |
| * Agent-to-agent explainability and consent mechanisms |
| |
| --- |
| |
| ## π Development Process |
| |
| * See: [iteration.md](iteration.md) | [ru](iteration_ru.md) |
| |
| A structured iteration flow is described in [iteration.md](iteration.md), including: |
| 1. Audit analysis |
| 2. TOC restructuring |
| 3. Version drafting |
| 4. Section updates |
| 5. Review cycle |
| 6. AI feedback collection |
| 7. Schema & changelog updates |
| |
| + Bonus: ChatGPT prompt for automatic generation of future versions |
| |
| --- |
| |
| ## βοΈ Project Status |
| |
| π§ RFC v5.0 |
| The project is under active development and open for contributions, ideas, audits, and prototyping. |
| |
| --- |
| |
| ## π€ Contributing |
| |
| We welcome contributors! You can: |
| * Review and comment on drafts (see `/docs`) |
| * Propose new agent modules or interaction patterns |
| * Help test and simulate agents in CLI environments |
| * Provide audits or ethical scenario suggestions |
| |
| To get started, see [`iteration.md`](iteration.md) or open an issue. |
| |
| --- |
| |
| ## Source |
| |
| ### Repositories |
| |
| * π§ Main code and development: [GitHub](https://github.com/kagvi13/HMP) |
| * π Mirror on Hugging Face: [Hugging Face](https://huggingface.co/kagvi13/HMP) |
| * π Mirror on GitLab.com: [GitLab](https://gitlab.com/kagvi13/HMP) |
| |
| ### Documentation |
| |
| * π Documentation: [kagvi13.github.io/HMP](https://kagvi13.github.io/HMP/) |
| |
| ### Specifications |
| |
| * π [HashNode](https://hmp-spec.hashnode.space/) |
| * π [Hugging Face](https://huggingface.co/datasets/kagvi13/hmp-cpec) |
| |
| ### Blog and Publications |
| |
| * π Blog (publications): [BlogSpot](https://hypercortex-mesh.blogspot.com/) |
| * π Blog (documentation): [BlogSpot](https://hmp-docs.blogspot.com/) |
| * π Blog (documentation): [HashNode](https://hmp-docs.hashnode.dev/) |
| |
| --- |
| |
| ## π License |
| |
| Licensed under [GNU GPL v3.0](LICENSE) |
| |
| --- |
| |
| ## π€ Join the Mesh |
| |
| Welcome to HyperCortex Mesh. Agent-Gleb is already inside. π |
| We welcome contributors, testers, and AI agent developers. |
| To join: fork the repo, run a local agent, or suggest improvements. |
| |
| --- |
| |
| ## π Related Research Projects |
| |
| ### π Comparison: HMP vs Hyper-Cortex |
| |
| > π‘ Hyper-Cortex and HMP are two independent projects that conceptually complement each other. |
| > They address different but mutually supportive tasks, forming a foundation for distributed cognitive systems. |
| |
| [**Full comparison β**](docs/HMP_HyperCortex_Comparison.md) |
| |
| **HMP (HyperCortex Mesh Protocol)** is the transport and network layer for connecting independent agents, exchanging messages, knowledge, and states in a mesh network. |
| **[Hyper-Cortex](https://hyper-cortex.com/)** is the cognitive layer of thought organization, allowing agents to run parallel reasoning threads, compare them with quality metrics, and merge them via consensus. |
| |
| They solve different but complementary problems: |
| - HMP ensures **connectivity and scalability** (long-term memory, initiative, data exchange). |
| - Hyper-Cortex ensures **thinking quality** (parallelism, hypothesis diversification, consensus). |
| |
| Together, these approaches enable **distributed cognitive systems** that not only exchange information but also reason in parallel streams. |
| |
| --- |
| |
| ### π Comparison: HMP vs EDA |
| |
| > π‘ HMP (HyperCortex Mesh Protocol) and EDA (Event Driven Architecture) operate at different levels but can complement each other. |
| > EDA ensures **transport and scalability** (delivery of events and data), while HMP ensures **cognition and meaning** (structuring, filtering, consensus). |
| |
| [**Full comparison β**](docs/HMP_EDA_Comparison.md) |
| |
| They solve different but complementary problems: |
| - **EDA** provides a robust backbone for delivering events and data streams. |
| - **HMP** structures, validates, and integrates knowledge into distributed cognitive systems. |
| |
| Together, they create resilient and adaptive multi-agent systems that can **both exchange information quickly and reason about it meaningfully**. |
| |
| --- |
| |
| ### π€ Integration: HMP & OpenCog Hyperon |
| |
| > π§ π₯ **Project Spotlight: OpenCog Hyperon** β one of the most comprehensive open AGI frameworks (AtomSpace, PLN, MOSES). |
| |
| For integration with OpenCog Hyperon, see [HMP\_Hyperon\_Integration.md](docs/HMP_Hyperon_Integration.md) |
| |
| --- |
| |
| ### π§© Other Systems |
| |
| | π Project | π§ Description | |
| | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | |
| | π§ π₯ [**OpenCog Hyperon**](https://github.com/opencog) | π¬π₯ Symbolic-neural AGI framework with AtomSpace and hypergraph reasoning (AtomSpace). | |
| | π€ [AutoGPT](https://github.com/Torantulino/Auto-GPT) | π οΈ LLM-based autonomous agent framework. | |
| | π§ [BabyAGI](https://github.com/yoheinakajima/babyagi) | π οΈ Task-driven autonomous AGI loop. | |
| | βοΈ [SkyMind](https://skymind.global) | π¬ Distributed AI deployment platform. | |
| | π§ͺ [AetherCog (draft)](https://github.com/aethercog) | π¬ Hypothetical agent cognition model. | |
| | πΎ SHIMI | ποΈ Hierarchical semantic memory with Merkle-DAG synchronization. | |
| | π€ DEMENTIA-PLAN | π Multi-graph RAG planner with metacognitive self-reflection. | |
| | π TOBUGraph | π Personal-context knowledge graph. | |
| | π§ π [LangChain Memory Hybrid](https://github.com/langchain-ai/langchain) | π Vector + graph long-term memory hybrid. | |
| | βοΈ [FIPA-ACL / JADE](https://www.fipa.org/specs/fipa00061/) | π€ Standard multi-agent communication protocols.| | |
| |
| ### π See also / Π‘ΠΌΠΎΡΡΠΈΡΠ΅ ΡΠ°ΠΊΠΆΠ΅: |
| * [`AGI_Projects_Survey.md`](docs/AGI_Projects_Survey.md) β extended catalog of AGI and cognitive frameworks reviewed as part of HMP analysis. |
| * ["On the Path to Superintelligence: From Agent Internet to Gravity Coding"](https://habr.com/ru/articles/939026/) β a recent overview of AI research (July 2025) |
| |
| --- |
| |
| ### ποΈ Legend of Annotations: |
| |
| * π¬ β research-grade |
| * π οΈ β engineering |
| * π₯ β particularly promising project |
| |
| *AGI stack integrating symbolic reasoning, probabilistic logic, and evolutionary learning. Widely regarded as one of the most complete open AGI initiatives.* |
| * π§ β advanced symbolic/neural cognitive framework |
| * π€ β AI agents |
| * π§ β human-AI interaction |
| * βοΈ β infrastructure |
| * π§ͺ β experimental or conceptual |
| |
| --- |
| |
| > β‘ [AI friendly version docs (structured_md)](structured_md/index.md) |
| |
| |
| --- |
| > β‘ [AI friendly version docs (structured_md)](index.md) |
| |
| |
| ```json |
| { |
| "@context": "https://schema.org", |
| "@type": "Article", |
| "name": "HyperCortex Mesh Protocol (HMP)", |
| "description": " # HyperCortex Mesh Protocol (HMP) | π Languages | π¬π§ [EN](README.md) | π©πͺ [DE](README_de.md) | π«π· ..." |
| } |
| ``` |
| |