import requests
url = "https://api.datagrid.com/v1/agents"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.datagrid.com/v1/agents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.datagrid.com/v1/agents \
--header 'Authorization: Bearer <token>'{
"object": "list",
"data": [
{
"object": "agent",
"id": "<string>",
"name": "<string>",
"emoji": "<string>",
"description": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"system_prompt": "<string>",
"custom_prompt": "<string>",
"planning_prompt": "<string>",
"agent_model": "magpie-2.5",
"llm_model": "gemini-3.1-flash-lite",
"knowledge_ids": [
"<string>"
],
"corpus": [
{
"type": "knowledge",
"knowledge_id": "<string>"
}
],
"tools": [
{
"name": "<string>",
"connection_id": "<string>"
}
],
"mcp_servers": [
{
"object": "agent_mcp_server",
"server_id": "<string>",
"name": "<string>",
"base_url": "<string>",
"status": "<string>",
"credential_id": "<string>",
"tool_count": 123,
"last_synced_at": "2023-11-07T05:31:56Z"
}
],
"managed_by_app": {
"app_uuid": "<string>",
"app_name": "<string>"
}
}
],
"has_more": true
}{
"status_code": 123,
"error": "rate_limit_exceeded",
"message": "<string>",
"retryable": true,
"statusCode": 123,
"mitigation": "<string>",
"details": {
"reason": "<string>"
}
}List agents
List agents for the authenticated organization. corpus and knowledge_ids are deprecated on this endpoint and still returned from the agent’s stored selectors. Null means all knowledge. They do not expand tenant datasets and tables. Retrieve an agent to read knowledge scope after they are removed from list.
import requests
url = "https://api.datagrid.com/v1/agents"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.datagrid.com/v1/agents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.datagrid.com/v1/agents \
--header 'Authorization: Bearer <token>'{
"object": "list",
"data": [
{
"object": "agent",
"id": "<string>",
"name": "<string>",
"emoji": "<string>",
"description": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"system_prompt": "<string>",
"custom_prompt": "<string>",
"planning_prompt": "<string>",
"agent_model": "magpie-2.5",
"llm_model": "gemini-3.1-flash-lite",
"knowledge_ids": [
"<string>"
],
"corpus": [
{
"type": "knowledge",
"knowledge_id": "<string>"
}
],
"tools": [
{
"name": "<string>",
"connection_id": "<string>"
}
],
"mcp_servers": [
{
"object": "agent_mcp_server",
"server_id": "<string>",
"name": "<string>",
"base_url": "<string>",
"status": "<string>",
"credential_id": "<string>",
"tool_count": 123,
"last_synced_at": "2023-11-07T05:31:56Z"
}
],
"managed_by_app": {
"app_uuid": "<string>",
"app_name": "<string>"
}
}
],
"has_more": true
}{
"status_code": 123,
"error": "rate_limit_exceeded",
"message": "<string>",
"retryable": true,
"statusCode": 123,
"mitigation": "<string>",
"details": {
"reason": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Optional search string to filter agents by name. Case-insensitive partial match.
255The limit on the number of objects to return, ranging between 1 and 100.
1 <= x <= 100A cursor to use in pagination. after is an object ID that defines your place in the list. For example, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo to fetch the next page of the list.
A cursor to use in pagination. before is an object ID that defines your place in the list. For example, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include before=obj_bar to fetch the previous page of the list.
Response
List of agents