curl -X POST 'https://api.60db.ai/deep-analytics/calls/7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d/agent-fix/suggest' \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{}'
const res = await fetch('https://api.60db.ai/deep-analytics/calls/7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d/agent-fix/suggest', {
method: 'POST',
headers: {
Authorization: 'Bearer your-api-key',
'Content-Type': 'application/json',
},
body: JSON.stringify({}),
});
const { success, data, message, code } = await res.json();
if (!success) throw new Error(`${code}: ${message}`);
Call Analysis
Suggest Agent Fix
Get improved AI agent instructions based on the problems in a call
POST
/
deep-analytics
/
calls
/
:callId
/
agent-fix
/
suggest
curl -X POST 'https://api.60db.ai/deep-analytics/calls/7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d/agent-fix/suggest' \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{}'
const res = await fetch('https://api.60db.ai/deep-analytics/calls/7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d/agent-fix/suggest', {
method: 'POST',
headers: {
Authorization: 'Bearer your-api-key',
'Content-Type': 'application/json',
},
body: JSON.stringify({}),
});
const { success, data, message, code } = await res.json();
if (!success) throw new Error(`${code}: ${message}`);
Reads the problems found in the call and proposes new instructions for the AI agent that took it. Nothing is saved. Review the result, then call Apply Agent Fix.
Only for calls made by a 60db AI agent. The API key needs the
agents permission on top of analyzer access, and the owner needs workspace role owner, admin, developer or member. Keys created with default scopes include agents. A key created with explicit permissions that leaves agents out gets 403 POLICY_DENY. Limit: 10 requests per minute per owner for suggest and apply.Request
Headers
Path
No body.Response
200 Keepbase_hash. before and after are the agent’s instructions now and as suggested.
{
"success": true,
"data": {
"agent": {
"id": "<ai-agent-uuid>",
"name": "Front desk"
},
"base_hash": "<64-hex-characters>",
"before": "...",
"after": "...",
"changes": [],
"problems": []
}
}
Errors
Errors use{ "success": false, "message": "...", "code": "..." }. See the overview for the codes every route can return.
This endpoint
| Status | Code | When |
|---|---|---|
| 400 | NOT_AN_AGENT_CALL | The call was not made by a 60db AI agent |
| 400 | NO_PROBLEMS | The call has no problems |
| 404 | AGENT_NOT_FOUND | The agent no longer exists |
| 429 | AGENT_FIX_RATE_LIMITED | More than 10 per minute |
Example
curl -X POST 'https://api.60db.ai/deep-analytics/calls/7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d/agent-fix/suggest' \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{}'
const res = await fetch('https://api.60db.ai/deep-analytics/calls/7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d/agent-fix/suggest', {
method: 'POST',
headers: {
Authorization: 'Bearer your-api-key',
'Content-Type': 'application/json',
},
body: JSON.stringify({}),
});
const { success, data, message, code } = await res.json();
if (!success) throw new Error(`${code}: ${message}`);