{"slug": "gliding-horse-a-rust-agent-os-with-cpu-like-memory-architecture", "title": "Gliding Horse – a Rust Agent OS with CPU-Like Memory Architecture", "summary": "A Rust-based AI agent operating system called Gliding Horse has been released, featuring a CPU-like hierarchical memory architecture and PDCA cycle orchestration for coordinating multiple agents. The open-source system, inspired by ancient Chinese engineering, includes a five-layer memory system with MESI coherence protocol and supports production interfaces through gRPC, HTTP, and MCP protocols.", "body_md": "**An Industrial-Grade AI Agent Operating System Built in Rust**\n\n*Inspired by Zhuge Liang's Wooden Ox and Gliding Horse — Ancient Ingenuity Meets Modern AI*\n\n[ English](/doiito/gliding_horse/blob/main/README.md) ·\n\n[·](/doiito/gliding_horse/blob/main/README.zh.md)\n\n**中文**\n\n**Design Detail →** An **AI agent operating system** that orchestrates multiple agents through the PDCA (Plan-Do-Check-Act) cycle. Think of it as the infrastructure layer that harnesses AI agents into a coordinated, auditable, and self-improving system — much like how Zhuge Liang's **Wooden Ox and Gliding Horse** revolutionized logistics by harnessing mechanical power across treacherous terrain.\n\n\"We don't just build agents; we build the\n\ninfrastructure that harnesses their collective intelligence.\"\n\n| Layer | Technology | Role |\n|---|---|---|\nCore Coordination (Rust) |\n`PDCA cycle` · `5W2H ontology` · `EventBus` |\nAgent orchestration & lifecycle |\nMemory System |\n`L0: Sled+Qdrant` · `L2: Oxigraph` · `MESI coherence` |\n5-layer hierarchical memory |\nData Bus |\n`JSON-LD 1.1` · `@id/@type/@context` · `Named Graphs` |\nUniversal interoperability |\nKnowledge Graph |\n`Oxigraph RDF` · `SPARQL 1.1` · `Code AST` |\nCross-subsystem unified store |\nSkill Graph |\n`RDF` · `7.5k LOC` · `Self-evolving` |\nDynamic cognitive network |\nPerception Engine |\n`10 triggers` · `Anomaly dedup` · `5W2H constraint check` |\nProactive monitoring |\nGateway |\n`gRPC` · `HTTP (OpenAI-compatible)` · `MCP` |\nProduction interface |\n\nIn the turbulent era of the Three Kingdoms (220–280 AD), the legendary strategist **Zhuge Liang** (诸葛亮), chancellor of the Shu Han state, faced a critical challenge: how to transport supplies efficiently through the treacherous mountain paths of Sichuan during his Northern Expeditions. Traditional wheeled carts struggled on narrow trails; human porters exhausted quickly.\n\nHis solution — the **Wooden Ox (木牛)** and **Gliding Horse (流马)** — were autonomous transport devices that could navigate difficult terrain with minimal human guidance. These mechanical wonders were not merely tools; they represented a paradigm shift — **autonomous systems that extended human capability**.\n\nJust as the Gliding Horse served as an **intelligent harness** for transporting supplies across impossible terrain, **Gliding Horse Agent OS** serves as an **intelligent harness for AI agents**:\n\n| Ancient Innovation | Modern Implementation |\n|---|---|\nAutonomous Transport |\nSelf-directing agent workflows |\nTerrain Adaptation |\nDynamic complexity handling (7 levels) |\nLoad Distribution |\nParallel agent execution |\nMinimal Guidance |\nProactive anomaly detection |\nMechanical Reliability |\nRust's memory safety guarantees |\n\n\"The wise adapt their methods to circumstances, just as water shapes its course according to the ground over which it flows.\"\n\n—Zhuge Liang\n\nThis ancient wisdom guides our design: **flexible orchestration that adapts to task complexity**, rather than rigid frameworks that force tasks into predefined molds.\n\nThe **Software Engineering Team** app demonstrates the full power of Gliding Horse — a federated architecture where multiple AI agents collaborate on real-world software engineering tasks.\n\n[\n](/doiito/gliding_horse/blob/main/assets/dashboard.JPG)*Center dashboard — project oversight, agent status, pipeline progress*\n\nProject lifecycle managementfrom req → design → code → review → deploy |\nMulti-stage SDLC pipelinewith real-time status tracking |\n\n[\n](/doiito/gliding_horse/blob/main/assets/vscode_plugin.JPG)*VS Code Plugin — chat panel, graph view, and task panel for real-time agent collaboration*\n\n```\nflowchart TB\n    subgraph VS[\"VS Code Plugin (TypeScript)\"]\n        direction LR\n        CHAT[\"Chat Panel\"]\n        GRAPH_V[\"Graph View\"]\n        TASK_P[\"Task Panel\"]\n    end\n\n    subgraph EDGE[\"Edge Daemon (Rust · axum)\"]\n        API_EDGE[\"API Server<br/>ws / chat / health\"]\n        AGENT_CORE[\"Agent Core<br/>SupervisorAgent · DoAgent · LLM Client\"]\n        DOCKER[\"Docker Sandbox<br/>Safe execution · Compile / Test\"]\n        SYNC_EDGE[\"Sync Layer<br/>Heartbeat · gRPC · JWT Auth\"]\n        GRAPH_EDGE[\"Graph Layer<br/>Local Store (sled) · Delta Sync\"]\n        \n        API_EDGE --- AGENT_CORE\n        AGENT_CORE --- DOCKER\n        API_EDGE --- SYNC_EDGE\n        AGENT_CORE --- GRAPH_EDGE\n    end\n\n    subgraph CTR[\"Center (Go · Gin)\"]\n        API_CTR[\"HTTP API<br/>/api/v1/* · /ws\"]\n        TEMPORAL[\"Temporal Workflow<br/>Orchestrator\"]\n        AGENT_MGR[\"Agent Manager<br/>Register · Heartbeat · Dispatch\"]\n        EXEC[\"Executors<br/>req → design → coding → review → test → cicd → deploy\"]\n        STORE_CTR[\"Store<br/>SQLite · gRPC Client · Graph Sync\"]\n        \n        API_CTR --- TEMPORAL\n        API_CTR --- AGENT_MGR\n        TEMPORAL --- EXEC\n        AGENT_MGR --- STORE_CTR\n    end\n\n    VS <-->|\"WebSocket / REST\"| EDGE\n    EDGE <-->|\"gRPC + REST\"| CTR\n```\n\n**Key Design Patterns:**\n\n**Center (Go)**: Workflow orchestration via Temporal, project CRUD, agent registry, graph sync** Edge (Rust)**: Local LLM execution, Docker sandbox, VS Code WebSocket bridge** VS Code Plugin**: Developer UI with real-time agent awareness\n\n**Gliding Code** is a terminal-based AI coding assistant that brings the power of Gliding Horse's knowledge graph and agent orchestration directly into your command line — no IDE required.\n\n[\n](/doiito/gliding_horse/blob/main/assets/gliding_code_kg.JPG)*Knowledge graph visualization — real-time entity relationships, code structure understanding, and cross-subsystem awareness powered by Oxigraph RDF*\n\n[\n](/doiito/gliding_horse/blob/main/assets/gliding_code.JPG)*Task completion interface — AI agent successfully analyzing and solving a programming task with full traceability*\n\nChoose your path — **download and run** the pre-built terminal AI assistant (zero dependencies), or **build from source** for the full Software Engineering Team.\n\nNo dependencies required. Just download, extract, and run:\n\n| Platform | Download |\n|---|---|\n| Linux (x86_64, musl) |\n`glidingcode-x86_64-unknown-linux-musl.tar.gz` |\n\n[(12.9 MB)](https://github.com/doiito/gliding_horse/releases)`glidingcode-aarch64-unknown-linux-musl.tar.gz`\n\n[(12.1 MB)](https://github.com/doiito/gliding_horse/releases)`glidingcode-aarch64-apple-darwin.tar.gz`\n\n[(11.6 MB)](https://github.com/doiito/gliding_horse/releases)`glidingcode-x86_64-pc-windows-msvc.zip`\n\n```\n# Linux / macOS\ntar xzf glidingcode-*.tar.gz\n./glidingcode --help\n\n# Windows (PowerShell)\nExpand-Archive glidingcode-x86_64-pc-windows-msvc.zip .\n.\\glidingcode.exe --help\n```\n\nAll Linux builds are\n\nfully statically linked(musl) — no runtime dependencies required.\n\nSet your API key and start using it:\n\n```\nexport DEEPSEEK_API_KEY=\"sk-...\"        # Linux / macOS\n# or\nset DEEPSEEK_API_KEY=\"sk-...\"            # Windows (cmd)\n# or\n$env:DEEPSEEK_API_KEY=\"sk-...\"           # Windows (PowerShell)\n\n# Alternatively, use any OpenAI-compatible provider:\nexport AGENT_OS_GATEWAY_API_KEY=\"sk-...\"\nexport AGENT_OS_GATEWAY_API_URL=\"https://your-endpoint/v1\"\n\n# Run an interactive session (Linux/macOS: ./glidingcode, Windows: .\\glidingcode)\n./glidingcode\n\n# Or run a one-shot task\n./glidingcode \"Explain how Rust's borrow checker works\"\n```\n\nBuild the complete multi-agent system from source (requires Rust + Go + Docker).\n\n**Rust** 1.75+ ·**Go** 1.25+ ·**Docker**·** Temporal Server**- LLM API key (OpenAI-compatible)\n\n```\ngit clone https://github.com/doiito/gliding_horse.git\ncd gliding_horse/apps/software_engineering_team\n\ncp center/config.yaml center/config.local.yaml\n# Edit your LLM keys, Temporal host, etc.\ncd center\ngo run ./cmd/server/...     # API server on :8080\ngo run ./cmd/worker/...     # Temporal worker\ncd edge/daemon\ncargo run -- daemon start   # Agent daemon on :7890\n```\n\nInstall the plugin from `edge/vscode/`\n\nand connect to the daemon — you now have an AI software engineering team at your fingertips.\n\n```\ncurl http://localhost:8080/api/v1/projects \\\n  -X POST -H \"Content-Type: application/json\" \\\n  -d '{\"name\":\"My Project\",\"description\":\"Build a microservice\"}'\n```\n\n-\n**Generalized PDCA — 7-Level Adaptive Execution**\n\nDynamically selects from 7 complexity levels (L0 instant → L5 recursive → L6 emergency) via 5W2H metadata. One engine handles everything from instant queries to multi-week projects — no rigid workflows. -\n**CPU Cache-Inspired Memory — 5 Layers + MESI Coherence**\n\nFirst-ever application of CPU cache coherence to multi-agent memory. L0 disk → L1 context → L2 Oxigraph RDF → L3 SPARQL projection. Intelligent prefetching reduces perceived latency by 90%. Solves context explosion and shared memory inconsistency. -\n**JSON-LD Universal Data Bus — W3C-Standard Interoperability**\n\n`@context`\n\nduck-typing eliminates field name conflicts between skills.`@id`\n\nenables zero-cost cross-agent entity merging.`@graph`\n\nnamed graphs allow conflict-free parallel writes. Turns interoperability hell into plug-and-play. -\n**Self-Evolving Skill Graph — Cognitive Network**\n\n7,500+ LOC dynamic network with 6 semantic link types (Prerequisite, Composition, Related, etc.). AA creates knowledge fragments and new links after each task.`/learn`\n\nand`/reduce`\n\nmechanisms enable autonomous skill acquisition. -\n**Universal Knowledge Graph — Unified Cognitive Backbone**\n\nAll subsystems (skills, memories, tasks, code knowledge) share a single Oxigraph RDF store via named graphs, enabling cross-subsystem SPARQL joins. Code ASTs parsed by tree-sitter are automatically converted to RDF triples and linked into the same graph. A single`@id`\n\nensures consistent entity identity across all contexts — no silos, no duplication. -\n**5W2H Dimension-Level Audit — Precision Rollback**\n\nCA audits each of the 7 dimensions independently. What/Why fail → re-analyze. How/Where fail → re-plan. When/HowMuch fail → conditional pass. No more black-box \"PASS/FAIL\" — you know exactly what went wrong. -\n**Proactive Perception Engine — Catch Failures Before They Happen**\n\n10 execution triggers with 60-second anomaly deduplication. Monitors deadline violations, budget overruns (>80% tokens), role mismatches, environment conflicts. Auto-escalates to human when needed. -\n**Micro-Tool System — Tame Large Outputs**\n\nResults >8KB auto-generate conversational micro-tools (e.g., \"search_in_results\"). Transforms unwieldy 50KB+ outputs into interactive, queryable artifacts within the LLM context. -\n**MCP Integration — One Protocol to Connect Them All**\n\nStandard Model Context Protocol connects GitHub, Slack, Jira, and any MCP-compatible server. Dynamic tool discovery at runtime. No more custom integrations for every external service. -\n**Checkpoint & Recovery — Crash-Proof Long-Running Tasks**\n\nSession state snapshots at critical points. Full restoration on crash without context loss. Enables hour/day-long agent tasks and post-mortem replay debugging. -\n**Center + Edge Federation — Local Autonomy, Global Orchestration**\n\nGo Center handles workflow orchestration (Temporal), project management, agent registry. Rust Edge runs local LLM execution with Docker sandbox. VS Code Plugin provides real-time developer awareness. No single point of failure.\n\n**Core OS** (ongoing):\n\n- Enhanced MCP tool ecosystem and dynamic discovery\n- Multi-model routing optimization with cost-aware scheduling\n- Knowledge graph query performance and scale improvements\n- Template engine with versioned prompt inheritance\n- Rich event system with fine-grained subscription filters\n\n**Application Layer** (upcoming):\n\n**Q3 2026**: Native web dashboard for agent monitoring and task management; Python/TypeScript SDK for easier integration** Q4 2026**: Kubernetes deployment operator; Multi-turn conversation memory compression; Skill marketplace prototype** 2027**: Distributed agent mesh across Edge nodes; Multi-modal agent support (vision, audio); Community plugin registry\n\n| Operation | Latency | Throughput |\n|---|---|---|\n| L2 Node Write (Oxigraph) | ~2ms | 500 ops/sec |\n| L3 SPARQL Projection | ~15ms | 66 ops/sec |\n| L0 Sled KV Read | ~1ms | 1000 ops/sec |\n| Agent ReAct Turn | 1-5s | 0.2-1 turns/sec |\nIdle Memory |\n~200MB | scales with tasks |\n\n**Design Detail**→·`docs/DESIGN_DETAIL.md`\n\n(中文)`docs/DESIGN_DETAIL.zh.md`\n\n**Core Design Philosophy**→·`docs/CORE_DESIGN_PHILOSOPHY.md`\n\n(中文)`docs/CORE_DESIGN_PHILOSOPHY.zh.md`\n\n**gRPC Proto**→`proto/pdca_core.proto`\n\n**Specs**→`spec/`\n\nWe welcome contributions from the community!\n\n**🐛 Report bugs**:[GitHub Issues](https://github.com/doiito/gliding_horse/issues)**💡 Propose ideas**:[GitHub Discussions](https://github.com/doiito/gliding_horse/discussions)**🔀 Submit PRs**: Fork → feature branch → PR against`main`\n\n```\ngit checkout -b feat/my-feature\n# Make your changes\ncargo fmt && cargo clippy  # Keep code clean\ncargo test                 # Ensure nothing breaks\ngit commit -am 'Add my feature'\ngit push origin feat/my-feature\n```\n\nAll contributors are expected to adhere to our [Code of Conduct](/doiito/gliding_horse/blob/main/docs/CODE_OF_CONDUCT.md).\n\nMIT License — see [LICENSE](/doiito/gliding_horse/blob/main/LICENSE).", "url": "https://wpnews.pro/news/gliding-horse-a-rust-agent-os-with-cpu-like-memory-architecture", "canonical_source": "https://github.com/doiito/gliding_horse", "published_at": "2026-05-29 06:20:47+00:00", "updated_at": "2026-05-29 06:46:58.469716+00:00", "lang": "en", "topics": ["ai-agents", "ai-infrastructure", "ai-tools"], "entities": ["Gliding Horse", "Zhuge Liang", "Wooden Ox", "Rust", "Qdrant", "Oxigraph", "Sled", "MESI"], "alternates": {"html": "https://wpnews.pro/news/gliding-horse-a-rust-agent-os-with-cpu-like-memory-architecture", "markdown": "https://wpnews.pro/news/gliding-horse-a-rust-agent-os-with-cpu-like-memory-architecture.md", "text": "https://wpnews.pro/news/gliding-horse-a-rust-agent-os-with-cpu-like-memory-architecture.txt", "jsonld": "https://wpnews.pro/news/gliding-horse-a-rust-agent-os-with-cpu-like-memory-architecture.jsonld"}}