# Repository Briefing: countbot-ai/CountBot
> Source: https://repoforai.com/repo/countbot-ai/CountBot (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/countbot-ai/CountBot
- **Category**: Agents & Frameworks (智能体与框架)
- **Primary Language**: Python
- **License**: MIT
- **Engineering Health**: A+ (91/100 · Maintenance 35/35 · Adoption 16/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v1.1.0 (2026-11-18) — https://github.com/countbot-ai/CountBot/releases
- **Review Snapshot**: 2026-12-04
- **Deployment / Stack Signals**: Self-Hosted, Docker
- **Momentum**: 788 ★ total (+1 24h / +3 7d) · 103 forks
- **Topics**: `agent-skills`, `ai-agents`, `ai-assisted`, `assistant`, `deepseek-v4`, `official`
- **When to Use**: Best for: Internal teams that want one self-hosted service for browser and IM access, with tenant-level model controls and selective use of agent tools. Skip if: You only need a chat frontend, or require fully offline inference, documented hard execution isolation, or a proven multi-replica deployment.

## Overview
```text
### Architecture & Core Mechanics
CountBot is a long-running Python web application that serves multiple tenants from one host. Requests enter through the Vue web interface or messaging integrations. Tenants have separate workspaces, session history, long-term memory, skill settings and model configuration. Chat mode sends requests without tool definitions or execution instructions; Agent mode exposes configured tools and skills to the model for task execution.

The backend uses FastAPI, Uvicorn and Pydantic. Persistence dependencies include SQLAlchemy with its asyncio extra and aiosqlite, and croniter handles cron expressions for scheduled tasks. MCP, skills and external coding agents are extension points. The shared host simplifies deployment, but workspace separation alone does not establish a process or container sandbox for tool execution.

### Key Capabilities & Differentiators
Administrators can assign shared models, restrict model and mode access, set daily call limits, and review usage and audit records. Users can bring their own provider credentials, and API keys are not sent to the frontend. Agent mode supports tools, skills, team collaboration and workflow orchestration. Chat mode omits tool definitions and execution instructions, trimming prompt context when no action is needed.

DeepSeek is the default provider through its official Anthropic Messages endpoint, with web search, URL reading, PDF and Office parsing, speech transcription, text-to-speech and safety checks. Attachments are cached by content hash. The provider layer supports three request protocols, key rotation and failure cooldowns. Lark, WeCom, WeChat, QQ, DingTalk, Telegram, Weibo and XiaoZhi AI are listed as two-way integrations; ServerChan is outbound-only.

### Trade-offs & Limitations
Compared with a chat-only frontend, CountBot adds tenant administration, messaging and task execution, at the cost of managing more credentials and permissions. Compared with assembling an agent framework and separate channel adapters, it offers a ready-to-run application, but leaves less room to choose your own execution and persistence architecture. Chat mode saves prompt context compared with injecting tool definitions; it does not eliminate model API costs or latency.

For a trusted internal group, the shared-host model reduces deployment overhead. Before serving mutually untrusted tenants, verify filesystem and process isolation around command execution and external agents; tenant data separation and auditing do not establish those boundaries. The dependency set includes SQLite support through aiosqlite, but there are no stated capacity figures for concurrent writes or a multi-replica deployment. Validate both before relying on them.

### Hardware & Deployment Guide
For a source install, create a Python virtual environment, run `pip install -r requirements.txt`, then start the service with `python start_app.py`. Initialize the administrator at `http://127.0.0.1:8000` before exposing remote access, then put the service behind an HTTPS reverse proxy. `COUNTBOT_HOST` and `COUNTBOT_PORT` override the bind address and port. The remote setup window defaults to 30 minutes and can be set from 10 to 120 minutes via `REMOTE_SETUP_SECRET_TTL_MINUTES`.

The service can run under systemd, supervisor or a container, but no Dockerfile, Compose topology or image tag is specified. Frontend development requires Node.js 18+ and npm 9+; skills require `python` or `python3` on PATH. Hosted model calls still require network access and provider credentials. Version 1.0.0 shipped Windows, macOS and Linux desktop packages; v1.1.0 added native DeepSeek integration and multi-tenant controls and is the last desktop-supporting release. Plan new deployments around the browser/server path.
```

## Key Capabilities
```text
- Tenant governance: Separate workspaces, sessions, memory and skill settings, with shared-model assignment, daily call limits and audit records.
- Mode selection: Chat omits tool definitions and execution instructions; Agent mode enables configured tools, skills and workflows.
- Provider handling: DeepSeek defaults to its official Anthropic Messages endpoint; the runtime supports three request protocols, API-key rotation and failure cooldowns.
- Attachment reuse: Content-hash caching is paired with provider capabilities for PDF and Office parsing.
- Channel direction: Eight listed external channels are two-way, while ServerChan is push-only; the browser is a separate entry point.
- Release direction: v1.1.0 is the last desktop-supporting release; subsequent versions are planned as browser/server only.
```

## Quick Start / Clone
```bash
git clone https://github.com/countbot-ai/countbot.git
cd CountBot

python -m venv .venv
source .venv/bin/activate        # Windows: .venv\Scripts\activate

pip install -r requirements.txt
python start_app.py
```
