[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-85157":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":8,"htmlUrl":8,"language":9,"languages":8,"totalLinesOfCode":8,"stars":10,"forks":11,"watchers":12,"openIssues":13,"contributorsCount":13,"subscribersCount":13,"size":13,"stars1d":13,"stars7d":13,"stars30d":13,"stars90d":13,"forks30d":13,"starsTrendScore":13,"compositeScore":14,"rankGlobal":8,"rankLanguage":8,"license":15,"archived":16,"fork":16,"defaultBranch":17,"hasWiki":16,"hasPages":16,"topics":18,"createdAt":8,"pushedAt":8,"updatedAt":19,"readmeContent":20,"aiSummary":8,"trendingCount":13,"starSnapshotCount":13,"syncStatus":21,"lastSyncTime":22,"discoverSource":23},85157,"inno-agent","hhyqhh\u002Finno-agent","hhyqhh",null,"TypeScript",60,11,3,0,36.24,"MIT License",false,"main",[],"2026-06-15 10:05:00","# Inno Agent\n\n> An open-source **personal learning agent** with a layered memory system, a proactive scheduler, multi-channel messaging, and a workspace-scoped Practice Lab — built on the [Pi coding-agent SDK](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@earendil-works\u002Fpi-coding-agent) **without modifying its kernel**.\n\n[![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-blue.svg)](.\u002FLICENSE)\n[![Node](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fnode-%3E%3D20.6.0-brightgreen.svg)](https:\u002F\u002Fnodejs.org)\n[![TypeScript](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FTypeScript-ESM-3178c6.svg)](https:\u002F\u002Fwww.typescriptlang.org\u002F)\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\".\u002Fdocs\u002Fassets\u002Fl2-wiki.png\" alt=\"Inno Agent — L2 wiki knowledge base and graph\" width=\"100%\" \u002F>\n\u003C\u002Fp>\n\nInno Agent is a single-learner companion that organizes long-term learning support into three explicit memory layers — an **L1 learner profile**, an **L2 native wiki knowledge base**, and **L3 session records with cross-conversation retrieval** — and wraps them with a learning loop: a cron scheduler, personal IM channels (Feishu \u002F QQ \u002F WeChat), and a Practice Lab with an in-browser terminal.\n\nIt ships in two forms that share the same `runtime\u002F` and `workspace\u002F` state:\n\n- **Terminal CLI** (`inno`) — a pure TUI agent, no HTTP.\n- **Web UI** (React 19 + Lit + Tailwind 4) — backed by a Node HTTP server with SSE streaming, terminal sessions, a workspace browser, the wiki graph, jobs, skills, and settings.\n\n> 📄 The design rationale and a full system walkthrough are described in the accompanying technical report, *\"Inno Agent: An Open-Source Personal Learning Agent with Layered Memory.\"*\n\n---\n\n## Why Inno Agent\n\nGeneral-purpose coding agents are optimized for open-ended, context-heavy software engineering, which pushes them toward the largest models and longest context windows. Education is a different optimization target: the tasks are more structured, and the value lies in **personalized explanation, misconception diagnosis, exercise generation, feedback, review scheduling, privacy, and low-latency continuous interaction**.\n\nInno Agent takes a different stance:\n\n- **Layered memory, not a flat chat summary.** Learner state, archived knowledge, and recent dialogue have different lifecycles, so each lives in its own layer with explicit boundaries enforced in the system prompt and storage layout.\n- **Durable facts go to tools, not replies.** Anything that affects future teaching is written to L1\u002FL2 via tools, so personalization decisions are evidence-driven and traceable.\n- **An open, correctable learner model.** The L1 profile is inspectable and editable by the learner; the system prompt forbids unevidenced labels.\n- **The SDK kernel is never modified.** All learning behavior is added through registered tools and a single extension hook (`createInnoExtension`), so the agent runtime stays upstream-compatible.\n\n---\n\n## Features\n\n- 🧠 **Three-layer memory**\n  - **L1 — Learner profile**: goals, knowledge states, misconceptions, and preferences, updated from structured learning events and summarized into a short context pack injected before each turn.\n  - **L2 — Native wiki**: human-readable, agent-queryable pages (sources, concepts, entities, analysis) with LLM-assisted summarization, entity\u002Fconcept linking, and PDF\u002FOffice\u002Fimage ingestion.\n  - **L3 — Session records + cross-conversation retrieval**: Pi-SDK session history, indexed into SQLite with threshold-gated lexical recall so relevant past conversations can be surfaced across sessions.\n- ⏰ **Proactive scheduler** — cron-driven background jobs created in natural language, runnable from the agent, the UI, or the cron daemon.\n- 💬 **Personal IM channels** — Feishu (native) plus QQ \u002F WeChat (bridge mode), with a unified dispatcher that pushes reminders back out.\n- 🧪 **Practice Lab** — a workspace-scoped web terminal (xterm.js over WebSocket) with run records the agent can read.\n- 🔌 **Pluggable providers** — any `openai-completions` or `anthropic-messages` endpoint (Anthropic, OpenAI, DeepSeek, Ollama, or a local model); switch models live in the UI.\n- 🖥️ **CLI and Web UI** — same runtime, same memory, same skills.\n- 🛡️ **Optional OS-level sandbox** — gate the agent's bash and file operations via [pi-sandbox](https:\u002F\u002Fgithub.com\u002Fcarderne\u002Fpi-sandbox).\n\n---\n\n## Requirements\n\n- **Node.js >= 20.6.0** (cross-conversation L3 retrieval uses the built-in `node:sqlite`, available on Node 22.5+; on older runtimes L3 recall degrades gracefully and the rest of the agent runs normally).\n- **npm** (workspaces are used; no extra package manager required).\n\n---\n\n## Quick Start\n\nNew here? Start with **[QUICKSTART.md](.\u002FQUICKSTART.md)** (5 minutes). The short version:\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fhhyqhh\u002Finno-agent.git\ncd inno-agent\n\nnpm install      # pulls the Pi SDK from npm\nnpm run build    # compiles backend + web\n\nmkdir -p runtime\u002Fconfig runtime\u002Fdata runtime\u002Fskills workspace\ncp config.example.json runtime\u002Fconfig\u002Fconfig.json\n# Edit runtime\u002Fconfig\u002Fconfig.json and set providers[*].apiKey\n\nnpm run server -- --home .\u002Fruntime --workspace .\u002Fworkspace --port 3000\n```\n\nOpen **http:\u002F\u002Flocalhost:3000**.\n\n---\n\n## Use Cases\n\nReal-world usage guides live in [`docs\u002Fuse-cases\u002F`](https:\u002F\u002Fgithub.com\u002Fhhyqhh\u002Finno-agent\u002Ftree\u002Fmain\u002Fdocs\u002Fuse-cases).\n\n| Guide | Description |\n|---|---|\n| [Skill Tutorial — Building a Workspace Agent](.\u002Fdocs\u002Fuse-cases\u002Fskill-tutorial.md) | Use `agent.md` and `.skills\u002F` to build a custom learning agent scoped to a workspace, with a concrete English study example |\n\n---\n\n## Run Modes\n\n**Web UI** (serves the API and the built frontend):\n\n```bash\nnpm run server -- --home .\u002Fruntime --workspace .\u002Fworkspace --port 3000\n```\n\n**CLI** (terminal agent, no HTTP):\n\n```bash\nnpm run start -- --home .\u002Fruntime --workspace .\u002Fworkspace\n```\n\n**Dev** (backend + Vite HMR on :5173, with `\u002Fapi` proxied to :3000):\n\n```bash\nnpm run dev:server     # backend\nnpm run web:dev        # frontend\n```\n\n**Sandbox** (OS-level isolation of bash\u002Ffile operations; requires `ripgrep`):\n\n```bash\nnpm run server:sandbox -- --home .\u002Fruntime --workspace .\u002Fworkspace --port 3000\n```\n\nThe included `restart-dev.sh` orchestrates both processes (build, start, stop, status, logs, smoke-test). Run `bash restart-dev.sh --help`.\n\n---\n\n## Configuration\n\n`runtime\u002Fconfig\u002Fconfig.json` (template: [`config.example.json`](.\u002Fconfig.example.json)):\n\n```json\n{\n  \"defaultProvider\": \"innospark\",\n  \"defaultModel\": \"claude-sonnet-4-6\",\n  \"providers\": {\n    \"innospark\": {\n      \"baseUrl\": \"https:\u002F\u002Fapi.example.com\",\n      \"api\": \"anthropic-messages\",\n      \"apiKey\": \"replace-me\",\n      \"models\": [{ \"id\": \"claude-sonnet-4-6\", \"name\": \"Claude Sonnet 4.6\" }]\n    }\n  },\n  \"server\": { \"port\": 3000 },\n  \"channels\": {\n    \"feishu\": { \"enabled\": false },\n    \"qq\":     { \"enabled\": false, \"mode\": \"bridge\", \"sidecarBaseUrl\": \"http:\u002F\u002F127.0.0.1:4318\" },\n    \"wechat\": { \"enabled\": false, \"mode\": \"bridge\", \"sidecarBaseUrl\": \"http:\u002F\u002F127.0.0.1:4319\" }\n  }\n}\n```\n\nEach provider has a `baseUrl`, an `api` (`openai-completions` or `anthropic-messages`), an `apiKey`, and a `models[]` list. The server hot-rewrites this file when you switch model in the UI.\n\n### Runtime path resolution\n\nBoth CLI and server resolve paths through `apps\u002Finno-agent\u002Fsrc\u002Fruntime.ts`. Precedence: **CLI flag > env var > `~\u002F.inno-agent\u002F...`**.\n\n| CLI flag                          | Env var                | Default                   |\n| --------------------------------- | ---------------------- | ------------------------- |\n| `--home`                          | `INNO_HOME`            | `~\u002F.inno-agent`           |\n| `--config`                        | `INNO_CONFIG_FILE`     | `\u003CconfigDir>\u002Fconfig.json` |\n| `--config-dir`                    | `INNO_CONFIG_DIR`      | `\u003Chome>\u002Fconfig`           |\n| `--data` \u002F `--data-dir`           | `INNO_DATA_DIR`        | `\u003Chome>\u002Fdata`             |\n| `--skills` \u002F `--skills-dir`       | `INNO_SKILLS_DIR`      | `\u003Chome>\u002Fskills`           |\n| `--workspace` \u002F `--workspace-dir` | `INNO_WORKSPACE_DIR`   | invocation CWD            |\n| `--port`                          | `INNO_PORT` (`config`) | `3000`                    |\n\n---\n\n## Repository Layout\n\n```text\napps\u002Finno-agent\u002F          Backend (CLI + HTTP server), TypeScript -> dist\u002F\napps\u002Finno-agent\u002Fweb\u002F      Frontend (React 19 + Lit + Tailwind 4 + Vite)\nruntime\u002F                  Local runtime state (config, data, skills) - gitignored\nworkspace\u002F                Default agent working directory - gitignored\n```\n\nThe Pi SDK packages (`@earendil-works\u002Fpi-ai`, `@earendil-works\u002Fpi-coding-agent`, `@earendil-works\u002Fpi-web-ui`) are pulled from npm.\n\n---\n\n## Architecture\n\nInno Agent is a single-user system with four layers: **user interfaces → application layer → Pi agent runtime → layered memory.**\n\n```text\nUser Interfaces      CLI · Web UI (React) · Feishu · WeChat · QQ\n        ↓\nApplication Layer    Channel adapters · HTTP API (SSE) · Memory orchestration\n                     Cron scheduler · Practice Lab · WebSocket terminal\n        ↓\nAgent Runtime        Pi AgentSession · registered tools · inno extension\n(Pi SDK, unmodified) General LLM provider  ──or──  distilled educational model\n        ↓\nLayered Memory       L1 learner profile · L2 native wiki · L3 session records\n```\n\n- **Agent core** — `@earendil-works\u002Fpi-coding-agent` provides the loop. Inno wraps it with `apps\u002Finno-agent\u002Fsrc\u002Fagent\u002Finno-extension.ts`, which registers providers and tools (L1 learner, L2 wiki, L3 recall, scheduler, practice lab) and a `before_agent_start` hook that injects the L1 context pack — and, when relevant, threshold-gated L3 recall — into the system prompt.\n- **L1 — learner memory** (`src\u002Fmemory\u002Flearner\u002F`): evidence-driven profile + event log, summarized into a `ContextPack` per turn.\n- **L2 — wiki memory** (`src\u002Fmemory\u002Fl2\u002F`): structured wiki pages with frontmatter, links, graph, summarizer, and document ingestion; exposed as agent tools and via `\u002Fapi\u002Fwiki\u002F*`.\n- **L3 — session memory** (`src\u002Fmemory\u002Fl3\u002F` + Pi `SessionManager`): the SDK owns session JSONL files; Inno layers a SQLite index (`node:sqlite` + FTS5) on top for cross-conversation recall, surfaced both automatically (above a relevance threshold) and via the `l3_recall` tool.\n- **Scheduler** (`src\u002Fscheduler\u002F`): cron jobs persisted to `jobs.json` + `runs.jsonl`; runnable from the agent (`run_scheduled_job`), the UI, or the daemon.\n- **Channels** (`src\u002Fchannels\u002F`): `ChannelRegistry` with Feishu (and bridge-mode QQ \u002F WeChat) so reminders can be pushed back out.\n- **HTTP server** (`src\u002Fserver.ts`): plain Node `http.createServer` with SSE for chat streaming and WebSocket for the in-browser terminal.\n- **Web UI** (`web\u002Fsrc\u002F`): React 19 + Lit + Tailwind 4. State lives in framework-agnostic `EventEmitter` stores under `web\u002Fsrc\u002Fstores\u002F`; REST\u002FSSE calls in `web\u002Fsrc\u002Fapi\u002F`.\n\nThe backend API route table and runtime details are in [`apps\u002Finno-agent\u002FREADME.md`](.\u002Fapps\u002Finno-agent\u002FREADME.md).\n\n---\n\n## Deployment\n\nA typical production layout separates code, config, data, and workspace:\n\n```text\n\u002Fopt\u002Finno-agent              # this repository\n\u002Fetc\u002Finno-agent\u002Fconfig.json  # config\n\u002Fvar\u002Flib\u002Finno-agent\u002Fdata     # sessions, jobs, memory, downloads\n\u002Fvar\u002Flib\u002Finno-agent\u002Fskills   # uploaded skills\n\u002Fsrv\u002Finno-workspace          # files the agent should work on\n```\n\n```bash\nINNO_CONFIG_DIR=\u002Fetc\u002Finno-agent \\\nINNO_DATA_DIR=\u002Fvar\u002Flib\u002Finno-agent\u002Fdata \\\nINNO_SKILLS_DIR=\u002Fvar\u002Flib\u002Finno-agent\u002Fskills \\\nINNO_WORKSPACE_DIR=\u002Fsrv\u002Finno-workspace \\\nINNO_PORT=3000 \\\nnpm run server\n```\n\nA [`Dockerfile`](.\u002FDockerfile) and [`docker-compose.yml`](.\u002Fdocker-compose.yml) are provided as starting points.\n\n---\n\n## Contributing\n\nIssues and PRs are welcome. Before opening a PR, please run `npm run build` locally — there is no top-level lint or test runner wired up yet, but the TypeScript build doubles as a sanity check. Keep changes focused, match the existing code style, and update the relevant docs when behavior changes.\n\n---\n\n## License\n\n[MIT](.\u002FLICENSE).\n\nThis project depends on the Pi SDK (`@earendil-works\u002Fpi-*` packages by Mario Zechner), which is also MIT-licensed and consumed via npm.\n",2,"2026-06-15 02:30:12","CREATED_QUERY"]