Octop README

The project's README from github.com/TencentCloud/Octop. As one markdown file: README.md.

Octop Banner

A smarter, self-hosted AI assistant — multi-user, multi-agent.

TencentCloud/Octop | Trendshift

Python 3.12+ License: MIT Version PyPI Code Style: Ruff GitHub stars GitHub forks Discord

Highlights · Overview · Core Technology · Features · Roadmap · Quick Start · Contents

English · 中文


Octop is an open-source, self-hosted AI assistant. It's not just a tool — it's a digital life form that can operate in parallel. Through its multi-agent architecture, it builds an intelligent environment that is both independent and collaborative for teams, families, and individuals. Best of all, it runs entirely on your machine — the fully self-hosted design means privacy is never a compromise, while single-process startup makes the powerful web console, CLI, and IM integrations readily accessible.

Chat through the Web Dashboard, Feishu, DingTalk, QQ, WeChat, Telegram, Discord, WeCom, or programmatic HTTP/SSE/WebSocket. Extend capabilities with the expert library, Connectors (OAuth + MCP), and ACP integration for IDE workflows.

✨ Highlights

Feature Description
👥 Multi-user expert team One admin, shared household; built-in expert library and expert market — switch specialists per scenario
🤝 Cloud collaboration Link this Octop to another instance to browse peer experts and chat across instances; history stays on the expert's side
🎭 MBTI personas 16 personality templates plus an interactive quiz — give each agent a distinct character
🎯 AgentTeams (Beta) A coordinator schedules multiple experts on multi-step work; details
🔒 Security built-in JWT multi-user isolation, tool approval, shell command guardrails, and PII redaction — data stays local
🔌 Connector ecosystem Tencent suite (Docs, Meeting, News, …); OAuth and MCP gateway extend resource boundaries — supported connectors
💾 Pluggable workspace backends Local disk, Docker sandbox, PostgreSQL, or COS/S3 for agent files — separate from the control-plane DB
🧠 Portable memory Powered by Octop Memory; memory migrates with the workspace
📚 Knowledge base RAG over your documents; share corpora within a deployment and ground answers in your private data
🧩 Plugins Extend Octop with third-party plugins; bundled plugins are seeded and toggled on demand
↔️ ACP bidirectional octop acp for IDE/terminal AI; delegate to OpenCode / Claude Code with permission gates
💻 Terminal AI+ Interactive shell in the browser — AI-assisted command execution and troubleshooting
🌐 Browser AI+ Headless Chromium sessions for web automation, screenshots, and remote browsing
🖥️ Remote desktop Live screen and input from the dashboard on Linux, Windows, and macOS — remote office work and GUI apps; one-click isolated desktop on headless Linux
🪟 Desktop client Native Windows / macOS / Linux apps (and FnOS packages) alongside the web dashboard
🏠 Self-hosted Dashboard, CLI, IM channels, and cron in one octop run — all data under ~/.octop/

📌 Overview

Octop is a self-hosted AI assistant platform for households and small teams. It runs a single process that serves a web dashboard, a CLI, IM channels (Feishu, DingTalk, QQ, WeChat, Telegram, Discord, WeCom, and more), and cron automation — all sharing one control-plane database under ~/.octop/ (SQLite by default; PostgreSQL optional).

Octop's design goal: keep every conversation, workspace, and credential on your own machine, while giving each user a personal team of specialized agents they can switch between per task.

🐾 What can you do with Octop
  • Personal assistant — let a dedicated agent write weekly reports, organize notes, and manage your schedule; memory persists with the workspace.
  • Family sharing — one admin account, the whole household; assign different agents and experts per member; share experts and knowledge bases when useful.
  • Team helper — AgentTeams or parallel agents, bridging Feishu / DingTalk / WeCom / WeChat to route tasks into group chats.
  • Developer boost — delegate coding tasks to OpenCode / Claude Code via ACP, or troubleshoot from the terminal with AI assistance.
  • Web automation — use Browser AI+ and remote desktop for forms, screenshots, and GUI apps.
  • Scheduled tasks — configure cron in natural language so the agent pushes or runs jobs on time every day.

🧠 Core Technology

