- HTTP Request
- URL Parameters
- Example Request
- Response (Success)
- Response (Success with Remaining Items)
- Error Response (Not Attached)
- Error Response (Not Found)
- Detachment Behavior
- Immediate Effect
- Knowledge Item Preservation
- Multiple Agents
- Use Cases
- Temporary Removal
- Agent Specialization
- Knowledge Rotation
- Troubleshooting
- Detach vs Delete
- Detach (This Endpoint)
- Delete (Delete Knowledge Item)
- Workflow Example
- Error Codes
- Best Practices
- Before Detaching
- After Detaching
- Knowledge Management
- See Also
Detach Knowledge Item from Agent
Removes a knowledge item from an agent. The knowledge item itself is not deleted and remains available for other agents.
HTTP Request
URL Parameters
Example Request
Response (Success)
Response (Success with Remaining Items)
Error Response (Not Attached)
Error Response (Not Found)
Detachment Behavior
Immediate Effect
Once detached, the agent immediately stops using the knowledge item:
- RAG Retrieval: Agent no longer searches this knowledge item during queries
- Context Exclusion: Chunks from this item are excluded from LLM prompts
- No Data Deletion: The knowledge item itself is not deleted
Knowledge Item Preservation
The knowledge item remains intact after detachment:
- Still exists in the team’s knowledge items
- Can be attached to other agents
- Can be re-attached to the same agent later
- No need to re-process
Multiple Agents
If the knowledge item is attached to multiple agents:
- Only the specified agent is affected
- Other agents continue using the knowledge item
- Each agent-knowledge item relationship is independent
Use Cases
Temporary Removal
Temporarily disable knowledge without deleting:
Agent Specialization
Remove general knowledge from specialized agents:
Knowledge Rotation
Swap knowledge items for different use cases:
Troubleshooting
Remove problematic knowledge temporarily:
Detach vs Delete
Detach (This Endpoint)
- Removes knowledge item from specific agent
- Knowledge item remains in team’s collection
- Other agents can still use it
- Can be re-attached later without re-processing
- Use when: Temporarily disabling or reorganizing knowledge
Delete (Delete Knowledge Item)
- Permanently removes knowledge item from team
- Automatically detaches from all agents
- All chunks and embeddings are deleted
- Cannot be recovered
- Use when: Knowledge is no longer needed by any agent
Workflow Example
Complete workflow to swap knowledge items:
Error Codes
Best Practices
Before Detaching
- Check Attachments: Use List Agent’s Knowledge Items to confirm attachment
- Consider Impact: Understand how removal affects agent responses
- Plan Replacement: Have alternative knowledge ready if needed
After Detaching
- Verify Removal: Use List Agent’s Knowledge Items to confirm
- Test Agent: Verify agent behavior without the knowledge item
- Monitor Responses: Check that agent no longer references removed knowledge
Knowledge Management
- Detach before deleting if you want to confirm impact
- Keep detached items for potential future use
- Document why knowledge items were detached
- Regular audit of attached vs available knowledge
See Also
- List Agent’s Knowledge Items - View attached knowledge
- Attach Knowledge Item to Agent - Add knowledge to agent
- Delete Knowledge Item - Permanently remove knowledge
- Get Agent - View agent configuration
