Skip to content

feat: SubAgent multi-role system, Cron scheduler, and Sessions UI#4

Merged
robscc merged 1 commit intomainfrom
feat/sub-agent-system-and-cron-jobs
Mar 13, 2026
Merged

feat: SubAgent multi-role system, Cron scheduler, and Sessions UI#4
robscc merged 1 commit intomainfrom
feat/sub-agent-system-and-cron-jobs

Conversation

@robscc
Copy link
Owner

@robscc robscc commented Mar 13, 2026

Summary

  • SubAgent 多角色系统:独立上下文/记忆/模型配置,角色定义 CRUD,基于 task_type 的任务路由,Agent 间 MessageBus 异步通信
  • 定时任务系统:asyncio 后台调度器 + croniter,CronAgent 轻量执行(只加载 SOUL.md + AGENTS.md),完整执行日志,结果通知主 Agent
  • 会话管理页面:可搜索的 Session 列表,展示模型/消息数/时间信息,快捷跳转对话
  • 会话信息面板优化:卡片式工具/技能切换(替代 checkbox),模型 badge,统计网格
  • LLM 对话 E2E 测试:发送消息验证回复、多轮对话记忆、清空对话、会话列表更新
  • CLAUDE.md 全面更新:反映当前架构、API 路由、测试策略、已知问题

新增文件

类别 文件
Models agent.py, cron.py, message.py
Agents cron_agent.py, message_bus.py, registry.py
Services cron_scheduler.py
API sub_agents.py, cron.py
Frontend SessionsPage.tsx, useSubAgents.ts, useCron.ts
Tests test_registry.py, test_message_bus.py, test_cron_manager.py, test_sub_agent_cron_api.py

测试结果

  • 195 unit + integration tests ✅
  • 21 e2e tests ✅ (含 4 个 LLM 对话测试)

Test plan

  • 单元测试全部通过 (195 tests)
  • E2E 测试全部通过 (21 tests)
  • LLM 对话 E2E:发送/接收/多轮/清空
  • 会话管理页面:加载/列表/搜索
  • 导航新增会话入口
  • 会话信息面板卡片式 UI
  • 历史 E2E 测试回归通过

🤖 Generated with Claude Code

…M e2e tests

Backend:
- SubAgent role-based routing with independent context/memory/model config
- Inter-agent MessageBus (request/response/notify/broadcast)
- CronScheduler (asyncio background task + croniter) with CronAgent execution
- Complete execution logging for both SubAgent tasks and Cron jobs
- New API endpoints: /sub-agents CRUD, /cron CRUD + executions
- Session list API now returns model_name and channel
- API endpoints properly commit DB transactions

Frontend:
- SessionsPage: searchable session list with model/message/time info
- ChatPage meta panel: card-style tool/skill toggles, model badge, stats grid
- Navigation: added Sessions entry
- API types and hooks for SubAgents and Cron

Tests:
- 39 new unit tests (registry, message_bus, cron_manager)
- 15 new integration tests (sub_agent + cron API)
- 7 new e2e tests (LLM conversation, multi-turn, sessions page)
- All 216 tests passing (195 unit/integration + 21 e2e)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@robscc robscc merged commit 92cd031 into main Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant