Skip to content

Repository files navigation

Octop Banner

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

Python 3.12+License: MITVersionPyPICode Style: RuffGitHub stars

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, Discord, WeCom, or programmatic HTTP/SSE. Extend capabilities with the expert library, Connectors (OAuth + MCP), and ACP integration for IDE workflows.

✨ Highlights

FeatureDescription
👥Multi-user expert teamOne admin, shared household; built-in expert library — switch specialists per scenario
🎭MBTI personas16 personality templates plus an interactive quiz — give each agent a distinct character
🔒Security built-inJWT multi-user isolation, tool approval, shell command guardrails, and PII redaction — data stays local
🔌Connector ecosystemTencent suite (Docs, Weibo trends, News, …); OAuth and MCP gateway extend resource boundaries
💾Pluggable backendsLocal disk, Docker containers, PostgreSQL, or COS/S3 — AI operates inside isolated boundaries
🧠Portable memoryPowered by harness-memory; memory migrates with the workspace
↔️ACP bidirectionaloctop 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 desktopLive screen and input from the dashboard on Linux, Windows, and macOS — remote office work and GUI apps; one-click isolated desktop on headless Linux
🏠Self-hostedDashboard, 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, Discord, WeCom, and more), and cron automation — all sharing one SQLite database under ~/.octop/.

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.

🧠 Core Technology

LayerTechnology
LanguagePython 3.12+
Web frameworkFastAPI + uvicorn
Agent runtimeharness-agent
Gatewayharness-gateway
Control plane DBSQLite (WAL) via aiosqlite
FrontendReact 18 + TypeScript + Vite + Ant Design
SchedulingAPScheduler
ACPagent-client-protocol
Build / qualityhatchling · ruff · mypy · pytest

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

  • harness-agent — Agent runtime: model routing, tools, skills, and conversation checkpointing.
  • harness-gateway — multi-platform IM channel bridge that normalizes incoming messages into a single processing pipeline.
  • harness-memory — hierarchical recall with full-text search, so an agent's memory travels with its workspace.
  • harness-browser — CDP-based browser automation with persistent profiles for web tasks.

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 ~/.octop/octop.db on boot.

🤔 Features

Server & auth

  • Multi-user JWT authentication with admin role
  • First-run setup wizard (octop init)
  • Interactive API docs at /api/docs (off by default — set "enable_api_docs": true in config.json to enable)

Agents

  • Multiple agents per user; each has its own workspace, providers, channels, and cron
  • 16 MBTI persona templates + custom system prompt
  • Expert library scanned at boot (infra/agents/experts/library/)
  • Workspace backends: local disk, COS, S3, and other remote stores

Channels & automation

  • IM channels: Feishu, DingTalk, QQ, Discord, WeCom, and more
  • Proactive cron jobs with natural-language and slash-command triggers
  • Unified message processing across Web UI, IM, and cron surfaces

Surfaces

  • Web dashboard — chat, agents, connectors, channels, cron, settings
  • CLIoctop run, octop chat, octop acp, admin commands
  • HTTP/SSE API — full programmatic access

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:

  • Shared resource pool — a central pool of skills and sub-agents that any user can drop into a new expert without rebuilding from scratch.
  • Expert sharing — publish your experts to other users in the same deployment, so good configurations are reused instead of recreated.
  • Browser & terminal polishing — browser skill recording (capture a workflow and replay it as a skill) and a more capable terminal AI assistant.
  • AgentTeams — let one coordinator autonomously schedule and orchestrate multiple experts to tackle multi-step tasks.
  • Self-evolution — automatically distill everyday conversations into reusable skills, so the assistant grows with you.
  • PC / mobile clients — native desktop and mobile apps alongside the web dashboard and IM channels.

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

🚀 Quick Start

Prerequisites

  • macOS / Linux / Windows
  • No pre-installed Python required — the installer uses uv to provision Python 3.12 in an isolated venv under ~/.octop/

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# orsource~/.bashrc # Bash

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

