[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-107970":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":11,"contributorsCount":11,"subscribersCount":11,"size":11,"stars1d":11,"stars7d":11,"stars30d":13,"stars90d":11,"forks30d":11,"starsTrendScore":11,"compositeScore":14,"rankGlobal":8,"rankLanguage":8,"license":15,"archived":16,"fork":16,"defaultBranch":17,"hasWiki":18,"hasPages":16,"topics":19,"createdAt":8,"pushedAt":20,"updatedAt":21,"readmeContent":22,"aiSummary":23,"trendingCount":11,"starSnapshotCount":11,"syncStatus":24,"lastSyncTime":25,"discoverSource":26},107970,"bulter-ex","Jackzhang970202\u002Fbulter-ex","Jackzhang970202",null,"Python",101,0,60,35,40.5,"MIT License",false,"main",true,[],"2026-11-11 03:27:44","2026-11-12 02:46:08","# KnowLens 知鉴\n\n**Answers with evidence. Knowledge that evolves.**\n\nKnowLens is a department-level knowledge Q&A and experience-evolution agent. It turns documents, images, and meeting recordings into searchable, citable, verifiable knowledge, and improves itself through a human-reviewed loop: **candidate → review → rule \u002F profile → release**. It ships with **193 catalogued capabilities**, a knowledge cockpit, an agent platform (agents, 1,137 installable open-source skills, experts, teams, workflows, automation) and optional Claude Code experience integration.\n\nEnglish | [简体中文](README.zh-CN.md)\n\n![License](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-blue.svg)\n![Python](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fpython-3.10%2B-blue.svg)\n![Version](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fversion-0.3.0-green.svg)\n\n## Screenshots\n\n| Cockpit | Knowledge spaces |\n|---|---|\n| ![Cockpit](docs\u002Fimages\u002Fdashboard.png) | ![Knowledge spaces](docs\u002Fimages\u002Fknowledge.png) |\n\n| Q&A | Experience center |\n|---|---|\n| ![Q&A](docs\u002Fimages\u002Fchat.png) | ![Experience center](docs\u002Fimages\u002Fexperience.png) |\n\n## Features\n\n| Capability | Description |\n|---|---|\n| Space \u002F library isolation | A space is the isolation boundary. Multiple libraries inside one space can be queried jointly; cross-space queries are impossible. |\n| Five-stage Q&A | Scope routing → page-level evidence gathering → sufficiency check → structured answer → citation verification. |\n| Verifiable citations | Citations point to document pages and can expand to the original text; invalid citations are removed. |\n| Two chat surfaces | Knowledge-base chat and temporary-material chat, plus a mini Q&A dock on each library page. |\n| In-space traceable assistant | Ask about the current library or document, or select any text\u002Fnumber to ask where it came from. Provenance cards show the source document\u002Fpage\u002Ftable\u002Ffigure, formulas and inputs, and jump back to highlighted source text. |\n| URL ingestion | Paste a public page URL, preview the extracted Markdown, tag it, and index it into a library. |\n| Multimodal ingestion | PDF (text \u002F scanned \u002F mixed), Word, PPT, Excel, Markdown, images, and audio recordings. |\n| Image understanding | Each image is transcribed and semantically described, then inserted into the document in reading order and made searchable. |\n| Audio pipeline | ffmpeg normalization → ASR → timestamped transcript → structured meeting minutes (agenda \u002F decisions \u002F actions \u002F terms). |\n| Experience evolution | Candidate extraction, three-level deduplication, human review, rules \u002F profiles, space-level release digest, versioning, rollback, and evidence replay. |\n| Cockpit | Knowledge health, answer verdicts, ingestion trends, library health, risks, and model usage. |\n| Claude Code integration (optional) | Import development sessions as experience candidates and inject the release digest into a project's SessionStart hook. Disabled by default. |\n\n\n## Agent platform (0.3.0)\n\nThe knowledge core is also an agent platform: agents, skills, experts, teams,\nworkflows and automation live in the same process, database and interface.\n\n| Capability | Description |\n|---|---|\n| Agents | Author persona, model, temperature, step budget, knowledge scope, skills and tool permissions; publish with version snapshots and roll back. |\n| Unified workspace | One composer for knowledge, agents, experts, teams, workflows and Excel Q&A; attachments, structured run forms and traces in one view. |\n| AI creation | Describe a goal; the platform drafts a validated workflow, agent or team with clarifying questions; nothing is published automatically. |\n| Share & artifacts | Read-only conversation links, standalone artifact pages, and agent version diffs. |\n| External runtime | Optional zdata-agent-starter sidecar: discovers its agents\u002Fteams\u002Fworkflows and runs them through the same chat (`ZDATA_BASE_URL`). |\n| Excel 问数 | Upload xlsx\u002Fxls\u002Fcsv, profile sheets\u002Fcolumns, ask in natural language; generated pandas runs in an AST-checked subprocess; answers include result tables and optional charts. |\n| Skill marketplace | **1,137 open-source skills** harvested from four MIT\u002Fupstream repositories (metadata-only catalog); install on demand, search by category\u002Flicence, import from URL, author prompt\u002FHTTP\u002Fscript\u002FMCP skills, and bundle them into first-class skill packs. |\n| Experts | Publish an agent as a discoverable expert with expertise tags, rating and usage count; chat from the expert profile. |\n| Teams | Round-table, supervisor-routed and handoff strategies over multiple agents, with a synthesizer and bounded turns. |\n| Workflows | Typed DAGs (LLM \u002F agent \u002F skill \u002F tool \u002F knowledge \u002F condition \u002F parallel \u002F approval \u002F delay), JSON editor, live DAG preview, run trace and approval resume. |\n| MCP registry | Browse the official MCP server registry, discover tools, and install a remote server as an executable skill. |\n| Tools | Allow-listed registry: knowledge search, calculator, JSON query, time, HTTP (SSRF-guarded), file read, web search. Every call is recorded, including depth-limited agent-to-agent delegation. |\n| Memory and evolution | Session history, user\u002Fagent\u002Fspace\u002Fglobal memory, candidate extraction from corrections and failed runs, human approval, and injection into prompts. |\n| Evaluation | Per-agent evaluation sets with keyword checks and version-tied scores. |\n| Automation | Five-field cron schedules for agents and workflows, run-now, next-run calculation and run history. |\n| Operations | Header-based users with admin\u002Feditor\u002Fviewer roles, publication review, append-only audit log, artifacts and usage overview. |\n| Command palette | `Ctrl\u002FCmd+K` searches documents, agents, skills, experts, teams, workflows, sessions and memories. |\n| Bilingual UI | All interface strings live in `web\u002Fi18n.js`; toggle Chinese\u002FEnglish in Settings without rebuilding. |\n\nThe platform layer is additive: existing routes and tables are untouched, and\n`KNOWLENS_PLATFORM=0` restores the pure 0.2.0 behaviour.\n\n## Architecture\n\n```\nBrowser (vanilla JS + ECharts, no build step)\n   │ REST \u002F SSE\nFastAPI service (one process, one port)\n   ├─ Knowledge: Q&A routing → PageIndex tool loop → citation verification\n   ├─ Ingestion: PDF \u002F Office \u002F images \u002F audio → hierarchical tree → index\n   ├─ Experience: candidates → review → rules \u002F profiles → digest → injection\n   ├─ Platform: agents \u002F skills \u002F experts \u002F teams \u002F workflows \u002F tools \u002F memory\n   └─ Storage: SQLite (WAL) + files (index, originals, OCR cache, artifacts)\n```\n\n```\nknowlens\u002F            Backend package (FastAPI, Q&A, ingestion, evolution, vision, audio)\nknowlens\u002Fplatform\u002F   Agent platform (agents, skills, runtime, tools, workflows, ops)\ncatalog\u002F             Harvested open-source skill catalog (1,137 entries, metadata only)\nweb\u002F                 Frontend (index.html \u002F app.js \u002F platform.js \u002F styles \u002F vendor)\nvendor\u002Fpageindex\u002F    Embedded PageIndex retrieval engine (MIT)\nscripts\u002F             Startup, skill harvester, digest injection, release build\ndesign\u002F              Five-round design record and feature catalog\ntests\u002F               Model-free unit and API tests\ndocs\u002F                Architecture, release guide, user guide, operations runbook, screenshots\ndata\u002F                Runtime data (gitignored)\n```\n\n## Quick start\n\nRequirements: Python 3.10+; ffmpeg optional (for audio transcription).\n\n```bash\npython -m venv .venv\nsource .venv\u002Fbin\u002Factivate          # Windows: .venv\\Scripts\\activate\npip install -r requirements.txt\ncp .env.example .env               # fill in model endpoint and key\npython run.py                      # open http:\u002F\u002F127.0.0.1:8633\n```\n\nOn Windows you can also run `scripts\\start.bat`.\n\n### Docker\n\n```bash\ncp .env.example .env               # fill in model settings\ndocker compose up -d --build\n# http:\u002F\u002F127.0.0.1:8633, data persisted in .\u002Fdata\n```\n\nThe service binds to `127.0.0.1` by default. For LAN access, set `KNOWLENS_HOST=0.0.0.0` and add authentication and TLS at the reverse proxy.\n\n## Configuration\n\nAll configuration is supplied through environment variables or a local `.env` file. No keys are hardcoded.\n\n| Variable | Default | Description |\n|---|---|---|\n| `LLM_MODEL` | `mimo-v2.6-pro` | Primary chat model (OpenAI-compatible) |\n| `LLM_API_KEY` | empty | Primary model key |\n| `LLM_BASE_URL` | empty | Primary model endpoint (OpenAI-compatible `\u002Fv1`) |\n| `FALLBACK_MODEL` \u002F `FALLBACK_API_KEY` \u002F `FALLBACK_BASE_URL` | empty | Optional Anthropic-compatible fallback channel |\n| `KNOWLENS_HOST` | `127.0.0.1` | Bind address |\n| `KNOWLENS_PORT` | `8633` | Port |\n| `KNOWLENS_HOME` | `.\u002Fdata` | Data directory |\n| `KNOWLENS_CC_ROOT` | `~\u002F.claude\u002Fprojects` | Claude Code transcript root |\n| `KNOWLENS_PDF_BACKEND` | auto | Set to `pdfplumber` to force the permissive PDF backend |\n\n## Usage\n\n1. **Create a space** — the isolation boundary for all knowledge.\n2. **Create libraries** — retrieval units inside a space; multiple can be queried jointly.\n3. **Upload** — multiple files, a whole folder (recursive), or drag and drop. Choose tags and whether to enable image understanding.\n4. **Inspect content** — the document drawer offers page-by-page browsing, a structure tree, tag editing, and an image-understanding list (preview, transcription, description, per-image re-OCR).\n5. **Ask** — select libraries and tags in the composer. Answers have four sections: conclusion (yes \u002F no \u002F conditional \u002F not covered), evidence with citations, method or improvement (model inference is labelled), and missing material. Expand **Intermediate process** to inspect routing, tool calls, and human-readable raw data.\n6. **Experience center** — review candidates with evidence replay, maintain rules, inspect and roll back releases, and view distillation history. Optionally configure Claude Code experience.\n7. **Cockpit** — monitor knowledge health, answer quality, ingestion trends, risks, and model usage.\n8. **Ask inside the knowledge space** — open the right-side assistant from a library or document, or select text\u002Fnumber in the document to ask \"where does this number come from\". Answers include a provenance card; click \"open source\" to jump to the page and highlight the excerpt. Panel conversations persist by scope.\n\n## Multimodal behavior\n\n| Input | Processing | Citation page |\n|---|---|---|\n| Standalone image | Vision model transcribes text and describes semantics; stored as a document | Page 1 |\n| Scanned \u002F image-only PDF | Detected automatically; each page is rendered and OCR'd | Original PDF page |\n| Text PDF with embedded images | Text and image blocks are assembled in reading order (including a two-column heuristic); images are understood individually | Original PDF page |\n| Word | Paragraphs, tables, and images extracted in body XML order | Pseudo page |\n| PPT | Shapes ordered by slide position; images understood individually | Slide number |\n| Audio | ffmpeg + ASR + structured minutes; stored as a document | Pseudo page |\n\nImage-understanding results are written into the body as `[Image understanding · page N · figure M (type)] transcription \u002F description`, so they are searchable and citable. OCR results are cached by image SHA-256; re-indexing does not call the model again. A failed image is marked and shown as \"partial image failure\" without blocking the rest of the document.\n\nPDF parsing uses **pdfplumber + pypdfium2** by default (permissive licenses). If PyMuPDF is installed, it is used as a faster backend; its AGPL license is the user's responsibility.\n\n## Evolution and Claude Code\n\n- **Sources**: document ingestion (including meeting minutes), Q&A corrections, and development sessions.\n- **Deduplication**: approved\u002Frejected synonymous candidates are silent; a candidate synonymous with an active rule increments the rule's correction count; pending synonyms merge evidence.\n- **Human review**: candidates only enter the Q&A prompt after approval; the model never rewrites rules on its own.\n- **Release digest**: injected into every Q&A call, versioned, rollback-able, and rejected above 20 KB (the previous version is kept).\n- **Claude Code capture (optional)**: add a code project path in the experience center; KnowLens reads the matching sessions under `~\u002F.claude\u002Fprojects`, masks sensitive data, and distils candidates.\n- **Claude Code injection (optional)**: writes a SessionStart hook into the project's `.claude\u002Fsettings.local.json`, backs up the original file, and can be removed at any time. The hook exits silently when the service is down.\n\n## Data and security\n\n- No telemetry by default; data stays in the local data directory.\n- Uploaded content and questions are sent to the model endpoint you configure. Follow your organization's data-compliance rules.\n- Keys are read only from environment variables \u002F `.env` and never committed.\n- Backup: stop the service and copy the entire data directory.\n- Vulnerability reports: use GitHub Security Advisories; see [SECURITY.md](SECURITY.md).\n\n## API overview\n\n| Method | Path | Purpose |\n|---|---|---|\n| GET | `\u002Fapi\u002Fstatus` | Service and model status |\n| GET | `\u002Fapi\u002Fdashboard?space_id=` | Cockpit aggregates |\n| GET\u002FPOST | `\u002Fapi\u002Fspaces` | Spaces |\n| GET\u002FPOST | `\u002Fapi\u002Fspaces\u002F{id}\u002Flibraries` | Libraries |\n| POST | `\u002Fapi\u002Fdocuments\u002Fupload` | Upload (files \u002F folder, `vision=1\u002F0`) |\n| GET | `\u002Fapi\u002Fdocuments\u002F{id}\u002Fpages\u002F{n}` | Page text |\n| GET | `\u002Fapi\u002Fdocuments\u002F{id}\u002Fimages` | Image-understanding records |\n| POST | `\u002Fapi\u002Fqa\u002Fstream` | Q&A (SSE) |\n| POST | `\u002Fapi\u002Ffeedback` | Accept \u002F correct an answer |\n| GET\u002FPOST | `\u002Fapi\u002Fcandidates\u002F...` | Candidate review and evidence |\n| GET\u002FPOST | `\u002Fapi\u002Fspaces\u002F{id}\u002Fdigest` | Release digest |\n| GET\u002FPOST | `\u002Fapi\u002Fspaces\u002F{id}\u002Fcc\u002F...` | Claude Code capture and injection |\n| GET\u002FPOST | `\u002Fapi\u002Fplatform\u002Fagents` | Agent CRUD, publish, versions, run (SSE) |\n| GET | `\u002Fapi\u002Fplatform\u002Fskills\u002Fcatalog` | Search the 1,137-skill open catalog |\n| POST | `\u002Fapi\u002Fplatform\u002Fskills\u002Finstall` | Install a catalog skill |\n| GET\u002FPOST | `\u002Fapi\u002Fplatform\u002Fexperts`, `\u002Fteams` | Experts and teams, run (SSE) |\n| GET\u002FPOST | `\u002Fapi\u002Fplatform\u002Fworkflows` | Typed DAGs, validate, run (SSE) |\n| GET | `\u002Fapi\u002Fplatform\u002Fruns\u002F{id}` | Run trace, steps and artifacts |\n| GET\u002FPOST | `\u002Fapi\u002Fplatform\u002Fschedules` | Cron automation |\n| GET | `\u002Fapi\u002Fplatform\u002Fsearch?q=` | Cross-kind search for the command palette |\n| GET | `\u002Fapi\u002Fplatform\u002Foverview` | Platform metrics and 14-day trend |\n\n## Development and tests\n\n```bash\npython -m compileall -q knowlens scripts tests\npython -m unittest discover -s tests -v     # 58 tests: core, platform API, units\nnode --check web\u002Fapp.js\nnode --check web\u002Fplatform.js\nnode --check web\u002Fi18n.js\n```\n\nCI runs these checks on GitHub Actions without calling a real model.\n\n## Release rules\n\n- The repository contains only source code, frontend, vendored dependencies, scripts, tests, and documentation.\n- **Never commit**: `data\u002F`, `.env`, `_probe\u002F`, logs, caches, `.exe`, or any other build artifacts.\n- The release archive is produced by `python scripts\u002Fbuild_release.py` (`dist\u002Fknowlens-\u003Cversion>.zip`). The build rejects `.exe` files and scans for leaked keys.\n- `.github\u002Fworkflows\u002Frelease.yml` builds and attaches the archive when a `v*` tag is pushed. Binaries and deployment packages live in GitHub Releases, never in git history.\n\n## Roadmap\n\n- Hybrid lexical \u002F vector recall for very large libraries\n- Space export and import\n- Vector recall for the skill marketplace\n- Human correction of image-understanding results written back to the index\n- More cockpit metrics and alerts\n- Deferred: SSO\u002FJWT, PostgreSQL, Milvus, drag-and-drop workflow canvas\n\nRelease notes: [`docs\u002Frelease-notes-0.3.0.md`](docs\u002Frelease-notes-0.3.0.md).\n\nUser guide (Chinese): [`docs\u002Fuser-guide.zh-CN.md`](docs\u002Fuser-guide.zh-CN.md) — task-oriented walkthrough of every workspace.\n\nOperations runbook: [`docs\u002Fplatform-operations.md`](docs\u002Fplatform-operations.md) — start\u002Fstop, model channels, backup, RBAC, skills, MCP, scheduling, troubleshooting.\n\n## License and third parties\n\nThis project is licensed under the [MIT License](LICENSE).\n\n- PageIndex: MIT (vendored under `vendor\u002Fpageindex\u002F`, license included)\n- ECharts: Apache-2.0 (`web\u002Fvendor\u002Fecharts.min.js`)\n- marked: MIT (`web\u002Fvendor\u002Fmarked.min.js`)\n- pdfplumber: MIT; pypdfium2: Apache-2.0 \u002F BSD-3-Clause; PDFium third-party notices ship with the dependency\n- PyMuPDF: AGPL-3.0 or commercial; **not installed by default** — evaluate its license before enabling it\n- python-docx \u002F python-pptx \u002F openpyxl \u002F FastAPI \u002F LiteLLM follow their own licenses","KnowLens 是一个面向部门级组织的知识问答与经验演进智能体平台，支持文档、图像、会议录音等多模态知识的结构化索引、可溯源问答与持续迭代。其核心功能包括五阶段证据驱动问答、跨格式内容摄入（PDF\u002FWord\u002FPPT\u002FExcel\u002F图片\u002F音频）、图像语义描述与可检索嵌入、带时间戳的会议转录与纪要生成、基于人工审核闭环的经验演化机制（候选→评审→规则\u002F画像→发布），以及知识健康看板与空间隔离管理。适用于企业知识库建设、研发经验沉淀、合规文档管理、跨团队知识协同等需要高可信度、可验证引用和持续演进能力的场景。",2,"2026-11-24 04:33:08","CREATED_QUERY"]