Layer Technology
Language Python 3.12+
Web framework FastAPI + uvicorn
Agent runtime Octop Harness
Gateway Octop Gateway
Control plane DB SQLite (WAL, default) or PostgreSQL (optional)
Frontend React 18 + TypeScript + Vite + Ant Design
Scheduling APScheduler
ACP agent-client-protocol
Build / quality hatchling · ruff · mypy · pytest

Octop is built on the Octop Harness stack — a set of focused runtimes that Octop composes into one process:

Instead of an external queue or message broker, Octop routes every surface — Web UI, IM, and cron — through one in-process HarnessProcessor. The result is a single, restart-safe process whose entire state is rebuilt from the control-plane database on boot (local SQLite by default; PostgreSQL optional).

🤔 Features

Server & auth

Experts

Channels & automation

Surfaces

Knowledge & plugins

ACP (Agent Client Protocol)

Octop supports ACP in two directions:

  1. Inbound — external tools use your Octop agent

    octop acp --agent main   # stdio ACP server for Zed, OpenCode, …
    
  2. Outbound — Octop delegates to external coding agents

    • Dashboard → ACP (/acp): configure runners (global per user)
    • Enable acp_runner per agent, then delegate in chat

Built-in outbound runners include OpenCode, CodeBuddy, Claude Code, and Codex.

Full setup: docs/acp.md.

🧭 Roadmap

Here are our mid-to-long term plans:

Shipped

In progress

Planned

This roadmap may shift as the community grows; treat it as indicative only.

🚀 Quick Start

Prerequisites

1. Install

macOS / Linux — one-line installer (recommended):

curl -fsSL https://finnie-1258344699.cos.ap-guangzhou.myqcloud.com/octop/install.sh | bash

Windows (PowerShell):

irm https://finnie-1258344699.cos.ap-guangzhou.myqcloud.com/octop/install.ps1 | iex

Windows (cmd) — download and run, or from a cloned repo:

curl -fsSL https://finnie-1258344699.cos.ap-guangzhou.myqcloud.com/octop/install.bat -o install.bat
install.bat

After installation, open a new terminal or reload your shell:

source ~/.zshrc   # Zsh
# or
source ~/.bashrc  # Bash

The installer places octop on your PATH via ~/.octop/bin. Optional extras:

# Download Playwright Chromium for browser automation (skipped if a system Chrome/Chromium is already present)
curl -fsSL https://finnie-1258344699.cos.ap-guangzhou.myqcloud.com/octop/install.sh | bash -s -- --extras browser

See scripts/README.md for all install options (--version, --from-source, --mirror, Windows flags).

Desktop app (GUI, no terminal) — grab the artifact for your platform from GitHub Releases:

Platform Artifact
Windows Octop-desktop-windows-amd64-<version>.exe (64-bit) / Octop-desktop-windows-arm64-<version>.exe (ARM64) — NSIS installer
macOS Octop-desktop-darwin-arm64-<version>.dmg (Apple Silicon) / Octop-desktop-darwin-amd64-<version>.dmg (Intel)
Linux Octop-desktop-linux-amd64-<version>.tar.gz / Octop-desktop-linux-arm64-<version>.tar.gz
FnOS NAS Octop-fnos-docker-<version>.fpk (recommended on ARM; amd64/arm64 image) / Octop-fnos-native-<version>.fpk (x86_64, no Docker) / Octop-fnos-native-arm64-<version>.fpk (ARM64 fallback if no Docker) — install via App Center

See desktop/README.md for the desktop shell and fnos/README.md for the FnOS packaging guide.

Alternative — PyPI (if you already manage Python yourself):

pip install octop
# optional local ONNX embedding model cache (Models → Local): pip install "octop[local-embedding]"
# Downloads catalog weights under ~/.octop/embedding_models; not chat, not Memory.
# Browser automation uses the bundled Playwright package; install Chromium via the installer --extras browser,
# the dashboard, or: python -m playwright install chromium

From a source checkout with uv:

uv sync --extra local-embedding

2. Initialize

octop init

The interactive wizard creates the SQLite database, JWT secret, and first admin account under ~/.octop/.

3. Run

# Foreground (API + Web dashboard)
octop run

