import requests
url = "https://api.datagrid.com/v1/agents/{agent_id}"
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/{agent_id}', 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/{agent_id} \
--header 'Authorization: Bearer <token>'{
"object": "agent",
"id": "<string>",
"name": "<string>",
"emoji": "<string>",
"description": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"knowledge_ids": [
"<string>"
],
"corpus": [
{
"type": "knowledge",
"knowledge_id": "<string>"
}
],
"system_prompt": "<string>",
"custom_prompt": "<string>",
"planning_prompt": "<string>",
"agent_model": "magpie-2.5",
"llm_model": "gemini-3.1-flash-lite",
"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>"
}
}{
"status_code": 123,
"error": "rate_limit_exceeded",
"message": "<string>",
"retryable": true,
"statusCode": 123,
"mitigation": "<string>",
"details": {
"reason": "<string>"
}
}Retrieve agent
Get one agent, including its corpus and knowledge_ids. List still returns those fields, marked deprecated.
import requests
url = "https://api.datagrid.com/v1/agents/{agent_id}"
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/{agent_id}', 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/{agent_id} \
--header 'Authorization: Bearer <token>'{
"object": "agent",
"id": "<string>",
"name": "<string>",
"emoji": "<string>",
"description": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"knowledge_ids": [
"<string>"
],
"corpus": [
{
"type": "knowledge",
"knowledge_id": "<string>"
}
],
"system_prompt": "<string>",
"custom_prompt": "<string>",
"planning_prompt": "<string>",
"agent_model": "magpie-2.5",
"llm_model": "gemini-3.1-flash-lite",
"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>"
}
}{
"status_code": 123,
"error": "rate_limit_exceeded",
"message": "<string>",
"retryable": true,
"statusCode": 123,
"mitigation": "<string>",
"details": {
"reason": "<string>"
}
}Authorizations
Response
Agent details
The agent model determines the processing mode for Converse requests. The Datagrid web app exposes Ask, Extended, and Execute as Converse chat_mode (llm_router, light_agent, full_agent). The values below set config.agent_model (model tier and tool limits)—use both fields when mirroring in-app behavior.
Execute (full tool use, planning, and multi-step reasoning; aligns with Execute in the web app / full_agent):
magpie-2.0— Legacy full-agent model with proactive planning and reasoning.magpie-2.5— Default. Latest full-agent model — faster, more adaptable, and built to handle a broader range of real-world tasks.magpie-1.1— Previous-generation full agent model.
Extended (search-focused; aligns with Extended in the web app / light_agent; not Ask):
magpie-1.1-flash— Fast model optimized for RAG use cases. Only supports thesemantic_searchtool. A 400 error will be returned if other tools are specified.
Direct LLM (no tool execution; agent_model only—Ask in the web app is chat_mode: llm_router, not magpie-1.1-flash):
llm-only— Runs a direct LLM conversation with no planning or tool calls. A 400 error will be returned if tools are specified.
BETA: Magpie 3.0. Behavior and schema may change.
magpie-3.0— BETA. Available on the public Converse API. In-app rollout flags do not apply to this request.
Can also accept any custom string value for future model versions.
magpie-1.1, magpie-1.1-flash, magpie-2.0, magpie-2.5, magpie-2.5-flash, magpie-3.0, llm-only The LLM used to generate responses. Any id returned by GET /v1/models with type: llm is accepted; the enum lists the ids known when this spec was generated. Deprecated Gemini 2.x Flash ids are accepted for backward compatibility and automatically run as gemini-3.1-flash-lite.
gemini-2.0-flash, gemini-2.5-flash, gemini-2.5-flash-lite, gemini-2.5-pro, gemini-3-flash-preview, gemini-3-pro-preview, gemini-3.1-flash-lite, gemini-3.1-pro-preview, gemini-3.5-flash, gemini-3.5-flash-lite, gemini-3.6-flash, gemini-3.8-flash, gemini-live-2.5-flash-native-audio, gemini-1.5-flash-001, gemini-1.5-flash-002, gemini-2.0-flash-001, gemini-2.5-flash-preview-04-17, gemini-1.5-pro-001, gemini-1.5-pro-002, gemini-2.5-pro-preview-05-06, claude-haiku-4-5@20251001, claude-sonnet-4-6@default, claude-opus-4-6@default, claude-opus-4-7, claude-opus-4-8, claude-sonnet-5, claude-opus-5, claude-opus-5-5, anthropic.claude-haiku-4-5-20251001-v1:0, anthropic.claude-sonnet-4-5-20250929-v1:0, anthropic.claude-sonnet-4-6, anthropic.claude-opus-4-5-20251101-v1:0, anthropic.claude-opus-4-6-v1, anthropic.claude-opus-4-7, anthropic.claude-opus-4-8, anthropic.claude-sonnet-5, anthropic.claude-opus-5, anthropic.claude-opus-5-5, gpt-4o-mini, gpt-4o, gpt-4.1-mini, gpt-4.1, gpt-5-mini, gpt-5, gpt-5.1, chatgpt-4o-latest, gpt-4-turbo, gpt-4, openai.gpt-5.5, openai.gpt-5.6-luna, openai.gpt-5.6-sol, openai.gpt-5.6-terra, amazon.nova-2-lite-v1:0