# Browser automation (Playwright Chromium)
curl -fsSL https://finnie-1258344699.cos.ap-guangzhou.myqcloud.com/octop/install.sh | bash -s -- --extras browser
# Feishu channel support
curl -fsSL https://finnie-1258344699.cos.ap-guangzhou.myqcloud.com/octop/install.sh | bash -s -- --extras channels-feishu

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

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

pip install octop
# optional: pip install "octop[browser]"

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 — default credentials are admin / octop (change immediately).

Docker (recommended for production)

# Build and start
docker compose -f docker/docker-compose.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=changeme \
octop:latest

Open http://localhost:8088 — default credentials are admin / octop (change immediately).

VariableDefaultDescription
OCTOP_PORT8088HTTP listen port
OCTOP_DEFAULT_PASSWORDoctopFirst-run admin password
OCTOP_ADMIN_USERNAMEadminFirst-run admin username
OCTOP_DATA~/.octopHost data directory (compose bind mount)

See .env.example for the full list.

📑 Contents

📦 Install options

MethodPlatformDescription
Remote one-linermacOS / Linuxcurl …/octop/install.sh | bash
Remote one-linerWindowsirm …/octop/install.ps1 | iex or install.bat
Local scriptmacOS / Linuxbash scripts/install.sh
Local scriptWindowsscripts\install.bat or install.ps1
PyPIAnypip install octop or pip install "octop[browser]"
DockerAnydocker/docker-compose.yml

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

⚙️ 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

ChannelCredentials
FeishuApp ID, App Secret
DingTalkApp Key, App Secret
QQBot AppID, Token
DiscordBot Token
WeComCorp ID, Agent Secret
Web DashboardEnabled by default

📖 CLI reference

CommandDescription
octop initBootstrap ~/.octop/ (DB, admin, JWT secret)
octop runStart Octop in the foreground
octop service startInstall and start as a system service
octop service stopStop the system service
octop agentCreate, list, start/stop agents
octop channelInstall and manage IM channels
octop chatsREPL and session management
octop acpStdio ACP server for IDE integration
octop cronManage scheduled tasks
octop modelsProvider presets and model resolution
octop skillsEnable/disable per-agent skills
octop backupExport / restore backups
octop cleanRemove CLI state or wipe ~/.octop/
octop updateCheck for and install updates

Full reference: docs/cli.md.

🖥️ Web dashboard

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

Octop Web Dashboard

  • Chat — real-time conversation with agents
  • Agents — create agents, pick experts / MBTI personas, configure providers
  • Connectors — OAuth apps and MCP gateways
  • Channels — IM platform setup
  • Cron — visual cron job management
  • ACP — configure outbound coding-agent runners
  • Settings — users, security, TLS, system

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
├── 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

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

🏗️ Architecture

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

Single process. Restart rebuilds state from ~/.octop/octop.db.

See docs/architecture.md and docs/adr/001-single-process-model.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 --noEmit

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

🔒 Security & privacy

  • Local-first: Config, chats, workspaces, and credentials live under ~/.octop/ on your machine.
  • Multi-user isolation: JWT auth with per-user agents and workspaces.
  • Tool guardrails: User-editable shell command rules under ~/.octop/security/tool_guard/.
  • No vendor lock-in: Swap LLM providers, storage backends, and channels without rewriting agents.

🤝 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.

🔗 Related projects

ProjectDescription
harness-agentAgent runtime — model routing, tools, skills, checkpointing
harness-gatewayMulti-platform IM channel bridge
harness-memoryHierarchical recall and FTS search
harness-browserCDP browser automation with persistent profiles

These harness-* projects are being prepared for open-sourcing; repository links will be added once they are published.

💬 WeCom Customer Group (CN)

For the customer WeCom support group, scan:

WeCom customer group QR code

This QR code is valid until 2026-08-08 (UTC+8). Please ask the maintainer for an updated code after it expires.

📄 License

This project is licensed under the MIT License.

About

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

Topics

Resources

Contributing

Security policy

Stars

676 stars

Watchers

25 watching

Forks

Releases

Packages

Contributors

Languages