Browse / General-purpose / R-Agent
R-Agent
CiCiStone
a implement of self-evaluation Agent Architecture with 4 level Agent-memory。
Open CiCiStone/R-Agent → Does not match the four rules.
Does not say
no agent config and no instruction file at the root.
In its own words
A lightweight, deployable AI Agent CLI powered by ReAct loop and 4-layer memory.
R-Agent 是一个轻量级、可部署的具有自我进化能力的Agent。基于 ReAct 循环(Think → Act → Observe)驱动,配有四层记忆系统、SQLite 持久化、Skills 插件机制、MCP 工具协议支持,以及一个实时 Web 日志面板。
🔌 MCP 协议
连接外部 MCP 服务器,自动发现工具并注册到 Agent。
工具自动注册为 mcp__ __ 格式,通过 /fresh_mcp 热刷新。
包含一个 Python demo server (tools/mcp_demo_server.py) 用于测试。
📊 Web 日志面板
实时查看 Agent 工作过程,每条消息可点击展开查看原始 JSON。
- 会话选择器,切换历史对话
- 消息时间线,按角色着色
- 思考链折叠展开
- 工具调用参数/结果详情
- 2 秒自动轮询新消息
- Token 用量统计
GET /api返回完整 API 文档
📖 配置
模型参数
在 AgentConfig 中配置 (或通过 CLI 参数):
🧠 Agent 记忆管理
Ragent 的记忆系统由 运行时四层结构 和 持久化文件系统 两部分组成,确保 Agent 在长程任务中不丢失上下文。
持久化存储
每一条消息都写入 SQLite (data/memory.db), 包含 20 个详细字段:
文件记忆
Agent 在对话结束后, 通过 update_memory 工具主动维护这些文件。写入规则: 精简, 一句话能说清不写两句, 不记录废话。
🔄 Agent 自我进化
1. Skills 技能积累
Skills 是 Agent 的 程序性记忆 — 一套可复用的操作流程。每次写完新的 skill, Agent 不需要重启就能立即使用。Skill 文件放在 skills/ 目录, 通过 Markdown 编写, 热加载到系统提示词中。
2. 高光记忆 (lightspot)
跨项目的 可复用经验和踩坑记录。当同一个技巧出现 2 次以上, Agent 会自动将其沉淀到 light_spot_memory.md:
每次 Agent 启动, light_spot 内容注入系统提示词前 3000 字符。Agent 在推理时能看到这些经验, 遇到类似场景自动调用。完整文件可在 config/soul/light_spot_memory.md 中查阅。
3. 用户模型与项目记忆
Agent 在每次对话结束后, 自动评估是否需要更新这些记忆文件:
- 用户反复提到某个偏好 → 写入 user_preference
- 项目结构发生变化 → 更新 project_memory
- 遇到值得记录的技巧/坑 → 写入 light_spot
🤝 参考
- Hermes Agent — Agent 循环与工具系统
- CodeBuddy — Skills 与 Agent 定义
- MCP Protocol — 工具协议
- DeepSeek API — 思考模式
Quoting 95% of the README. Read the rest on GitHub ↗
Read from the repository's git tree on 2026-08-17.