# Custom host / port
octop run --host 0.0.0.0 --port 8088

# Register as a system service (systemd / launchd / Windows service)
octop service start

Open http://127.0.0.1:8088. With Docker, a valid OCTOP_DEFAULT_PASSWORD creates the admin on first boot (credentials in /data/.octop/credential.txt); if it is unset or rejected, open the setup wizard (unlock password in /data/.octop/octop-login.txt). Interactive octop init / the setup wizard asks you to choose a password (≥8 characters, letters and digits).

# Build and start
docker compose -f docker/docker-compose.yml up -d

# China mirror when ghcr.io is unreachable (no local build)
docker compose -f docker/docker-compose.cn.yml up -d

# Or build manually
bash docker/docker_build.sh
docker run -d \
  -p 8088:8088 \
  -v octop-data:/data/.octop \
  -e HOME=/data \
  -e OCTOP_DEFAULT_PASSWORD="<strong-password-or-omit-for-setup-wizard>" \
  octop:latest

Open http://localhost:8088. A valid OCTOP_DEFAULT_PASSWORD creates the admin on first boot and writes credentials to /data/.octop/credential.txt. If it is unset or rejected by the password policy, no admin is created — complete the setup wizard (unlock password in /data/.octop/octop-login.txt). Override the username via OCTOP_ADMIN_USERNAME.

Password policy: at least 8 characters with letters and digits.

Variable Default Description
OCTOP_PORT 8088 HTTP listen port
OCTOP_DEFAULT_PASSWORD (unset) First-run admin password (Docker bootstrap). Valid → create admin; unset or rejected → setup wizard
OCTOP_ADMIN_USERNAME admin First-run admin username
OCTOP_DATA ~/.octop Host data directory (compose bind mount)

See .env.example for the full list.

Deploy with Cloud

Deploy on Lighthouse
Deploy on CVM
Deploy with Zenith

📑 Contents

📦 Install options

Method Platform Description
Remote one-liner macOS / Linux curl …/octop/install.sh | bash
Remote one-liner Windows irm …/octop/install.ps1 | iex or install.bat
Local script macOS / Linux bash scripts/install.sh
Local script Windows scripts\install.bat or install.ps1
PyPI Any pip install octop (optional extras such as local-embedding)
Docker Any docker/docker-compose.yml; China mirror: docker/docker-compose.cn.yml

All install scripts provision an isolated environment at ~/.octop/venv and a ~/.octop/bin/octop wrapper — they do not touch system Python.

Upgrade

octop update replaces only the wheel/binary — your ~/.octop/ database, workspaces, secrets, and config.json are preserved:

octop update          # fetch and install the latest octop, then restart the service if one is registered

The schema migrates automatically on next boot; run octop init only if the setup wizard prompts for a migration. Always back up first (octop backup) before a cross-version upgrade.

⚙️ Configuration

All runtime state lives in ~/.octop/. Manage it via CLI or edit files directly.

# LLM providers and models
octop models
octop provider list

# IM channels
octop channel list
octop channel install

# Skills (per agent)
octop skills list --agent main

# Cron jobs
octop cron list
octop cron create --help

# Users (admin)
octop user list

Supported LLM providers

OpenAI-compatible APIs, DashScope (Qwen), Ollama, and other presets — configure per agent in the dashboard or via octop provider.

Supported channels

Channel Credentials
Feishu App ID, App Secret
DingTalk App Key, App Secret
QQ Bot AppID, Token
WeChat QR bind / account credentials; CLI
Telegram Bot Token
Discord Bot Token; all accessible channels allowed by default, optional channel/DM allowlists; setup and testing
WeCom Corp ID, Agent Secret
Web Dashboard Enabled by default

Other kinds (e.g. Yuanbao, Xiaoyi, MQTT) are available via the gateway — see channel setup in the dashboard or CLI.

Supported connectors

Built-in OAuth / MCP connectors include Tencent Docs, Tencent Meeting, Notion, TickTick, OpenAlex, Feishu CLI, WeCom CLI, Agent Mail, Obsidian, WeKnora, Dify, and more. Names and descriptions are localized (en / zh).

