Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
125 changes: 108 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,108 @@
# OpenCane

OpenCane 是一个面向智能盲杖场景的 AI 后端运行时,聚焦“设备接入 -> 实时对话 -> 图像记忆 -> 数字任务 -> 安全与观测”的完整闭环。
[English](#english) | [简体中文](#简体中文)

## English

Language: English | [切换到简体中文](#简体中文)

OpenCane is an AI backend runtime for smart-cane scenarios, focused on an end-to-end loop:
device connectivity -> realtime conversation -> visual lifelog -> digital tasks -> safety and observability.

### Architecture

![OpenCane Architecture](docs/assets/opencane-arch.png)

### Core Capabilities

- Multi-adapter hardware ingress: `mock / websocket / ec600 / generic_mqtt`
- Multi-modem support in `generic_mqtt`: `ec600mcnle_v1 / a7670c_v1 / sim7600g_h_v1 / ec800m_v1 / ml307r_dl_v1`
- Realtime voice pipeline: segmentation, VAD, transcription, playback, and interruption
- Visual lifelog: async image ingestion, semantic retrieval, timeline retrieval, and safety annotations
- Digital task execution: create, query, cancel, offline pushback, and retry
- Control APIs: device registration/binding, operation dispatch, and runtime status queries

### Technical Highlights

- Layered architecture: `adapter / runtime / agent / api / storage / safety`
- Tool execution strategy: MCP-first with automatic fallback to `web_search / web_fetch / exec`
- Task lifecycle: `pending -> running -> success/failed/timeout/canceled`
- Persistent data layer: SQLite for lifelog, tasks, and observability
- Vector retrieval backends: `chroma` and `qdrant`
- Model provider abstraction via LiteLLM: `OpenAI / Anthropic / Gemini / DashScope` and more
- Runtime observability with realtime metrics and historical samples
- Config governance with built-in `dev/staging/prod` profiles and `config check --strict`

### Quick Start

```bash
git clone https://github.com/iflabx/opencane.git
cd opencane
pip install -e .
```

First-time initialization:

> CLI 主命令为 `opencane`,并兼容 `nanobot` 别名
> 项目品牌与产品文档已切换为 OpenCane
```bash
opencane onboard
```

## 架构图
Apply a profile (staging recommended first):

```bash
opencane config profile apply --profile CONFIG_PROFILE_STAGING.json
opencane config check --strict
```

Start hardware runtime (example):

```bash
opencane hardware serve --adapter mock --logs
```

### Documentation

- Overview: `docs/overview.md`
- Quickstart: `docs/quickstart.md`
- Architecture: `docs/architecture.md`
- Data Flow: `docs/data-flow.md`
- Hardware Runtime: `docs/hardware-runtime.md`
- Control API: `docs/api/control.md`
- Lifelog API: `docs/api/lifelog.md`
- Digital Task API: `docs/api/digital-task.md`
- Deployment & Config: `docs/deployment-config.md`
- Operations Runbook: `docs/operations-runbook.md`
- Security Baseline: `docs/security.md`
- Roadmap: `docs/roadmap.md`

### NanoBot Compatibility and Migration

- Primary CLI command is `opencane`, with `nanobot` alias compatibility
- Project branding and product docs are now OpenCane
- Python package/import path uses `opencane` (no longer supports `from nanobot...`)
- Default data directory is `~/.opencane`, with backward-compatible reads from `~/.nanobot`
- Migration guide: `docs/migration-from-nanobot.md`
- Legacy nanobot docs are archived at: `local-docs/nanobot-legacy/`
- Archive README: `local-docs/nanobot-legacy/README.md`

### Acknowledgement

OpenCane is continuously developed based on [HKUDS/nanobot](https://github.com/HKUDS/nanobot).
Thanks to HKUDS for the open-source foundation.

---

## 简体中文

语言:简体中文 | [Switch to English](#english)

OpenCane 是一个面向智能盲杖场景的 AI 后端运行时,聚焦“设备接入 -> 实时对话 -> 图像记忆 -> 数字任务 -> 安全与观测”的完整闭环。

### 架构图

![OpenCane 架构图](docs/assets/opencane-arch.png)

## 核心功能
### 核心功能

- 多硬件接入:支持 `mock / websocket / ec600 / generic_mqtt` 适配器统一接入
- 多模组适配:`generic_mqtt` 内置 `ec600mcnle_v1 / a7670c_v1 / sim7600g_h_v1 / ec800m_v1 / ml307r_dl_v1`
Expand All @@ -18,7 +111,7 @@ OpenCane 是一个面向智能盲杖场景的 AI 后端运行时,聚焦“设
- 数字任务执行:任务创建、状态查询、取消、离线回推与重试
- 控制面 API:设备注册绑定、设备指令下发、运行状态查询

## 技术特性
### 技术特性

- 分层架构:`adapter / runtime / agent / api / storage / safety`
- 工具执行策略:优先 MCP 工具,失败自动回退 `web_search / web_fetch / exec`
Expand All @@ -29,7 +122,7 @@ OpenCane 是一个面向智能盲杖场景的 AI 后端运行时,聚焦“设
- 运维可观测:运行时指标 + 历史观测数据,支持问题复盘
- 配置治理:内置 `dev/staging/prod` 模板与 `config check --strict`

## 快速开始
### 快速开始

```bash
git clone https://github.com/iflabx/opencane.git
Expand All @@ -56,7 +149,7 @@ opencane config check --strict
opencane hardware serve --adapter mock --logs
```

## 文档导航
### 文档导航

- 总览:`docs/overview.md`
- 快速开始:`docs/quickstart.md`
Expand All @@ -70,20 +163,18 @@ opencane hardware serve --adapter mock --logs
- 运维手册:`docs/operations-runbook.md`
- 安全基线:`docs/security.md`
- 路线图:`docs/roadmap.md`
- 迁移说明:`docs/migration-from-nanobot.md`

## 兼容边界
### NanoBot 兼容与迁移

- CLI 主命令为 `opencane`,并兼容 `nanobot` 别名
- 项目品牌与产品文档已切换为 OpenCane
- Python 包与导入路径:使用 `opencane`(不再支持 `from nanobot...`)
- CLI:主命令 `opencane`,兼容 `nanobot` 别名
- 数据目录:默认 `~/.opencane`,兼容读取历史 `~/.nanobot`
- 迁移说明:`docs/migration-from-nanobot.md`
- 旧版 nanobot 历史文档已归档到:`local-docs/nanobot-legacy/`
- 归档说明见:`local-docs/nanobot-legacy/README.md`

## 致谢
### 致谢

本项目基于 [HKUDS/nanobot](https://github.com/HKUDS/nanobot) 进行持续开发与场景化演进。
感谢 HKUDS 团队开源 nanobot,为 OpenCane 的落地提供了坚实基础。

## 历史文档

旧版 nanobot 历史文档已归档到:`local-docs/nanobot-legacy/`
归档说明见:`local-docs/nanobot-legacy/README.md`