[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-82843":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":16,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":18,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":21,"hasPages":21,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":24,"readmeContent":25,"aiSummary":26,"trendingCount":15,"starSnapshotCount":15,"syncStatus":27,"lastSyncTime":28,"discoverSource":29},82843,"Anima","Fullive-AI\u002FAnima","Fullive-AI","Make Every Hardware Intelligent — an open-source Agent OS for hardware intelligence","",null,"Python",591,14,1,0,368,475,102,77.53,"Apache License 2.0",false,"main",[],"2026-06-12 04:01:39","\u003Cdiv align=\"center\">\n  \u003Cimg src=\"docs\u002Fimages\u002FAnima Logo.svg\" alt=\"Anima logo\" width=\"320\" \u002F>\n  \u003Ch1>\u003C\u002Fh1>\n  \u003Cp>\u003Cstrong>Make every hardware intelligent\u003C\u002Fstrong>\u003C\u002Fp>\n  \u003Cp>An open-source Agent OS for hardware intelligence.\u003C\u002Fp>\n\n  [English](.\u002FREADME.md) | [中文](.\u002FREADME.zh-CN.md)\n  \u003Cbr\u002F>\u003Cbr\u002F>\n\n  [![License: Apache-2.0](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-Apache--2.0-blue.svg)](.\u002FLICENSE)\n  ![Python](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPython-3.11--3.13-blue)\n  ![FastAPI](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FFastAPI-Backend-009688?logo=fastapi)\n  ![React](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FReact-Dashboard-61DAFB?logo=react)\n  ![LangGraph](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLangGraph-Agent%20Brain-purple)\n  ![MIoT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FXiaomi%20MIoT-Supported-orange)\n\u003C\u002Fdiv>\n\n\u003Cbr\u002F>\n\n**Anima** is an open-source Agent OS for intelligent hardware. Its goal is not to build yet another device control panel, but to give home hardware perceptive, decision-making, learning, and extensible AI capabilities.\n\nThe name **Anima** comes from Latin and means \"soul.\" It reflects the project's original idea: today's smart hardware already has sensors, connectivity, and actuation, but most devices still wait passively for commands. Anima connects these devices to a runnable intelligence center, so lights, air conditioners, humidifiers, air purifiers, speakers, and future devices can understand the environment, the user, and each other.\n\n> Anima's vision: move every piece of hardware from a \"connected device\" to a collaborative intelligent agent.\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\"docs\u002Fimages\u002Fbedroom.svg\" alt=\"Anima Dashboard Bedroom Design\" width=\"100%\" \u002F>\n\u003C\u002Fdiv>\n\n## What Is Anima\n\nAnima can be understood as an intelligent hardware Agent Runtime running inside your local network:\n\n- It discovers devices, maintains device state, and controls real hardware through adapters.\n- It maintains long-term Memory and learns from explicit preferences and repeated behavior.\n- It uses an LLM Brain to read the environment, user intent, historical memory, and skill knowledge, then plan actions.\n- It packages domain knowledge for each device type as a Skill, so decisions are not just \"on\u002Foff\" but aligned with context, comfort, and safety boundaries.\n- It provides a Dashboard, REST API, and CLI so you can observe, debug, control, and extend the whole system.\n\nAnima currently supports Mi Home \u002F MIoT devices. More hardware protocols will be added over time, and contributions from the open-source community are welcome.\n\n---\n\n## Why Anima\n\n\u003Cdiv align=\"center\">\n\n![Zero config](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FZero%20config-Auto%20discovery-0A7EA4?style=for-the-badge)\n![AI skills](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FAI%20skills-Per%20device-1B5E20?style=for-the-badge)\n![Memory system](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FMemory%20system-Learns%20your%20habits-B71C1C?style=for-the-badge)\n![LLM brain](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLLM%20Brain-OpenAI%20API%20compatible-4A148C?style=for-the-badge)\n![Skill system](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FSkill%20system-Extensible-0D47A1?style=for-the-badge)\n![Dashboard](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDashboard-Realtime%20visibility-6A1B9A?style=for-the-badge)\n\n\u003C\u002Fdiv>\n\n> [!TIP]\n> Most smart-home systems ask, \"What sensors do you need?\" Anima asks, **\"What do you have? I'll use it.\"** It discovers your devices automatically, loads domain knowledge for each device, and starts making intelligent decisions from day one.\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Q: Do I need to configure devices manually?\u003C\u002Fstrong>\u003C\u002Fsummary>\n\n**A:** No. Anima scans the local network through the corresponding adapter protocols. For Xiaomi \u002F Mi Home devices, one QR login can automatically obtain device tokens without manually entering IP lists or extracting tokens.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Q: Is it just a fancy switch controller?\u003C\u002Fstrong>\u003C\u002Fsummary>\n\n**A:** Far from it. Core device types have dedicated **Skills**: domain knowledge packages that include comfort models, occupancy awareness, cross-device coordination rules, and preference learning. Your humidifier understands seasonal adjustments and AC interaction; your lights can follow circadian lighting patterns.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Q: How does it learn my preferences?\u003C\u002Fstrong>\u003C\u002Fsummary>\n\n**A:** Anima maintains a memory system with `preferences.md`, normalized learned profiles per device type, and extracted topic memories. The Brain incrementally extracts preferences from interaction history and evolves behavior over time.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Q: Which LLM providers are supported?\u003C\u002Fstrong>\u003C\u002Fsummary>\n\n**A:** Any OpenAI-compatible API service, including OpenAI, DeepSeek, Doubao, Anthropic through a proxy, and local Ollama-compatible endpoints. Set `ANIMA_LLM_API_KEY`, and optionally `ANIMA_LLM_BASE_URL`.\n\n\u003C\u002Fdetails>\n\n---\n\n## System Architecture\n\nAnima's overall runtime flow is driven by user requests, device discovery, sensor updates, scheduled tasks, and device actions. After signals enter Anima Core, the Brain combines device state, Memory, and Skill context to understand and plan. During execution, Skills convert decisions into structured actions, and Adapters map those actions to concrete hardware protocols, completing real device control and feedback recording.\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\"docs\u002Fimages\u002Farchitecture.svg\" alt=\"Anima Overall Architecture\" width=\"100%\" \u002F>\n\u003C\u002Fdiv>\n\n---\n\n## Core Highlights\n\n### 1. Brain: Central Decision Layer\n\nThe Brain is Anima's intelligence center. It merges user conversations, device state, environment signals, memory, and skill capabilities into executable plans.\n\nThe current Brain supports:\n\n- LangGraph-based planner \u002F executor flows\n- Unified chat entrypoint at `\u002Fapi\u002Fchat`\n- Scheduled brain ticks for proactive environment checks and automation decisions\n- Context construction before skill execution\n- State verification and history writes after actions\n- OpenAI-compatible LLM backends\n\nThe Brain's purpose is not to let an LLM control devices freely. It makes decisions within explicit skill boundaries, device capabilities, and safety rules.\n\n### 2. Skill: The Smallest Unit of Device Intelligence\n\nA Skill in Anima is not a simple function or a plain prompt. It is a device domain knowledge package, typically including:\n\n```text\nSKILL.md              # skill metadata, supported devices, and operating rules\nreferences\u002F\n  knowledge.md        # domain knowledge\n  decide.md           # single-decision prompt\n  learn.md            # long-term learning prompt\nscripts\u002F\n  actions.py          # structured action execution entrypoint\n```\n\nBuilt-in Skills include:\n\n| Skill | Purpose |\n|---|---|\n| `light` | Light control, brightness, color temperature, circadian lighting |\n| `humidifier` | Humidity comfort ranges, seasonal factors, AC interaction |\n| `air_conditioner` | Temperature control, comfort and energy balance |\n| `air_purifier` | Air quality, purification mode, quiet sleep strategy |\n| `speaker` | Audio playback, stop playback, quiet-hour protection |\n| `coordinator` | Cross-device coordination |\n| `device_discovery` | Device discovery, Mi Home QR login, device activation |\n| `skill_creator` | Generate custom skills from natural-language requirements |\n\nYou can also add your own skills under `skills\u002Fcustom\u002F` so Anima can learn new device behaviors or home workflows.\n\nThe diagram below shows the full lifecycle of a Skill in Anima: device capabilities can enter the Skill Creator through automatic discovery or user definition, then be organized into the Skill Bank for the Brain to retrieve and select during planning. During execution, the Planner selects an appropriate Skill based on the current environment, device state, and Memory context. The Skill then converts high-level goals into structured actions and applies them to real devices through Adapters. Execution results flow back into Memory and learned profiles, making future decisions more aligned with user habits.\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\"docs\u002Fimages\u002Fskill system.png\" alt=\"Anima Skill System Architecture\" width=\"100%\" \u002F>\n\u003C\u002Fdiv>\n\nThis means a Skill in Anima is not a one-off function call. It is a device intelligence unit that can be created, registered, retrieved, executed, and improved through feedback. When adding a new device type, prefer extending Skills instead of hardcoding device policy into the Brain or an Adapter.\n\n### 3. Memory: Evidence-Based Long-Term Memory\n\nAnima's Memory system uses a layered design:\n\n```text\nL1 Core Identity\n  A minimal preference summary loaded on every request, such as preferences_summary.\n\nL2 Memory Directory\n  A memory directory for the planner, such as available learned profiles and memory topics.\n\nL3 Memory Detail\n  Detailed long-term memories retrieved by device type and task before skill execution.\n```\n\nThe diagram below shows where Memory sits inside the Anima runtime. The lower layer stores preferences, history, learned profiles, and topic memories as files. The middle Memory service reads, extracts, merges, and updates them. The upper layer exposes different memory granularities to the Brain and Skills through `get_planner_context()` and `get_skill_context(device_type)`. This lets the Planner avoid reading all history on every request: it first learns what memories exist, then loads details only when a device Skill is actually executed.\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\"docs\u002Fimages\u002Fmemory%20system.svg\" alt=\"Anima Memory System Architecture\" width=\"100%\" \u002F>\n\u003C\u002Fdiv>\n\nThis layered design lets Anima balance long-term learning with context control: L1 stays lightweight, L2 provides a directory, and L3 loads confirmed details only when needed. Execution results, user conversations, and device state continuously enter history, are extracted in the background into more stable long-term memories, and eventually influence future device decisions.\n\nThe current memory system supports:\n\n- `history.json` generating an `event_id` for each interaction\n- extracted memory stored with a standard schema\n- `claim_type` distinguishing explicit preferences, implicit preferences, routines, device aliases, constraints, and home context\n- `positive_evidence` \u002F `negative_evidence` recording evidence sources\n- `status` distinguishing `candidate`, `confirmed`, `rejected`, and `stale`\n- only confirmed memory entering skill decisions by default\n- learned profiles stored by device type in `learned.json`\n\n### 4. Adapter: Real Hardware Integration Layer\n\nAdapters convert Anima's structured actions into real device protocol calls.\n\nCurrently supported:\n\n- Xiaomi \u002F Mi Home \u002F MIoT device discovery\n- Xiaomi Cloud QR login for device lists and tokens\n- Local `ip + token` control for ordinary MIoT devices\n- Partial cloud playback support for Xiaomi speakers\n- Manual MIoT device addition\n- Device state refresh and action result reporting\n\nNote: ordinary MIoT command execution still depends on the device's currently reachable local IP and token. Xiaomi Cloud login is mainly used for discovery and token acquisition; it does not mean every device supports cloud remote control.\n\n## Features\n\n- **Automatic device discovery**: local network scanning, Xiaomi Cloud device sync, deduplication, and runtime registration.\n- **AI decision center**: the LLM Brain generates action plans from environment, devices, skills, and memory.\n- **Extensible Skill system**: each device type has independent knowledge, decision prompts, learning prompts, and action scripts.\n- **Long-term memory**: candidate memories are extracted from history and promoted to confirmed memory based on evidence.\n- **Preference learning**: learned profiles are generated per device type so future decisions better match user habits.\n- **Realtime Dashboard**: device list, environment state, chat control, settings, and memory debugging.\n- **REST API**: interfaces for devices, chat, settings, scanning, memory, and more.\n- **MIoT support**: Xiaomi \u002F Mi Home token acquisition, local control, and partial speaker cloud capabilities.\n- **Local-first**: the core runs on your machine and controls devices through the local network whenever possible.\n\n---\n\n## Quick Start\n\n### Requirements\n\n- Node.js >= 18\n- pnpm >= 8\n- Python >= 3.11\n- uv\n\n`pnpm install` installs Python dependencies through `uv sync`.\nTo control MIoT devices, run `uv sync --extra dev --extra miot --python 3.13`, or change `postinstall` to include `miot`.\n\n### Install and Run\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Ffulai-tech\u002FAnima.git\ncd Anima\npnpm install\npnpm dev\n```\n\nAfter startup, open:\n\n```text\nDashboard: http:\u002F\u002Flocalhost:3000\nBackend API: http:\u002F\u002Flocalhost:8080\nSwagger: http:\u002F\u002Flocalhost:8080\u002Fdocs\n```\n\n### Configure the LLM\n\nYou can configure it in `.env` or in the Dashboard settings page.\n\n```env\nANIMA_LLM_API_KEY=sk-xxx\nANIMA_LLM_MODEL=gpt-4o\nANIMA_LLM_BASE_URL=\nANIMA_LLM_DISABLE_THINKING=false\n```\n\nAnima uses an OpenAI-compatible API, so it can connect to OpenAI, DeepSeek, Doubao, Ollama-compatible endpoints, or other proxy services.\n\n### Connect Xiaomi Devices\n\nThe recommended path is Xiaomi QR login in the Dashboard:\n\n1. Open the Dashboard settings page.\n2. Go to the Xiaomi \u002F Mi Home configuration area.\n3. Generate a QR code.\n4. Scan it with the Mi Home app.\n5. Devices are synchronized automatically when Xiaomi Cloud returns tokens; devices without returned tokens can still be activated by manually entering a token.\n\nIf you already know a device IP and token, you can also add a MIoT device manually.\n\n---\n\n## Common Commands\n\n| Command | Description |\n|---|---|\n| `pnpm install` | Install frontend and backend dependencies |\n| `pnpm dev` | Start Dashboard, Backend, and local broker together |\n| `pnpm dev:frontend` | Start only the frontend |\n| `pnpm dev:backend` | Start only the backend |\n| `pnpm dev:broker` | Start only the local MQTT broker |\n| `pnpm build` | Build the frontend |\n| `uv run pytest tests\u002F -v` | Run tests |\n| `uv run ruff check .` | Run Python lint |\n\n---\n\n## Project Structure\n\n```text\nAnima\u002F\n├── 🧠 core\u002F                  # Backend runtime: API, brain, memory, devices\n│   ├── 🛣️  api\u002F             # FastAPI routes and HTTP endpoints\n│   ├── 🧭 brain\u002F            # Planner, executor, ReAct agent, skill loader\n│   ├── 🔎 devices\u002F          # Discovery orchestration and device registry\n│   ├── 📡 events\u002F           # Async EventBus and runtime signals\n│   ├── 🤖 llm\u002F              # OpenAI-compatible LLM runtime config\n│   ├── 🔊 media\u002F            # Xiaomi speaker playback support\n│   ├── 🗃️  memory\u002F          # Preferences, history, profiles, extracted memories\n│   ├── ⚙️  runtime\u002F         # Settings and persisted config\n│   └── ⚙️  main.py          # Application entrypoint\n├── 🔌 adapters\u002F             # Hardware protocol adapters\n│   └── 🏠 miot\u002F             # Xiaomi MIoT adapter\n├── ✨ skills\u002F               # Device intelligence packages\n│   ├── 🧩 system\u002F           # Built-in skills\n│   └── ✍️  custom\u002F          # User-defined skills\n├── 🖥️  dashboard\u002F           # React + Vite dashboard\n├── ✅ tests\u002F                # Automated tests\n├── 📚 docs\u002F                 # Design notes and implementation plans\n├── 💾 data\u002F                 # Local runtime data\n├── 📦 package.json          # Root pnpm scripts\n└── 🧰 pyproject.toml        # Python project config\n```\n\n---\n\n## API Overview\n\nThe backend runs at `http:\u002F\u002Flocalhost:8080` by default.\n\nCommon endpoints include:\n\n| Method | Endpoint | Description |\n|---|---|---|\n| `GET` | `\u002Fhealth` | Health check |\n| `GET` | `\u002Fapi\u002Fdevices` | Get the device list |\n| `POST` | `\u002Fapi\u002Fdevices\u002F{device_id}\u002Fcommand` | Send a command to a device |\n| `POST` | `\u002Fapi\u002Fdevices\u002Fadd` | Manually add a MIoT device |\n| `POST` | `\u002Fapi\u002Fdevices\u002F{device_id}\u002Factivate` | Activate a scanned device with a token |\n| `POST` | `\u002Fapi\u002Fchat` | Unified chat and task execution entrypoint |\n| `GET` | `\u002Fapi\u002Fenvironment` | Current aggregated environment state |\n| `POST` | `\u002Fapi\u002Fenvironment\u002Frefresh` | Refresh device state |\n| `POST` | `\u002Fapi\u002Fscan` | Trigger device scanning |\n| `GET` | `\u002Fapi\u002Fmemory` | Inspect memory, history, and learned profiles |\n| `GET` | `\u002Fapi\u002Fsettings` | Read settings |\n| `POST` | `\u002Fapi\u002Fsettings\u002Fllm\u002Fconfigure` | Configure the LLM |\n| `POST` | `\u002Fapi\u002Fsettings\u002Fxiaomi\u002Fqr\u002Fstart` | Start Xiaomi QR login |\n| `POST` | `\u002Fapi\u002Fsettings\u002Fxiaomi\u002Fqr\u002Fpoll` | Poll QR login status |\n\nFor the full API, open Swagger:\n\n```text\nhttp:\u002F\u002Flocalhost:8080\u002Fdocs\n```\n\n---\n\n## How to Extend\n\n### Add a Skill\n\nThe simplest extension path is to add a skill.\n\n```text\nskills\u002Fcustom\u002Fmy_skill\u002F\n├── SKILL.md\n├── references\u002F\n│   ├── knowledge.md\n│   ├── decide.md\n│   └── learn.md\n└── scripts\u002F\n    └── actions.py\n```\n\nA good skill should answer four questions:\n\n```text\n1. Which devices or scenarios does it apply to?\n2. What domain knowledge does it need?\n3. When should it act, and when should it no-op?\n4. What structured actions can it output?\n```\n\n### Add an Adapter\n\nAdapters integrate new hardware protocols. The core interface is small:\n\n```text\ndiscover()   # discover devices\nsubscribe()  # refresh or subscribe to state\nexecute()    # execute an action\n```\n\nYou can use `adapters\u002Fmiot\u002F` as a reference to implement new protocol adapters such as Matter, Home Assistant, BLE, HTTP API, or private device protocols.\n\n---\n\n## Current Status\n\nAnima is still early-stage, but it already has a complete runnable core loop:\n\n```text\ndevice discovery -> Brain planning -> Skill decision -> Adapter execution -> state verification -> History\u002FMemory learning\n```\n\nThe more mature parts today:\n\n- Core runtime\n- Dashboard\n- MIoT adapter\n- Skill framework\n- Memory extraction and learned profiles\n- Chat and REST API\n\nAreas still evolving:\n\n- More device protocol adapters\n- More complete remote-control strategies\n- Stronger memory retrieval and conflict handling\n- Skill marketplace \u002F community skills\n- Multi-user and permission models\n- More complete security policies and deployment experience\n\n---\n\n## Update Log\n\nThis section records Anima releases, architecture upgrades, and key capability evolution so developers can quickly understand the core changes at each stage.\n\n- 2026-06-01: Anima's first open-source version is released, providing the foundational Agent OS capabilities for intelligent hardware: local device discovery, MIoT device integration, LLM Brain decisions, Skill mechanism, long-term Memory system, and visual Dashboard.\n\n---\n\n## Contributing\n\nAnima welcomes different kinds of contributions:\n\n- Add new device adapters\n- Write or improve skills\n- Optimize Brain decision flows\n- Improve the Memory mechanism\n- Enhance the Dashboard experience\n- Add tests and documentation\n- Report real-device compatibility issues\n\nBefore contributing, you may want to read:\n\n- [CONTRIBUTING.md](.\u002FCONTRIBUTING.md)\n- [ARCHITECTURE_GUARDRAILS.md](.\u002FARCHITECTURE_GUARDRAILS.md)\n- [docs\u002Fplans\u002Fdesign.md](.\u002Fdocs\u002Fplans\u002Fdesign.md)\n\n---\n\n## Security Notes\n\nAnima connects to real devices and executes real actions. Please note:\n\n- Do not expose the Dashboard or API directly to the public internet.\n- Sensitive information such as Xiaomi tokens and LLM API keys should only be stored in trusted environments.\n- Establish clear permission boundaries before controlling devices in offices, public spaces, or shared homes.\n- Keep automation conservative, especially for high-risk devices such as door locks, security devices, and electrical power.\n\n---\n\n## License\n\nThis project is licensed under the Apache License 2.0.\nSee the [LICENSE](.\u002FLICENSE) file for details.\n\n\u003Cdiv align=\"center\">\n  \u003Cbr\u002F>\n  \u003Cp>\u003Cem>\u003Cstrong>Anima\u003C\u002Fstrong>\u003C\u002Fem>\u003C\u002Fp>\n  \u003Cp>\u003Cem>Make every hardware intelligent.\u003C\u002Fem>\u003C\u002Fp>\n\u003C\u002Fdiv>\n","Anima 是一个开源的智能硬件代理操作系统，旨在为家庭硬件提供感知、决策、学习和可扩展的AI能力。它通过适配器发现并控制设备，保持长期记忆，并使用LLM大脑来理解环境、用户意图和历史记忆以规划行动。每个设备类型的知识被封装成技能，使决策不仅限于简单的开关操作，而是根据上下文、舒适度和安全边界进行。Anima适用于智能家居场景，特别是那些希望通过更智能的方式管理如灯光、空调等设备的家庭或企业。目前支持小米智能家居\u002FMIoT设备，未来计划增加对更多硬件协议的支持。",2,"2026-06-11 04:09:23","CREATED_QUERY"]