List Knowledge Sources
GET/api/v1/knowledge-source/?agent_id={agent ID}
Overview#
Every agent is automatically assigned a knowledge folder when created. This endpoint returns the folder details along with a list of all knowledge sources linked to the agent. Use this to inspect what data the agent has been trained on.
Request Header
Authorizationapi key
Your 7en API key. Example: Api-Key 43NKLN3LKN4nlkn
Query Parameters#
Parameter
agent_idint
Unique identifier of the agent. Example: "{agent id}"
Error Response#
404
{
"error": {
"code": "agent_not_found",
"message": "Agent not found.",
"status": 404
}
}Best Practices#
- Training Status: Check
training_statuson each knowledge source to confirm it is"Success"before relying on the agent's responses. - Training Size Limits: Compare
total_training_usage_bytesagainstmax_training_usage_bytesto monitor remaining training size.
Request
curl -X GET 'https://api.7en.ai/api/v1/knowledge-source/?agent_id={agent_id}' -H 'Authorization: Api-Key YOUR_API_KEY'Response200
{
"message": "List retrieved successfully",
"status": "success",
"data": [
{
"id": 1158,
"urls": [],
"file": null,
"plain_text": "This is a",
"google_drive_file_id": null,
"title": "Knowledge Base Articles",
"status": "Pending",
"type": "plain_text",
"agent_knowledge_folder": 609,
"parent_knowledge_source": null,
"metadata": {
"format": "txt",
"file_size": "9B",
"no_of_rows": 1,
"no_of_chars": 9,
"no_of_pages": null,
"upload_date": "2026-03-09T07:38:20.411336+00:00"
},
"owner": 2,
"is_selected": true,
"training_status": "Idle",
"sub_urls": null,
"total_training_usage_bytes": 0,
"max_training_usage_bytes": 51200000,
"character_limit": 200000
},
{
"id": 1159,
"urls": [
"https://example.com/knowledge-base",
"https://example.com/tutorials"
],
"file": null,
"plain_text": null,
"google_drive_file_id": null,
"title": "Knowledge Base URLS",
"status": "Pending",
"type": "website",
"agent_knowledge_folder": 609,
"parent_knowledge_source": null,
"metadata": {
"format": "url",
"file_size": null,
"no_of_rows": null,
"no_of_chars": null,
"no_of_pages": 2,
"upload_date": "2026-03-09T07:38:54.854360+00:00"
},
"owner": 2,
"is_selected": true,
"training_status": "Idle",
"sub_urls": null,
"total_training_usage_bytes": 0,
"max_training_usage_bytes": 51200000,
"character_limit": 200000
}
]
}