Full catalog, auth kinds, and MCP modes: docs/connectors.md. Custom MCP servers can be added in the dashboard.

📖 CLI reference

Command Description
octop init Bootstrap ~/.octop/ (DB, admin, JWT secret)
octop run Start Octop in the foreground
octop service start Install and start as a system service
octop service stop Stop the system service
octop agent Create, list, start/stop agents
octop channel Install and manage IM channels
octop chats REPL and session management
octop acp Stdio ACP server for IDE integration
octop cron Manage scheduled tasks
octop models Provider presets and model resolution
octop skills Enable/disable per-agent skills
octop plugin Install and manage third-party plugins
octop backup Export / restore backups
octop clean Remove CLI state or wipe ~/.octop/
octop memory list List running agents eligible for memory maintenance; no database changes.
octop memory slim [--agent ID] Back up and slim SQLite memory through the running host; uses the selected agent or prompts by number. Shows terminal and dashboard progress. Details
octop memory slim --all Sequentially maintain all eligible running agents, with per-agent progress; stops on the first failure.
octop update Check for and install updates

In signed-in dashboard or local CLI chat, /memory slim explains maintenance for the current agent; /memory slim --all lists your eligible agents. Add --confirm to start after reviewing the impact. Use /memory status for progress/results. Chat stays available until maintenance is confirmed and begins. External IM maintenance requires verified sender permissions and is not enabled yet.

Full reference: docs/cli.md.

🖥️ Web dashboard

After octop run, open http://127.0.0.1:8088.

Octop Web Dashboard

Interactive API docs: http://127.0.0.1:8088/api/docs (disabled by default — enable by setting "enable_api_docs": true in config.json)

📁 Data directory

~/.octop/                          ← install & data root
├── config.json                    # process config (optional database section)
├── octop.db                       # SQLite — users, agents, channels, cron, …
├── secrets/                       # JWT secret, channel tokens
├── agents/<agent_id>/             # per-agent workspace (SOUL.md, skills, …)
├── security/tool_guard/           # shell command allow/deny rules
├── logs/                          # runtime logs
├── venv/                          # uv-managed Python (installer layout)
└── bin/octop                      # PATH wrapper → venv/bin/octop

The control plane can also use PostgreSQL — set database in config.json, or OCTOP_DATABASE_* / the first-run wizard. With PostgreSQL, agent memory reuses the same DSN by default (per-agent schema); to keep file-based memory, set "memory": { "backend": { "type": "sqlite" } } in the agent config. See docs/configuration.md and docs/adr/002-database-backends.md.

See docs/configuration.md for env vars and config.json.

🏗️ Architecture

OctopServer
 ├─ DatabasePool            SQLite (WAL) or PostgreSQL
 ├─ SharedServices       DI root — every repo + config
 ├─ ExpertCatalog        scans agents/experts/library/ at boot
 ├─ UserManager
 │   └─ HarnessAgentManager (per user)
 │       └─ AgentRuntime (per agent)
 │           ├─ HarnessAgent      Agent runtime (octop-harness)
 │           ├─ HarnessProcessor  IM / UI / cron entry point
 │           ├─ ChannelManager    IM connections (octop-gateway)
 │           └─ CronManager       APScheduler
 └─ FastAPI app (uvicorn)

Single process. Restart rebuilds state from the control-plane database (local SQLite by default; PostgreSQL optional).

See docs/architecture.md, docs/adr/001-single-process-model.md, and docs/adr/002-database-backends.md.

📁 Project layout

src/octop/
  config.py    env-var config
  launch.py    OctopServer boot + uvicorn
  infra/       business core (agents, gateway, cron, db, users, …)
  api/         HTTP layer — FastAPI app, routers, JWT, SSE
  cli/         CLI layer — Click commands
  dashboard/   built React SPA (wheel artifact)

dashboard/     frontend source (Vite) — edit here, run make build-frontend

docker/        Docker Compose, entrypoint, build & deploy scripts
tests/         unit/ + integration/

🛠️ Development

Prerequisites: Python 3.12+, Node 18+, uv

# Backend
make install          # pip install -e ".[dev]"
make all              # format-all + lint + typecheck + test (ship bar)

