- HTTP Request
- URL Parameters
- Request Body
- Example Request
- Response (Success)
- Error Response (Not Ready)
- Error Response (Already Attached)
- Error Response (Not Found)
- Validation Rules
- Status Requirements
- Attachment Uniqueness
- Access Permissions
- Attachment Behavior
- Immediate Availability
- Multiple Knowledge Items
- RAG Configuration
- Workflow Example
- Use Cases
- Support Agent Knowledge
- Sales Agent Knowledge
- Shared Knowledge
- Error Codes
- Best Practices
- Before Attaching
- After Attaching
- Knowledge Organization
- See Also
Attach Knowledge Item to Agent
Attaches an existing knowledge item to an agent. The knowledge item must have status: "ready" to be attached.
HTTP Request
URL Parameters
Request Body
Example Request
Response (Success)
Error Response (Not Ready)
Error Response (Already Attached)
Error Response (Not Found)
Validation Rules
Status Requirements
- Knowledge item must have
status: "ready" - Cannot attach items with status:
pending,processing, orfailed - Wait for ingestion to complete before attaching
Attachment Uniqueness
- A knowledge item can only be attached once per agent
- The same knowledge item can be attached to multiple agents
- Attempting to attach an already-attached item returns an error
Access Permissions
- Both the agent and knowledge item must belong to the authenticated team
- Cannot attach knowledge items from other teams
Attachment Behavior
Immediate Availability
Once attached, the agent can immediately use the knowledge item for RAG retrieval:
- Query Processing: When the agent receives a user query, it searches attached knowledge items
- Chunk Retrieval: Relevant chunks are retrieved based on semantic similarity
- Context Injection: Retrieved chunks are injected into the LLM prompt
- Response Generation: LLM generates response with knowledge context
Multiple Knowledge Items
Agents can have multiple knowledge items attached:
- All attached knowledge items are searched during RAG retrieval
- The
max_chunks_per_querysetting applies across all knowledge items - Most relevant chunks are selected regardless of source
RAG Configuration
Attachment uses the agent’s RAG configuration:
- search_mode:
"speed"(faster) or"accuracy"(more thorough) - max_chunks_per_query: Number of chunks to retrieve (default: 8)
Configure via Update Agent.
Workflow Example
Complete workflow to add knowledge to an agent:
Use Cases
Support Agent Knowledge
Attach company knowledge to support agents:
Sales Agent Knowledge
Attach product information to sales agents:
Shared Knowledge
Share knowledge across multiple agents:
Error Codes
Best Practices
Before Attaching
- Verify Status: Check that knowledge item has
status: "ready" - Test Quality: Review chunk quality via Get Knowledge Item
- Configure RAG: Set appropriate
search_modeandmax_chunks_per_query
After Attaching
- Verify Attachment: Use List Agent’s Knowledge Items
- Test Retrieval: Test agent with queries that should match knowledge
- Monitor Performance: Adjust RAG settings based on response quality
Knowledge Organization
- Group related knowledge items (e.g., all product docs together)
- Avoid overlapping content across multiple knowledge items
- Keep knowledge items focused and well-scoped
See Also
- List Agent’s Knowledge Items - View attached knowledge
- Detach Knowledge Item from Agent - Remove knowledge from agent
- Get Knowledge Item - Check knowledge item status
- Update Agent - Configure RAG settings
