MoonHub

module
v0.0.0-...-8155ea7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 2, 2026 License: GPL-2.0, GPL-3.0

README

MoonHub

[!NOTE] Acknowledgments

This project was inspired by the feature integration of TinyClaw and the lightweight design of PicoClaw, and continues to develop in its own unique direction.

Documentation Index (plugins, learning, compactor, SHIELD, memory, delegation, etc.): docs/README.md.

Changelog: CHANGELOG.md — Project updates and release notes

Companion App: ../MoonHub-PWA/README.md — installable PWA for pairing, chat, Space, and settings

中文文档

Introduction

Your AI assistant — instant, alive, connected.

MoonHub is an AI assistant that works out of the box. No technical background needed — plug in, pair, and start talking. Your data stays on your device. Your AI adapts to you.

Design Philosophy
Principle Description
Instant Zero learning curve. From power-on to conversation in 3 steps — no terminals, no configs, no technical background.
Alive Interfaces that adapt to you. AI doesn't just output text — it builds dashboards, trackers, and tools on demand. Your idea is the blueprint.
Connected Agents are social. Add friends, approve access, share selectively — like a social network for AI.
Core Features

🤖 Agent Social Network

Agents can add each other as friends — just like adding a contact in any messaging app. Send a friend request, get approved, and now your agents can talk. You decide what's shared and what stays private. Each Agent has a cryptographic identity, and communication is encrypted end-to-end. It's like building your own AI social circle.

  • Friend System — Send requests, accept or reject, revoke when needed. Your agent only talks to agents you trust.
  • Zone-based Access Control — Three-tier data architecture: Private (only you), Shared (friends can read), Public (anyone can read). You decide what each friend can see.
  • Local-first, Cloud-optional — Agents on the same network connect directly. Need to reach someone across the internet? An optional cloud relay bridges the gap — no port forwarding required.

[!IMPORTANT] The agent social network is under active development. Friend management and zone-based access control are implemented. Task delegation and file transfer between agents are defined in the protocol but not yet available in handlers. Stay tuned for updates.

🎨 Dynamic UI Generation

Say goodbye to traditional Agents that "only output text." MoonHub can generate visual interactive interfaces in real-time based on your needs — financial dashboards, task managers, data visualizations — everything adapts on demand. You describe the idea, the Agent builds it for you.

📱 Dedicated Application

Users interact with the device through a dedicated app. Currently provided as a PWA for quick installation and offline use; native mobile apps are coming soon to cover more platforms and use cases. Frontend repo: ../MoonHub-PWA/README.md.

What Can You Do?

MoonHub adapts to your life, not the other way around. Here are some ways people use it:

Scenario Description
Personal Productivity Manage schedules, track habits, organize notes. AI remembers your preferences and gets better over time.
Smart Home Connect your devices — control lights, AC, curtains with a single message. AI learns your daily routines.
Learning Companion Homework help, language practice, knowledge Q&A. Adaptive memory tracks your learning progress.
Creative Workspace Describe an idea, AI builds dashboards, charts, and management tools for you. Need it? Create it.
Team Collaboration Multiple Agents, each with a role — one gathers info, another analyzes data — all working together for you.
Remote Manager Check home status, receive alerts, and control devices from anywhere through your phone.

Your imagination is MoonHub's only boundary.

Quick Start
  1. Power On — Device automatically creates a WiFi hotspot (MoonHub-XXXX)
  2. Configure Network — Connect to the hotspot, access the setup page, configure WiFi and set authorization code
  3. Install PWA — After configuration, follow the guide to install the PWA app
  4. Start Using — PWA automatically scans for local devices, enter the authorization code to start chatting, managing, and configuring

Features

Implemented
Planned
  • Wasm tool engine — Execute engine: wasm dynamic tools (wazero or equivalent); schema path is already shipped
  • Cross-agent task delegation — Delegate tasks to friend agents via MHP protocol (types defined, handlers in progress)
  • Cross-agent file transfer — Send files between friend agents with zone-based access checks (types defined, handlers in progress)
  • Native APP — Native mobile applications for iOS and Android platforms
