Create Agent Corpus Connection
POST
/v2/api/agent/{agent_id}/corpus/{corpus_id}
Agent Corpus Connection
This association allows the agent to fetch relevant content, respond more intelligently to queries, and function within the context defined by the corpus data.
agent_id
and corpus_id
) of both entities in the path parameters.On successful execution, this endpoint returns detailed metadata about the newly established connection, including agent and corpus information, connection status, and timestamps.
Purpose of Agent ID
How to View Your Agent ID?
View Your Agent ID
Purpose of Corpus ID
How to View Your Corpus ID?
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/v2/api/agent/1297/corpus/1227'
Response Response Example
201 - Example 1
{
"id": 1079,
"agent": {
"id": 1297,
"agent_type": {
"id": 1,
"name": "QnA"
},
"instructions": [],
"agent_name": "FC Barca",
"domain": "",
"prefix_prompt": "abc",
"alias": "FCBarcelonaInfoAssistant_1297-dev@ejento.ai",
"is_deleted": false,
"created_by": "user@example.com",
"access": "Only me",
"project": 254,
"llm_config": 1
},
"corpus": {
"id": 1227,
"indexing_mode": {
"id": 3,
"mode": "basic"
},
"name": "HZ8Hub_Default",
"description": null,
"owner": {
"id": 147,
"email": "user@example.com",
"is_superuser": true,
"first_name": "user",
"last_name": "user",
"organization": {
"id": 1,
"org_name": "Data Science Dojo"
}
},
"tags": []
},
"created_by": "user@example.com",
"created_on": "2025-04-01T07:06:09.470040Z",
"modified_by": "",
"modified_on": "2025-04-01T07:06:09.470056Z",
"is_enabled": true,
"is_default": false,
"is_deleted": false,
"connected_by": 147
}
Request
Path Params
agent_id
integer <int64>
required
Example:
1297
corpus_id
integer <int64>
required
Example:
1227