What it does
The Write to Knowledge Base tool allows agents to save files directly to your organization’s knowledge bases during conversations. Agents can save existing conversation attachments (user-uploaded or tool-generated files) or create new text files from content they generate.For complete information about Knowledge Bases, including setup, file upload, and management, see Knowledge Bases.
Key features
- Save Attachments: Save user-uploaded or tool-generated files from the conversation to a KB
- Create New Files: Write inline content (summaries, reports, notes) as new KB files
- Automatic Processing: Saved files are automatically chunked, embedded, and indexed for search
- Writable KB Allowlist: Restrict which knowledge bases each agent can write to
- Size Limits: 10 MB maximum for inline content writes
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
knowledge_base_id | integer | Yes | The ID of the knowledge base to save the file to |
file_name | string | Yes | The name of the file to save. Must match an attachment name, or pair with content to create a new file |
content | string | No | Text content to save as a new file. Use this to write summaries, reports, or notes. If omitted, the tool looks for a matching attachment by file_name |
Configuration
Writable Knowledge Bases
When enabling this tool on an agent, you must select which knowledge bases the agent is allowed to write to. This prevents agents from writing to unintended KBs. Configure this in Control Hub > Edit Agent > Tools > Write to Knowledge Base.Common use cases
Save a conversation summary
Save an uploaded document
Save a tool-generated file
Best practices
- Use descriptive file names that help with future search and organization
- Choose the right knowledge base — agents can only write to KBs in their allowlist
- For inline content, use markdown formatting for best search results
- Combine with Search Knowledge Base to build agents that both read and write knowledge
Troubleshooting
“Knowledge base not in writable list”- The agent’s tool configuration doesn’t include this KB. Update the writable KB list in the agent’s tool settings.
- Inline content is limited to 10 MB. For larger files, upload them directly to the KB.
- The
file_namemust exactly match an attachment in the conversation (case-insensitive). Check the exact filename of the uploaded or generated file.
- Verify the knowledge base ID exists and belongs to your organization.
Related tools
- Search Knowledge Base - Search KB content that this tool writes to
- Execute Python - Generate files that can then be saved to a KB
- Call API - Fetch external data to save into knowledge bases