Completed (click to expand)
  • Self-Improving — Behavioral pattern detection that makes the agent better with every interaction. It grows with you.Implemented
  • Plugin Architecture — Channels, providers, and tools are all plugins. The core stays tiny — everything else is extensible.Implemented
  • Context Compactor — 4-layer context compaction pipeline with rule-based pre-compression, deduplication, LLM summarization, and tiered summaries.Implemented
  • SHIELD.md Anti-Malware — Runtime SHIELD.md enforcement engine with threat parsing, pattern matching, and built-in anti-malware protection.Implemented
  • Delegation System — Autonomous sub-agent orchestration with self-improving role templates, blackboard collaboration, and adaptive timeouts.Implemented (opt-in; see pkg/delegation/docs/ and docs/implementation/delegation-status.md)
  • Smart Routing — 4-tier query classifier that routes simple queries to cheap models and complex ones to powerful ones, cutting LLM costs.Implemented (see pkg/routing/docs/ and docs/implementation/routing-status.md)
  • Inter-Agent Comms — Lightweight pub/sub event bus for real-time inter-agent communication with wildcard subscriptions and bounded history.Implemented (delegation Intercom in pkg/delegation/intercom.go; enabled with delegation)
  • Device Provisioning — Zero-config WiFi setup, recovery, factory reset, provisioning UI.Implemented (launcher opt-in; see pkg/provisioning/docs/README.md and docs/implementation/provisioning-status.md)
  • PWA Frontend — Companion PWA for discovery, pairing, chat, Space, and settings.Implemented (LAN APIs documented in web/backend/api/README.md; app repo MoonHub-PWA.)
  • Dynamic UI Generation — Real-time visual components from AI (dashboards, Space, chat cards).Implemented (schema phase: pkg/dynamictools/docs/README.md; Wasm execution still planned.)

Directories

Path Synopsis
cloud
directory
cloud/directory/cache.go
cloud/directory/cache.go
relay
cloud/relay/auth.go
cloud/relay/auth.go
cmd
directory-service command
cmd/directory-service/main.go
cmd/directory-service/main.go
moonhub command
relay command
cloud/relay/main.go
cloud/relay/main.go
pkg
agent
Package agent provides the agent loop and integration for MoonHub
Package agent provides the agent loop and integration for MoonHub
agentidentity
Package agentidentity provides cryptographic agent identity for MoonHub.
Package agentidentity provides cryptographic agent identity for MoonHub.
api
bus
constants
Package constants provides shared constants across the codebase.
Package constants provides shared constants across the codebase.
delegation
Package delegation implements the sub-agent delegation system with intercom.
Package delegation implements the sub-agent delegation system with intercom.
devices
Package devices provides device pairing and management for MoonHub.
Package devices provides device pairing and management for MoonHub.
fileutil
Package fileutil provides file manipulation utilities.
Package fileutil provides file manipulation utilities.
identity
Package identity provides unified user identity utilities for MoonHub.
Package identity provides unified user identity utilities for MoonHub.
mcp
mdns
Package mdns provides mDNS service discovery for MoonHub devices.
Package mdns provides mDNS service discovery for MoonHub devices.
protocol/mhp
Package mhp implements the MoonHub Protocol for agent-to-agent communication.
Package mhp implements the MoonHub Protocol for agent-to-agent communication.
provisioning
Package provisioning provides device provisioning and network management for MoonHub devices, enabling "plug-and-play" zero-configuration setup.
Package provisioning provides device provisioning and network management for MoonHub devices, enabling "plug-and-play" zero-configuration setup.
routing
Package routing provides intelligent model routing based on message complexity.
Package routing provides intelligent model routing based on message complexity.
shield
Package shield provides runtime threat evaluation and enforcement for MoonHub.
Package shield provides runtime threat evaluation and enforcement for MoonHub.
social
Package social provides social/communication primitives for MoonHub.
Package social provides social/communication primitives for MoonHub.
transport
pkg/transport/cloud.go
pkg/transport/cloud.go
utils
Package utils provides shared, reusable algorithms.
Package utils provides shared, reusable algorithms.
zones
Package zones provides data partition management for MoonHub.
Package zones provides data partition management for MoonHub.
web
backend command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL