Offline fault diagnosis assistant for humanoid robots (AgiBot X2 Ultra and Unitree G1) — drop in a log package, describe the symptom, and get a three-round reviewed diagnosis report. Every verified case feeds an experience library that makes the next diagnosis better.
CI License: Apache-2.0 Python 3.10+
Docs: Quickstart · Spec · 中文文档 · Changelog · Sources
A humanoid robot falls over in the field. Someone hands you a 1 GB tar of
logs. manastone-diag turns that into a diagnosis:
- Ingest —
log_ingestorstreams.log/.yaml/.json/.mcap/.atopfiles into a compact structured event stream (privacy-stripped,1 GB safe).
- Match —
fault_librarymatches symptoms and log keywords against per-robot fault rules (Chinese + English), and runs temporal causal inference over the event timeline. - Review — an LLM agent walks you through a three-round review (data collection → analysis → report), pausing for your confirmation at each round.
- Learn — every diagnosis is archived; field verification feedback updates the experience library (sharded storage, WAL-protected; measured: 15 ms in-process search over 5,000 entries).
The heavy lifting is deterministic Python — the LLM orchestrates and explains. Everything runs locally; no network access is required for diagnosis.
Install from PyPI (tools only — no bundled examples or agent assets):
pip install manastone-diag
manastone-diag-verify # optional: run bundled verificationFor the full repository (sample incidents, examples/, and .pi/ agent setup):
git clone https://github.com/zengury/manastone-diag.git cd manastone-diag pip install -r requirements.txt # Sanity check (should end with all green) python3 tools/verify_all.py # Try the bundled sample incident (a stand-mode fall) python3 tools/log_ingestor.py examples/sample-incident --robot agibot_x2 --output /tmp/diag-out
Five-minute walkthrough with the sample incident: docs/QUICKSTART.md.
The project is agent-framework-agnostic: the assets are the knowledge base
(knowledge/), the tool chain (tools/), and the diagnosis playbook
(AGENTS.md). Any coding-agent framework that reads project instructions and
can run shell commands works:
- pi —
./install.shinstalls pi and amanastone-diaglauncher;.pi/ships skill files and the system prompt. - Others (Hermes, Claude Code, ...) — point the agent at the repo root;
AGENTS.mdcontains the full three-round diagnosis procedure.
| Source | Formats | Notes |
|---|---|---|
| Text logs | .log (incl. sliced .log_N), .txt |
fall detection, mode switches, fault codes |
| ROS2 bags | .mcap |
sensor/joint time series; joint asymmetry analysis |
| Config / state dumps | .yaml, .json |
status snapshots, hardware config |
| System monitor | .atop |
CPU/memory (requires atop, via WSL on Windows) |
Per-robot YAML packs under tools/knowledge/:
| Robot | Pack | Fault rules |
|---|---|---|
| AgiBot X2 Ultra | agibot_x2/ |
11 |
| Unitree G1 | unitree_g1/ |
8 |
Each pack includes diagnostic_knowledge.yaml, event_patterns.yaml, causal_rules.yaml, and ontology stubs. CI validates each pack and the table above via scripts/check_knowledge.py.
Set MANASTONE_DATA_DIR to a shared folder to pool the experience library
across a team, or import a colleague's data folder with
python3 tools/experience_manager.py import <path> (GUI: tools/import_tool.py).
- Offline by design. Diagnosis consumes exported log packages only. The tool does not connect to robots, and it contains no code from the (private) Manastone runtime kernel. The only sanctioned online interface is the runtime's public ledger read API — unused in this version. See SOURCES.md.
- Robot-specific knowledge currently targets the AgiBot X2 Ultra. The schema and pipeline are robot-agnostic; see docs/SPEC.md to add another robot.
Licensed under the Apache License, Version 2.0 (Apache-2.0).
Copyright 2026 zengury. Modifications in v2.x (MCAP joint parsing, experience shards, archive dashboard) by thomastang237.