feat: add Prompt template library, agent_call inter-agent tool, and RAG memory

- New PromptTemplatePicker component for browsing 13 preset prompt templates
- AgentConfig.vue: "Load from library" button for system prompt
- Agents.vue: "Create from Prompt template" entry with agent node + RAG memory
- seed_prompt_templates.py: 13 preset templates (客服/研发/教育/内容/分析/创意/健康医疗)
- agent_call tool: agents can delegate tasks to other agents (19th builtin tool)
- Created 全能助手 (general orchestrator) and 家庭医生助手 agents
- Switch template-created agents from type:llm to type:agent for full ReAct + RAG

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
renjianbo
2026-05-03 21:57:30 +08:00
parent 1c83b6284f
commit de415ca310
8 changed files with 1280 additions and 7 deletions

View File

@@ -8,7 +8,7 @@ logger = logging.getLogger(__name__)
_registered = False
_EXPECTED_BUILTIN = 18
_EXPECTED_BUILTIN = 19
def ensure_builtin_tools_registered() -> None:
@@ -36,6 +36,7 @@ def ensure_builtin_tools_registered() -> None:
send_email_tool,
url_parse_tool,
regex_test_tool,
agent_call_tool,
HTTP_REQUEST_SCHEMA,
FILE_READ_SCHEMA,
FILE_WRITE_SCHEMA,
@@ -54,6 +55,7 @@ def ensure_builtin_tools_registered() -> None:
SEND_EMAIL_SCHEMA,
URL_PARSE_SCHEMA,
REGEX_TEST_SCHEMA,
AGENT_CALL_SCHEMA,
)
tool_registry.register_builtin_tool("http_request", http_request_tool, HTTP_REQUEST_SCHEMA)
@@ -74,6 +76,7 @@ def ensure_builtin_tools_registered() -> None:
tool_registry.register_builtin_tool("send_email", send_email_tool, SEND_EMAIL_SCHEMA)
tool_registry.register_builtin_tool("url_parse", url_parse_tool, URL_PARSE_SCHEMA)
tool_registry.register_builtin_tool("regex_test", regex_test_tool, REGEX_TEST_SCHEMA)
tool_registry.register_builtin_tool("agent_call", agent_call_tool, AGENT_CALL_SCHEMA)
_registered = True
n = tool_registry.builtin_tool_count()