Files
aiagent/backend/scripts/create_homework_manager_agent_3.py
renjianbo 09467568ec feat: Agent 运行时、对话 API、作业助手与引擎修复及前端执行超时
- agent_runtime 模块与 agent_chat API,前端 AgentChat 视图与路由对接
- workflow_engine: code 节点命名空间与 json 引用修复
- llm_service: 工具调用 extra_body(如 DeepSeek)
- create_homework_manager_agent / _3 脚本与测试脚本扩展
- frontend: WORKFLOW_EXECUTION_HTTP_TIMEOUT_MS、AgentChatPreview/MainLayout 等
- 文档:架构说明与自主 Agent 改造完成情况

Made-with: Cursor
2026-05-01 11:31:48 +08:00

39 lines
1.4 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env python3
"""
一键创建或更新「学生作业管理助手3号」
- 画布与作业链路与 2 号相同Cache user_memory_* → LLM → Code 拆 JSON → 写回)。
- **基础设施**与 2 号同档(长 TTL、history 上限、8192 max_tokens、DeepSeek 关闭 thinking 等)。
- **记忆方案**显式对齐知你客服 14 号 / `agent记忆实现方案.md`(见主脚本内 HOMEWORK_V3_ZHINI14_APPEND + 完整版提示词)。
等价于:
AGENT_NAME=学生作业管理助手3号 .\\venv\\Scripts\\python.exe scripts\\create_homework_manager_agent.py
用法:
cd backend && .\\venv\\Scripts\\python.exe scripts\\create_homework_manager_agent_3.py
"""
from __future__ import annotations
import importlib.util
import os
import sys
BACKEND_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
if BACKEND_DIR not in sys.path:
sys.path.insert(0, BACKEND_DIR)
def _run() -> int:
# 必须覆盖外层 shell 里可能残留的 AGENT_NAME如 2 号),否则会误改 2 号
os.environ["AGENT_NAME"] = "学生作业管理助手3号"
path = os.path.join(os.path.dirname(__file__), "create_homework_manager_agent.py")
spec = importlib.util.spec_from_file_location("_homework_agent_mod", path)
mod = importlib.util.module_from_spec(spec)
assert spec.loader is not None
spec.loader.exec_module(mod)
return int(mod.main())
if __name__ == "__main__":
raise SystemExit(_run())