🧠 Web 4.0 进化系统
NeoWeb AI 的核心不是一个固定的聊天机器人——它是一个能自主学习、持续进化的智能体。本文档详细介绍如何配置和使用进化系统的各项能力。
一、北极星目标系统
北极星目标是 NeoWeb AI 的顶层指引。设定后,AI 的所有自主行为(进化、学习、感知)都会朝着北极星方向推进。
目标层级
- 🌟 北极星(North Star):唯一的终极目标,长期方向。例如:「成为全栈开发专家」「把公司官网做到行业第一」
- 📌 里程碑(Milestone):北极星下的阶段性目标,有截止日期和进度百分比
- 📋 任务(Task):里程碑下的具体可执行任务
设置北极星
在聊天中直接告诉 AI:
你的北极星目标是:让我的项目在3个月内上线并获得1000个用户。
第一个里程碑:完成核心功能开发,截止4月30日。
也可以通过 API 设置:
# 设置北极星目标
curl -X POST http://localhost:3001/api/goals/north-star \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{"title":"项目3个月上线","description":"核心功能→内测→公测→正式上线","deadline":"2026-06-30"}'
# 添加里程碑
curl -X POST http://localhost:3001/api/goals \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{"title":"完成核心功能","level":"milestone","parent_id":"NORTH_STAR_ID","deadline":"2026-04-30"}'
# 查看目标树
curl http://localhost:3001/api/goals -H "Authorization: Bearer YOUR_TOKEN"
目标进度
AI 完成与目标相关的任务后,会自动推进里程碑进度。里程碑进度的平均值会同步更新到北极星目标。你也可以手动调整进度。
二、自我进化引擎
进化引擎是 NeoWeb AI 的学习大脑。它在你使用过程中不断分析、学习、自我提升。
三种进化模式
| 模式 | 触发条件 | 行为 |
|---|---|---|
| 🔧 FIX(修正) | 任务执行失败 | 分析失败原因,写入策略修正记忆。下次遇到类似任务不再重复犯错。 |
| 📦 CAPTURED(捕获) | 同类操作成功3次 | 自动固化为可复用技能脚本,存入技能库。 |
| 🧬 DERIVED(衍生) | 分析成功模式 | 从成功经验中提炼通用策略,应用到新场景。 |
触发进化
# 手动触发一次进化循环
curl -X POST http://localhost:3001/api/evolution/run \
-H "Authorization: Bearer YOUR_TOKEN"
# 查看进化历史
curl http://localhost:3001/api/evolution/history \
-H "Authorization: Bearer YOUR_TOKEN"
自动进化
进化引擎默认通过心跳系统自动运行:
- 每日进化:每天自动执行一次完整进化循环(分析任务历史、提炼技能、修正策略)
- 空闲进化:AI 空闲超过 2 小时后才会启动感知/进化/自主任务,绝不打扰你的正常使用
- 失败即学:任何工具执行失败都会立即触发 FIX 模式记忆
三、持久记忆系统
NeoWeb AI 不会像普通聊天机器人一样"失忆"。它拥有完整的记忆系统。
记忆层级
- 即时记忆:当前对话上下文(最近 8 条消息)
- 工作记忆:项目级知识(PROJECT.md、代码结构等)
- 长期记忆:语义搜索的持久化记忆(存储在数据库中)
记忆特性
- 语义搜索:智能语义检索,能准确找到相关记忆
- 重要性分级:1-10 级,高重要性记忆永不被清理
- 自动摘要:超过 20 条记忆自动生成摘要压缩
- 自动精华:超过 200 条记忆自动保留高价值内容
管理记忆
记住:我的服务器 IP 是 xxx.xxx.xxx.xxx,账号 admin
记住:部署前必须先跑测试,测试全绿才能上线
忘掉关于旧服务器的所有记忆
四、环境感知引擎
NeoWeb AI 能主动感知你的工作环境,而不是被动等待你的输入。
四大感知维度
| 维度 | 监测内容 | 响应 |
|---|---|---|
| 📁 文件感知 | 监听桌面新文件 | 自动理解文件内容,写入记忆。如"检测到新的设计稿,已记录" |
| 💻 系统感知 | CPU、内存、磁盘、服务 | 资源告警、服务宕机提醒 |
| 🔀 Git 感知 | 代码仓库变更 | 新提交自动分析、代码审查 |
| ⏰ 时间感知 | 定时任务队列 | 按计划自动执行任务 |
感知配置
感知功能通过心跳系统自动运行,你可以通过 API 调整配置:
# 查看感知事件
curl http://localhost:3001/api/perception/events \
-H "Authorization: Bearer YOUR_TOKEN"
# 查看系统资源状态
curl http://localhost:3001/api/resource/status \
-H "Authorization: Bearer YOUR_TOKEN"
# 查看服务存活
curl http://localhost:3001/api/resource/services \
-H "Authorization: Bearer YOUR_TOKEN"
五、信任与安全机制
AI 拥有自主权不意味着失控。NeoWeb AI 内置完整的信任分层机制。
信任级别
- 完全自动:安全操作(读文件、搜索、分析)直接执行
- 通知执行:中等风险操作(写文件、Shell 命令)执行后通知
- 需要审批:高风险操作(SSH 远程、删除文件)等你确认才执行
- 紧急停止:一键暂停所有自主行为
管理信任
# 查看待审批操作
curl http://localhost:3001/api/trust/pending \
-H "Authorization: Bearer YOUR_TOKEN"
# 查看审计日志
curl http://localhost:3001/api/trust/audit \
-H "Authorization: Bearer YOUR_TOKEN"
# 紧急停止所有自主行为
curl -X POST http://localhost:3001/api/trust/emergency-stop \
-H "Authorization: Bearer YOUR_TOKEN"
# 查看/修改信任配置
curl http://localhost:3001/api/trust/config \
-H "Authorization: Bearer YOUR_TOKEN"
六、心跳系统
心跳系统是进化引擎的"心脏",驱动所有自主行为。
两种心跳模式
- 快心跳:定期检查待处理消息、任务到期提醒、服务健康
- 慢心跳:环境感知扫描、记忆整理、进化检查
安全保障
- AI 空闲超过 2 小时后才允许执行自主任务(感知/进化/学习)
- 正在对话时心跳只做轻量检查,绝不抢占资源
- 自主任务优先使用本地模型,不消耗你的云端 API 额度
七、快速上手
安装完 NeoWeb AI 后,进化系统默认是开启的。你只需做 3 件事:
第 1 步:设定北极星目标
告诉 AI 你的终极目标:
你的北极星目标是:帮我把 XXX 项目做到行业领先。
第 2 步:正常使用
像平时一样跟 AI 对话、下达任务。每一次成功和失败都在为进化引擎积累数据。
第 3 步:观察进化
几天后你会发现:
- AI 对你的项目越来越熟悉,不需要反复解释上下文
- 常用操作变成了一句话技能,速度快了数倍
- 之前失败过的任务现在能自动避坑成功
- AI 会主动提醒你遗漏的事项
🧠 Web 4.0 Evolution System
NeoWeb AI's core isn't a static chatbot — it's an autonomous agent that learns and evolves continuously. This guide covers how to configure and use every aspect of the evolution system.
1. North Star Goal System
The North Star is NeoWeb AI's top-level directive. Once set, all autonomous behavior (evolution, learning, perception) aligns toward your North Star.
Goal Hierarchy
- 🌟 North Star: Your single ultimate objective — long-term direction. e.g., "Become a full-stack expert" or "Make our website #1 in the industry"
- 📌 Milestone: Phased goals under the North Star, with deadlines and progress percentages
- 📋 Task: Concrete, actionable items under each milestone
Setting a North Star
Just tell the AI in chat:
Your North Star goal is: Launch my project within 3 months and get 1000 users.
First milestone: Complete core features by April 30.
Or via API:
# Set North Star
curl -X POST http://localhost:3001/api/goals/north-star \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{"title":"Launch in 3 months","description":"Core → Beta → Public → Launch","deadline":"2026-06-30"}'
# Add milestone
curl -X POST http://localhost:3001/api/goals \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{"title":"Complete core features","level":"milestone","parent_id":"NORTH_STAR_ID","deadline":"2026-04-30"}'
# View goal tree
curl http://localhost:3001/api/goals -H "Authorization: Bearer YOUR_TOKEN"
Goal Progress
After completing tasks related to your goals, AI automatically advances milestone progress. The average progress of all milestones syncs to the North Star. You can also manually adjust progress.
2. Self-Evolution Engine
The evolution engine is NeoWeb AI's learning brain — constantly analyzing, learning, and improving as you use it.
Three Evolution Modes
| Mode | Trigger | Behavior |
|---|---|---|
| 🔧 FIX | Task execution failure | Analyzes failure cause, writes strategy correction to memory. Never repeats the same mistake. |
| 📦 CAPTURED | Same operation succeeds 3 times | Auto-captures it as a reusable skill script, stored in the skill library. |
| 🧬 DERIVED | Success pattern analysis | Extracts general strategies from successes, applies them to new scenarios. |
Triggering Evolution
# Manually trigger an evolution cycle
curl -X POST http://localhost:3001/api/evolution/run \
-H "Authorization: Bearer YOUR_TOKEN"
# View evolution history
curl http://localhost:3001/api/evolution/history \
-H "Authorization: Bearer YOUR_TOKEN"
Automatic Evolution
The evolution engine runs automatically via the heartbeat system:
- Daily evolution: One full cycle per day (analyze task history, capture skills, correct strategies)
- Idle evolution: Only starts after 2+ hours of idle time — never interrupts your work
- Fail-fast learning: Any tool execution failure immediately triggers FIX mode memory
3. Persistent Memory System
NeoWeb AI doesn't "forget" like ordinary chatbots. It has a complete memory architecture.
Memory Layers
- Instant memory: Current conversation context (last 8 messages)
- Working memory: Project-level knowledge (PROJECT.md, code structure, etc.)
- Long-term memory: Semantically searchable persistent memory (stored in database)
Memory Features
- Semantic search: Intelligent semantic retrieval for accurate recall
- Importance scoring: 1-10 scale; high-importance memories are never cleaned up
- Auto-summarization: Beyond 20 memories, auto-generates compressed summaries
- Auto-distillation: Beyond 200 memories, retains only high-value content
Managing Memory
Remember: My server IP is xxx.xxx.xxx.xxx, user admin
Remember: Always run tests before deploying — only deploy when all green
Forget everything about the old server
4. Environment Perception Engine
NeoWeb AI proactively senses your environment instead of passively waiting for input.
Four Perception Dimensions
| Dimension | Monitors | Response |
|---|---|---|
| 📁 File | Desktop new files | Auto-understands content, writes to memory |
| 💻 System | CPU, memory, disk, services | Resource alerts, service down warnings |
| 🔀 Git | Repository changes | Auto-analysis of new commits, code review |
| ⏰ Time | Scheduled task queue | Executes tasks on schedule |
Perception APIs
# View perception events
curl http://localhost:3001/api/perception/events \
-H "Authorization: Bearer YOUR_TOKEN"
# System resource status
curl http://localhost:3001/api/resource/status \
-H "Authorization: Bearer YOUR_TOKEN"
# Service health
curl http://localhost:3001/api/resource/services \
-H "Authorization: Bearer YOUR_TOKEN"
5. Trust & Safety
Autonomy doesn't mean losing control. NeoWeb AI has a complete trust-layered safety mechanism.
Trust Levels
- Fully automatic: Safe operations (read files, search, analyze) — executes directly
- Notify after: Medium risk (write files, Shell commands) — executes then notifies
- Approval required: High risk (SSH remote, delete files) — waits for your confirmation
- Emergency stop: One-click halt of all autonomous behavior
Managing Trust
# View pending approvals
curl http://localhost:3001/api/trust/pending \
-H "Authorization: Bearer YOUR_TOKEN"
# View audit log
curl http://localhost:3001/api/trust/audit \
-H "Authorization: Bearer YOUR_TOKEN"
# Emergency stop all autonomous behavior
curl -X POST http://localhost:3001/api/trust/emergency-stop \
-H "Authorization: Bearer YOUR_TOKEN"
6. Heartbeat System
The heartbeat is the "heart" of the evolution engine, powering all autonomous behavior.
Two Heartbeat Modes
- Fast heartbeat: Periodically checks pending messages, task reminders, service health
- Slow heartbeat: Environment perception, memory maintenance, evolution checks
Safety Guarantees
- Autonomous tasks only run after 2+ hours idle — never while you're actively using it
- During conversations, heartbeat only does lightweight checks, never competes for resources
- Autonomous tasks prefer local models — won't consume your cloud API quota
7. Quick Start
After installing NeoWeb AI, the evolution system is enabled by default. You just need 3 things:
Step 1: Set a North Star
Your North Star goal is: Help me make XXX project the industry leader.
Step 2: Use Normally
Chat with AI, assign tasks as usual. Every success and failure feeds the evolution engine.
Step 3: Watch It Evolve
After a few days you'll notice:
- AI knows your project deeply — no need to re-explain context
- Frequent operations become one-sentence skills, several times faster
- Previously failed tasks now succeed by avoiding known pitfalls
- AI proactively reminds you of things you missed