An async Python QQ bot platform featuring a three-tier cognitive memory architecture and a multi-agent skills system, connected via the OneBot V11 protocol.
Undefined is a high-performance async bot platform for QQ group and private chat scenarios, differentiated by its cognitive memory architecture. The memory system has three tiers: short-term memory maintains conversation continuity, cognitive memory enables AI to proactively observe and extract facts then asynchronously rewrite and store them in a vector database (with semantic search, time-decay weighting, MMR deduplication, cross-group linkage, and auto-profiling), and pinned memos provide AI self-constraints and todo management.
The platform includes 6 built-in agents (info, web search, file analysis, code analysis, entertainment, code delivery) covering 64+ tool capabilities, with fine-grained inter-agent tool sharing and whitelist control via callable.json. The skills system supports hot-reload, and 11 toolset categories are extensible on demand.
The architecture employs an 8-layer design with a "station-train" queue model, where 4-priority scheduling ensures high-value requests are served first. It supports multi-model pool concurrent comparison, MCP protocol for external tool integration, Anthropic Skills standard for domain knowledge injection, local knowledge base, global meme library, and cron-based scheduled tasks. The management plane provides a Management-first WebUI and cross-platform console with separated Management API and Runtime API, allowing full initialization even when configuration is incomplete.
Key Capabilities
- Three-tier memory: short-term / cognitive (vector search + time-decay + cross-group linkage) / pinned memos
- 6 built-in agents: info_agent, web_agent, file_analysis_agent, naga_code_analysis_agent, entertainment_agent, code_delivery_agent
- 11 toolset categories: group, messages, memory, contacts, group_analysis, notices, render, scheduler, cognitive, mcp, memes
- Multi-model pool: round-robin / random / user-specified, with concurrent comparison
- Four independent model configs: chat / vision / agent / security
- Local knowledge base: text vectorized into ChromaDB with keyword/semantic search
- MCP protocol: agents can have private MCP configs for external tools
- Scheduled tasks: Crontab syntax with self_instruction mode
- Access control: group/private chat blacklist/allowlist
- Security: built-in independent security model for injection and malicious content detection
Installation
Prerequisites: Python >= 3.11, < 3.14; uv (recommended) or pip; OneBot V11 endpoint (e.g. NapCat / Lagrange.Core); AI model API (OpenAI-compatible).
git clone --recursive https://github.com/69gg/Undefined.git
cd Undefined
pip install uv
uv sync
uv run playwright install
uv run Undefined-webui
Entry Commands
uv run Undefined— start bot directlyuv run Undefined-webui— start management console (recommended)
Core Config (config.toml)
- Basic:
core.bot_qq,core.superadmin_qq,onebot.ws_url - Models:
models.chat/models.vision/models.agent/models.security - Cognitive memory:
cognitive.enabled,cognitive.query.*,models.embedding.* - WebUI:
webui.url,webui.port,webui.password - MCP:
mcp.config_path