7/24 Office — Self-evolving AI Agent system. 26 tools, 3500 lines pure Python, MCP/Skill plugins, three-layer memory, self-repair, 24/7 production.
1.1k
Stars
150
Forks
32
Watchers
4
Issues
这是一个在生产环境中运行的 AI Agent,由 约 3,500 行纯 Python 代码 编写而成,且 零框架依赖。没有 LangChain,没有 LlamaIndex,没有 CrewAI —— 仅使用标准库 + 3 个小型包(croniter, lancedb, websocket-client)。
26 个工具。8 个文件。24/7 全天候运行。
由个人利用 AI 辅助开发工具在 3 个月内构建完成。已在生产环境 24/7 运行。
create_tool)。 +-----------------+
| Messaging |
| Platform |
+--------+--------+
|
+--------v--------+
| router.py | Multi-tenant routing
| (per-user | Auto-provision containers
| containers) |
+--------+--------+
|
+--------v--------+
| xiaowang.py | Entry point
| HTTP server | Callback handling
| Debounce | Media download
| ASR pipeline | File persistence
+--------+--------+
|
+--------v--------+
| llm.py | Tool Use Loop (core)
| LLM API call | Session management
| System prompt | Cross-session context
| Multimodal | Memory injection
+--------+--------+
|
+--------------+--------------+
| | |
+--------v---+ +------v------+ +----v--------+
| tools.py | | memory.py | |scheduler.py |
| 26 built-in | | 3-stage | | cron + once |
| tools + | | pipeline: | | jobs.json |
| plugin sys | | compress | | persistent |
| + MCP bridge| | deduplicate| | tz-aware |
+------+------+ | retrieve | +-------------+
| +------------+
+------v------+
|mcp_client.py| JSON-RPC over stdio/HTTP
| MCP protocol| Namespace: server__tool
| Auto-reconnect Hot-reload support
+-------------+
Layer 1: Session (short-term)
- Last 40 messages per session, JSON files
- Overflow triggers compression
Layer 2: Compressed (long-term)
- LLM extracts structured facts from evicted messages
- Deduplication via cosine similarity (threshold: 0.92)
- Stored as vectors in LanceDB
Layer 3: Retrieval (active recall)
- User message -> embedding -> vector search
- Top-K relevant memories injected into system prompt
- Zero-latency cache for hardware/voice channels
| 类别 | 工具 |
|---|---|
| 核心 | exec, message |
| 文件 | read_file, write_file, edit_file, list_files |
| 调度 | schedule, list_schedules, remove_schedule |
| 媒体发送 | send_image, send_file, send_video, send_link |
| 视频 | trim_video, add_bgm, generate_video |
| 搜索 | web_search (多引擎: Tavily, web, GitHub, HuggingFace) |
| 记忆 | search_memory, recall (向量语义搜索) |
| 诊断 | self_check, diagnose |
| 插件 | create_tool, list_custom_tools, remove_tool |
| MCP | reload_mcp |
git clone https://github.com/your-username/724-office.git
cd 724-office
cp config.example.json config.json
# Edit config.json with your API keys
pip install croniter lancedb websocket-client
# Optional: pilk (for WeChat silk audio decoding)
mkdir -p workspace/memory workspace
724-office 是一个采用纯 Python 编写的生产级自主进化 AI Agent 系统,旨在脱离主流框架依赖实现 7x24 小时的全天候自动化运行。通过简洁高效的架构设计,它为用户提供了一个具备自我修复、自主学习及多任务处理能力的 AI 代理开发与运行环境。
项目内置包括文件处理、多媒体编辑、网页搜索及向量检索在内的 26 种基础工具,支持通过 MCP 协议动态加载插件。系统具备三层记忆架构,能够实现从实时对话到长期语义记忆的完整闭环。该系统支持运行时动态创建和调试 Python 工具,具备完善的自我健康诊断与故障恢复机制。其调度引擎可处理循环任务,并提供基于 Docker 的多租户路由功能,轻松对接企业微信等主流消息平台。
该项目适合希望构建轻量化、高可控性 AI Agent 的开发者或企业团队,特别适用于需要长期稳定运行、处理复杂任务流以及高度自动化办公的场景。