cURL
curl https://reygrid.com/api/v1/agents/{AgentId} \
-H "Authorization: Bearer $REYGRID_API_KEY"from reygrid import ReyGrid
client = ReyGrid(api_key="YOUR_API_KEY")
agent = client.get_agent("{AgentId}").agent
print(agent.sources) # {'text': 12, 'qa': 30, ...}
print(f"{agent.storage.used}/{agent.storage.limit}")import { ReyGrid } from "reygrid";
const client = new ReyGrid({ apiKey: "YOUR_API_KEY" });
const { agent } = await client.getAgent("{AgentId}");
console.log(agent.sources); // { text: 12, qa: 30, ... }
console.log(`${agent.storage.used}/${agent.storage.limit}`);{
"success": true,
"agent": {
"id": {
"AgentId": null
},
"name": "Support",
"model": "gpt-4o-mini-2024-07-18",
"instructions": "Answer customer questions about orders, shipping and refunds.",
"usage": 119.5,
"createdAt": "2026-08-25T00:43:49.979Z",
"sources": {
"text": 12,
"qa": 30,
"file": 2,
"website": 48
},
"storage": {
"used": 84213,
"limit": 256000
}
}
}{
"error": "Unauthorized",
"code": "AUTH_REQUIRED"
}{
"success": false,
"error": {
"code": "SOURCE_NOT_FOUND",
"message": "This source does not exist"
}
}Agents
Get an agent
Returns an agent with the number of knowledge sources of each type and its storage usage.
GET
/
agents
/
{agentId}
cURL
curl https://reygrid.com/api/v1/agents/{AgentId} \
-H "Authorization: Bearer $REYGRID_API_KEY"from reygrid import ReyGrid
client = ReyGrid(api_key="YOUR_API_KEY")
agent = client.get_agent("{AgentId}").agent
print(agent.sources) # {'text': 12, 'qa': 30, ...}
print(f"{agent.storage.used}/{agent.storage.limit}")import { ReyGrid } from "reygrid";
const client = new ReyGrid({ apiKey: "YOUR_API_KEY" });
const { agent } = await client.getAgent("{AgentId}");
console.log(agent.sources); // { text: 12, qa: 30, ... }
console.log(`${agent.storage.used}/${agent.storage.limit}`);{
"success": true,
"agent": {
"id": {
"AgentId": null
},
"name": "Support",
"model": "gpt-4o-mini-2024-07-18",
"instructions": "Answer customer questions about orders, shipping and refunds.",
"usage": 119.5,
"createdAt": "2026-08-25T00:43:49.979Z",
"sources": {
"text": 12,
"qa": 30,
"file": 2,
"website": 48
},
"storage": {
"used": 84213,
"limit": 256000
}
}
}{
"error": "Unauthorized",
"code": "AUTH_REQUIRED"
}{
"success": false,
"error": {
"code": "SOURCE_NOT_FOUND",
"message": "This source does not exist"
}
}