# SmartFlow-Agent ## API Docs - 用户模块 [注册](https://oqg5uiubh0.apifox.cn/412889678e0.md): 用户注册 - 用户模块 [登录](https://oqg5uiubh0.apifox.cn/412889749e0.md): 用户登录 - 用户模块 [刷新Token](https://oqg5uiubh0.apifox.cn/412890749e0.md): 传入RefreshToken,获取全新的双Token - 用户模块 [登出](https://oqg5uiubh0.apifox.cn/412891757e0.md): 将用户状态标记为登出,使得刷新token无法获取新token,只能通过用户登录接口重新登录 - 任务模块 [获取任务队列中的任务](https://oqg5uiubh0.apifox.cn/412896921e0.md): type=1/2/3/4,分别对应重要且紧急,重要不紧急,简单不重要,不简单不重要 - 任务模块 [新增任务至任务队列](https://oqg5uiubh0.apifox.cn/412911635e0.md): 新增任务至任务队列 - 任务模块 [标记任务为完成](https://oqg5uiubh0.apifox.cn/429082228e0.md): 将当前登录用户的某个任务标记为已完成。 - 任务模块 [取消任务已完成勾选](https://oqg5uiubh0.apifox.cn/429291527e0.md): 将指定任务从 is_completed=true 恢复为 is_completed=false。 - 任务模块 [更新任务属性(部分更新)](https://oqg5uiubh0.apifox.cn/448667097e0.md): 修改四象限任务的标题、象限、截止时间、紧急分界时间。 - 任务模块 [删除任务(硬删除)](https://oqg5uiubh0.apifox.cn/448667098e0.md): 永久删除指定任务。 - 日程模块 [今日日程一览](https://oqg5uiubh0.apifox.cn/412900931e0.md): 获取课表+日程混合的今日总日程一览 - 日程模块 [正式应用日程](https://oqg5uiubh0.apifox.cn/413441810e0.md): 当用户对预览结果满意并点击“正式应用”按钮时调用。此接口会将预览建议的排程信息结合用户可能拖动修改后的信息正式写入 schedules(日程表)并更新 task_items 的状态。 - 日程模块 [获取周总日程](https://oqg5uiubh0.apifox.cn/413444692e0.md): 该接口用于拉取指定周次的完整课表与任务安排。 核心逻辑: - 日程模块 [获取最近已完成任务列表](https://oqg5uiubh0.apifox.cn/413445729e0.md): 用于渲染“最近已完成动态任务”模块(对应 image_71da9f.png 左侧红框)。返回最近随着时间流逝自动被标记为完成的任务,以便用户在需要重新安排时进行撤回。 - 日程模块 [撤回任务完成状态](https://oqg5uiubh0.apifox.cn/413446603e0.md): 核心逻辑:点击后,该任务在数据库中的状态将从“已完成”变回“未安排”(Note 21),并重新出现在排程中心或任务队列中。 - 日程模块 [智能一键编排](https://oqg5uiubh0.apifox.cn/413437420e0.md): 点击右上角蓝色按钮。后端计算出最优解并返回一个预览结果,此时数据库并不真正修改日程。 - 日程模块 [删除日程/解除安排](https://oqg5uiubh0.apifox.cn/416891277e0.md): 若是课程,则直接删除;若是任务块,则解除安排。若需删除任务块,则需移步任务类管理区域。 - 日程模块 [获取当前正在进行的任务](https://oqg5uiubh0.apifox.cn/418125472e0.md): 若现在是下课时间/空闲时间,获取下一个任务; - 日程模块 [批量智能粗排](https://oqg5uiubh0.apifox.cn/431420569e0.md): 传入 task_class_ids 后,服务端会基于多个任务类生成统一粗排结果。 - Agent模块 > Memory [列出当前用户的记忆](https://oqg5uiubh0.apifox.cn/444867175e0.md): 返回当前登录用户可管理的记忆列表。 - Agent模块 > Memory [新增一条记忆](https://oqg5uiubh0.apifox.cn/444867176e0.md): - Agent模块 > Memory [查看单条记忆详情](https://oqg5uiubh0.apifox.cn/444867177e0.md): - Agent模块 > Memory [修改一条记忆](https://oqg5uiubh0.apifox.cn/444867178e0.md): - Agent模块 > Memory [删除一条记忆](https://oqg5uiubh0.apifox.cn/444867179e0.md): 软删除,成功后返回删除后的记忆条目 - Agent模块 > Memory [恢复一条记忆](https://oqg5uiubh0.apifox.cn/444867180e0.md): 把 `archived` 或 `deleted` 记忆恢复为 `active` - Agent模块 [AI Agent&聊天](https://oqg5uiubh0.apifox.cn/424318137e0.md): 本接口既支持带着消息新建对话,也支持通过旧对话继续聊天。 在 JSON 中传入 conversation_id,后端查库:存在则延续,不存在则创建新对话后再聊天。 - Agent模块 [查询会话元信息](https://oqg5uiubh0.apifox.cn/427955442e0.md): 根据 conversation_id 查询当前用户的会话元信息。 - Agent模块 [获取当前用户会话列表](https://oqg5uiubh0.apifox.cn/428458024e0.md): 分页获取当前登录用户的会话列表 - Agent模块 [查询排程预览](https://oqg5uiubh0.apifox.cn/431489660e0.md): 该接口只读 Redis 中的排程预览快照,不会触发新的排程计算。 - Agent模块 [获取会话列表](https://oqg5uiubh0.apifox.cn/432943096e0.md): - Agent模块 [获取会话历史](https://oqg5uiubh0.apifox.cn/434898895e0.md): 返回指定会话的聊天历史。 - Agent模块 [获取上下文窗口 token 分布统计](https://oqg5uiubh0.apifox.cn/444220413e0.md): 查询指定会话的 Execute 阶段上下文窗口实时 token 分布。 - Agent模块 [暂存前端日程调整](https://oqg5uiubh0.apifox.cn/445873831e0.md): 前端在 confirm 卡片上拖拽调整任务位置后,调用此接口将调整后的 task_item 暂存到 Redis 快照。 - 监控模块 [获取 Token 消耗监控](https://oqg5uiubh0.apifox.cn/413447091e0.md): 返回用户当前周与 AI Agent 对话所消耗的 Token 数量(Note 22),用于前端渲染进度条。 - 任务类模块 [创建任务类](https://oqg5uiubh0.apifox.cn/412914387e0.md): - 任务类模块 [获取任务类列表](https://oqg5uiubh0.apifox.cn/415310932e0.md): 获取该用户所有任务类列表 - 任务类模块 [修改任务类](https://oqg5uiubh0.apifox.cn/415385632e0.md): - 任务类模块 [获取完整任务类](https://oqg5uiubh0.apifox.cn/415464994e0.md): 获取完整任务类,用于修改/展开某任务类 - 任务类模块 [将任务块加入日程](https://oqg5uiubh0.apifox.cn/415967126e0.md): 将既定任务块加入日程 - 任务类模块 [删除任务块](https://oqg5uiubh0.apifox.cn/416891974e0.md): 传入任务块id,并删除任务块 - 任务类模块 [删除任务类](https://oqg5uiubh0.apifox.cn/416891990e0.md): 传入任务类id,删除任务类 - 学校课程模块 [批量导入课程](https://oqg5uiubh0.apifox.cn/412910352e0.md): 用户在底部的“课程列表”确认无误后,点击右下角的“确认”按钮,一次性提交全量数据。 - 学校课程模块 [预检查新增课程合法性](https://oqg5uiubh0.apifox.cn/412909620e0.md): 后端检查课程名称是否为空、上课周数是否合法、多个时间段是否有冲突等。