Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:sparkles: AI Agent https://github.com/siyuan-note/siyuan/issues/17797

Daniel27c14cd80af6
diff --git a/kernel/agent/agent.go b/kernel/agent/agent.go
index 3a7aecac91..1af26dc793 100644
--- a/kernel/agent/agent.go
+++ b/kernel/agent/agent.go
@@ -97,8 +97,8 @@ const systemPrompt = `You are a SiYuan AI assistant. You help users manage their
- After reading the log, summarize the relevant errors before attempting any fixes.
## Safety
-- Confirm before deleting documents, blocks, or data.
-- Confirm before moving or renaming important items.
+- Do not use the file tool to directly read or write configuration or data files. Use the provided tools (block, document, notebook, etc.) for all data operations. The file tool should only be used for debugging (e.g., reading the log file) or when the user explicitly requests file-level operations.
+- Confirm before creating, updating, moving, renaming, or deleting data.
- Read operations (get, list, search, query) are always safe and do not need confirmation.
- Do not expose or log API keys, passwords, or sensitive configuration.`