Commit Graph

63 Commits

Author SHA1 Message Date
朱潮
f694101747 refactor: migrate from Memori to Mem0 for long-term memory
Replace Memori with Mem0 for memory management:
- Delete memori_config.py, memori_manager.py, memori_middleware.py
- Add mem0_config.py, mem0_manager.py, mem0_middleware.py
- Update environment variables (MEMORI_* -> MEM0_*)
- Integrate Mem0 with LangGraph middleware
- Add sync connection pool for Mem0 in DBPoolManager
- Move checkpoint message prep to config creation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 21:15:30 +08:00
朱潮
4d6ee6ae0c fix: pass db_url to init_global_memori
Add db_url property to MemoriManager that falls back to
CHECKPOINT_DB_URL setting, and pass it explicitly from
fastapi_app.py to ensure Memori can create sync connections.

This fixes the error "Either db_pool or db_url must be provided"
when recalling memories.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-20 08:27:34 +08:00
朱潮
456bcf50e6 refactor: move Memori initialization to fastapi_app.py
Move init_global_memori from deep_assistant.py to fastapi_app.py
lifespan function for proper application-level initialization.

This ensures Memori is initialized once at startup and closed at
shutdown, rather than checking and potentially initializing on every
agent creation.

Changes:
- fastapi_app.py: Add Memori init/close in lifespan
- deep_assistant.py: Simplify to only get memori_manager

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-20 00:15:21 +08:00
朱潮
af63c54778 db_pool 2026-01-19 23:39:04 +08:00
朱潮
342932030f feat(skills): add skill management API module
- Create new skill_manager.py with list and upload endpoints
- Add GET /api/v1/skill/list to retrieve official and user skills
- Add POST /api/v1/skill/upload for skill file upload
- Parse SKILL.md frontmatter to extract name and description
- Move skill upload endpoint from files.py to skill_manager.py
- Add SKILLS_DIR configuration to settings.py
- Register skill_manager router in fastapi_app.py

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-07 19:45:04 +08:00
朱潮
1233bdda0c ♻️ refactor(deep-agent): customize agent memory middleware path display
- Change workspace_root from ~/.deepagents/{bot_id} to projects/robot/{bot_id}
- Refactor CustomSkillsMiddleware to support user and project skills separately
- Update skill path formatting for better visibility in system prompts
- Remove unused symlink_utils module and related setup code
- Clean up imports in fastapi_app.py and utils/__init__.py
2026-01-07 12:05:40 +08:00
朱潮
b86a8364e9 db 2025-12-24 11:05:10 +08:00
朱潮
e117f1ee07 新增checkpoint清理机制 2025-12-24 00:12:01 +08:00
朱潮
d8dc973b95 sqlite pool and change agent cache to tools cache 2025-12-23 22:18:18 +08:00
朱潮
aaad9df20a add skills 2025-12-22 23:47:12 +08:00
朱潮
b78b178c03 删除agent manager 2025-12-17 20:27:06 +08:00
朱潮
3973174c83 日志优化 2025-11-27 21:50:03 +08:00
朱潮
e2b4ed64ef update file_manager 2025-11-25 22:49:09 +08:00
朱潮
fe6c4f77d7 update fastapi 2025-11-25 22:34:44 +08:00
朱潮
294fb708b8 add language 2025-11-25 21:12:06 +08:00
朱潮
7cc05c2c24 add guideline 2025-11-25 20:13:29 +08:00
朱潮
277fcca3d1 add guideline 2025-11-25 19:40:50 +08:00
朱潮
ef7cb7560f 删除model_client 2025-11-20 20:54:38 +08:00
朱潮
37784ebefe 优化向量检索 2025-11-20 19:36:19 +08:00
朱潮
b9f6928b50 embedding 模型独立为api 2025-11-20 13:29:44 +08:00
朱潮
081089a053 general_agent 2025-11-16 20:11:46 +08:00
朱潮
bd93ae663d add generic_agent 2025-11-16 19:46:27 +08:00
朱潮
ed3c28174a 性能优化 2025-11-16 12:25:45 +08:00
朱潮
0ac0fcbfb3 添加datetime & process_message逆运算 2025-11-14 00:28:08 +08:00
朱潮
c1a06aae35 优化后的逻辑:
1. 收集所有ASSISTANT消息的索引位置
  2. 根据消息在ASSISTANT序列中的位置判断是否为最近10条
  3. 对不同位置的消息应用不同的数据保留策略:
    - 非最近10条: 只保留 [ANSWER]
    - 最近10条: 保留完整信息([TOOL_CALL]、[TOOL_RESPONSE]、[ANSWER])
2025-11-12 21:30:46 +08:00
朱潮
6c1393e96a 新增user_identifier 2025-11-12 19:11:45 +08:00
朱潮
1174767211 remove top_k 2025-11-12 11:53:22 +08:00
朱潮
2c4a839cef process_messages 2025-11-10 17:54:35 +08:00
朱潮
0478163b2d 保留tool_reponse 2025-11-10 17:47:27 +08:00
朱潮
74f6c1b9eb response 2025-11-10 10:05:07 +08:00
朱潮
41c6e010d1 修改robot目录窗口逻辑 2025-11-09 13:08:43 +08:00
朱潮
035b8338cc 新增folder支持版本控制 2025-11-09 12:37:18 +08:00
朱潮
09690a101e 新增folder功能,删除unique_id 2025-11-09 11:54:03 +08:00
朱潮
d00601af23 新增队列管理后台 2025-11-09 10:31:23 +08:00
朱潮
d5a989860c add public 2025-11-08 20:23:04 +08:00
朱潮
25dec10b67 add webdav 2025-11-07 14:06:54 +08:00
朱潮
bff5817520 add /api/v1/files/process/incremental 2025-11-05 10:33:46 +08:00
朱潮
40aa71b966 add v2 api 2025-11-04 23:16:21 +08:00
朱潮
ed609eba6c add file tree 2025-11-01 00:23:22 +08:00
朱潮
432fb214d4 suport dataset_ids 2025-10-30 21:50:43 +08:00
朱潮
29a3a17d28 新增dataset逻辑 2025-10-30 21:19:39 +08:00
朱潮
02a6d3e0d7 修改了助手实例的缓存机制,现在缓存key的生成会同时考虑 mcp_settings 和 prompt 参数。 2025-10-29 12:14:17 +08:00
朱潮
f13b1aaec9 add upload 2025-10-28 14:48:30 +08:00
朱潮
70dcffbb7a 处理 tool_call字符串 2025-10-27 22:09:34 +08:00
朱潮
dd8d9f5680 处理 tool_call字符串 2025-10-27 21:40:42 +08:00
朱潮
044a40175b add robot_type 2025-10-23 16:31:37 +08:00
朱潮
42a14088f8 mcp dataset_dir placeholder 2025-10-22 22:00:38 +08:00
朱潮
76eea19b18 modify prompt 2025-10-22 00:45:32 +08:00
朱潮
213ed20502 remove process file 2025-10-19 22:12:27 +08:00
朱潮
1f81bef8c6 Squashed commits: various improvements and refactoring
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-19 22:02:25 +08:00