# See how often a goal is reached

Source: https://docs.vlayers.ai/reference/agents/get-agent-goal-summary

`GET /v1/agents/{id}/goal/summary` · scope `workspace:read`

How often the agent reached its goal over a period, by channel (`voice`, or a channel id), with what the conversations cost and what scoring cost. `rate` is met over scored. Test conversations are counted apart in `test` and never in the rate. `refused` and `notScored` say why subjects have no verdict, by reason code. Aggregates only: no transcript is returned.

Requires an API key with the `workspace:read` scope.

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | path | string | yes | The agent id. Example: `"0192f5c2-6f7a-7b9c-8d1e-2f3a4b5c6d78"` |
| `since` | query | string | no | Start of the period, an ISO timestamp. Default: 30 days ago. Example: `"2026-10-20T15:04:05.000Z"` |
| `until` | query | string | no | End of the period, an ISO timestamp. Default: now. Example: `"2026-10-20T15:04:05.000Z"` |

## Request

cURL:

```bash
curl "https://api.vlayers.ai/v1/agents/$AGENT_ID/goal/summary" \
  -H "Authorization: Bearer $VOICELAYER_API_KEY"
```

TypeScript:

```ts
import { VoiceLayer } from '@voicelayer/api';

const voicelayer = new VoiceLayer();

const { total } = await voicelayer.agents.getGoalSummary('<agent-id>');
console.log(total.rate);
```

Python:

```python
from voicelayer import VoiceLayer

vl = VoiceLayer()

result = vl.agents.get_goal_summary("<agent-id>")
print(result.total.rate)
```

## Response `200`

```json
{
  "agentId": "0192f5c2-6f7a-7b9c-8d1e-2f3a4b5c6d78",
  "since": "2026-10-20T15:04:05.000Z",
  "until": "2026-10-20T15:04:05.000Z",
  "byChannel": [
    {
      "channel": "voice",
      "scored": 40,
      "met": 31,
      "rate": 0.775,
      "conversationCostUsd": 3.2,
      "costPerConversationUsd": 0.08,
      "costPerMetUsd": 0.1032
    }
  ],
  "total": {
    "channel": "voice",
    "scored": 40,
    "met": 31,
    "rate": 0.775,
    "conversationCostUsd": 3.2,
    "costPerConversationUsd": 0.08,
    "costPerMetUsd": 0.1032
  },
  "scoringCostUsd": 0.0042,
  "test": {
    "channel": "voice",
    "scored": 0,
    "met": 0,
    "rate": null,
    "conversationCostUsd": 0,
    "costPerConversationUsd": null,
    "costPerMetUsd": null
  },
  "refused": {},
  "notScored": {
    "share_link_not_scored": 1
  },
  "sampleRate": 1,
  "sharedConversations": 1
}
```