# Frontend (separate terminal)
make dev-frontend     # Vite dev server on :5173 (override with VITE_DEV_PORT)
make build-frontend   # production build → src/octop/dashboard/
cd dashboard && npx tsc -b

Individual targets: make test, make lint, make typecheck, make format.

🔒 Security & privacy

🤝 Contributing

Contributions are welcome:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Run make all (backend) or make check-all (full stack) before submitting
  4. Open a Pull Request

See CONTRIBUTING.md for the full guide. Security issues: SECURITY.md.

Module boundaries and coding conventions: AGENTS.md.

📋 Changelog

See CHANGELOG.md for release history.

Project Description
Octop Harness Agent runtime — model routing, tools, skills, checkpointing
Octop Gateway Multi-platform IM channel bridge
Octop Memory Hierarchical recall and FTS search
Octop Browser CDP browser automation with persistent profiles
Octop Pet A desktop pet for Octop

💬 Community

WeCom Customer Group (CN)

For the customer WeCom support group, scan:

WeCom customer group QR code

Please scan the QR code to join the group. For any questions or assistance, please contact the group admin directly.

📄 License

This project is licensed under the MIT License.

✨ Contributors

Thanks to all contributors:

Octop (TencentCloud/Octop)

Searching Database…

9.7K ·GitHub
这是什么?Octop 是一个开源、可自托管的 AI 助手平台,采用多智能体架构,面向个人、家庭和小团队,让你能完全在自己的机器上运行一支专属的 AI “专家”队伍。
这是单个应用,还是一组独立服务的集合?它是一个单独的 Python 进程,同时提供网页控制台、命令行界面(CLI)、IM 渠道桥接(飞书、钉钉、QQ、微信、Telegram、Discord、企业微信)以及 cron 自动化任务,全部共享同一个控制面数据库。
怎么把它跑起来?在 macOS/Linux 上用一行式安装程序,或在 Windows 上用 PowerShell 脚本,它们会把 'octop' 加入你的 PATH;然后运行 'octop init' 创建数据库、JWT 密钥和管理员账户,再运行 'octop run' 启动。此外也提供 Docker、PyPI 和原生桌面客户端。
我需要先装好 Python 吗?不需要。安装程序会用 'uv' 自动为你配置一个隔离的 Python 3.12 环境,因此无需预先装好 Python。
安装有什么坑是我该知道的吗?位于 /api/docs 的交互式 API 文档默认是禁用的,必须在 config.json 中开启;在 Docker 中,首次启动会生成一个随机管理员密码并写入凭据文件,除非你自己设置了环境变量。
这是为谁打造的?适合想要共享、自托管助手的家庭和小团队:一个管理员账户可以给每位家庭成员或队友分配各自的专家,还能选择共享专家和知识库。
桌面客户端能在任意操作系统上运行吗?可以——提供 Windows、macOS 和 Linux 的原生桌面应用,另有 FnOS NAS 安装包,此外还有网页控制台。
我的数据会离开我的电脑吗?不会——明确的设计目标就是把每一段对话、每一个工作区和每一份凭据都留在你自己的硬件上,不强制依赖任何云服务。
ACP 集成到底能做什么?ACP(Agent Client Protocol,智能体客户端协议)让 Octop 能够双向工作:外部工具可以调用 Octop 智能体,Octop 也可以把编码任务委托给 OpenCode、Claude Code、CodeBuddy、Codex 等外部智能体,并设有权限门控。
MBTI 人格模板是干什么用的?Octop 内置了 16 套 MBTI 性格模板(外加一个互动测验),让你能给每个专家智能体赋予鲜明的个性,而不是千篇一律的通用助手腔。
智能体的记忆是怎么工作的?记忆由内置的 octop-memory 组件负责,它借助全文搜索实现分层召回,记忆随智能体的工作区一起迁移,而不绑定在固定服务器上。
智能体能浏览网页或控制我的桌面吗?可以——“Browser AI+”会运行基于 CDP 的无头 Chromium 会话来进行网页自动化和截图;控制台还能接管实时屏幕和输入,在 Linux、Windows 或 macOS 上实现远程桌面控制。
Size
33.4 MB
Stars
9.7K
Age
3mo
Commits · 90 Days