Read an agent's goal

GET
/v1/agents/{id}/goal

The one thing the agent is for, as a sentence, and how it is decided: outcome when the flow records a named outcome, judge when a model reads the conversation, outcome_or_judge when both can. knownOutcomes lists the outcomes the published version declares, quote the price of scoring it. goal is null until one is set.

Requires an API key with the workspace:read scope.

Authorization

apiKey
headerAuthorizationBearer <token>

A secret API key from the dashboard (Developers → API keys): vl_live_…, or vl_test_… for test mode. Each operation says which scope the key needs.

Path Parameters

id*string

The agent id.

Response Body

The agent's goal (or null), how it is decided, the known outcomes of the published version and the price

application/json
  1. response
goal*|null
Example Request
curl "https://api.vlayers.ai/v1/agents/$AGENT_ID/goal" \  -H "Authorization: Bearer $VOICELAYER_API_KEY"
Example Response
{  "goal": {    "agentId": "0192f5c2-6f7a-7b9c-8d1e-2f3a4b5c6d78",    "evaluationId": "0192f5f7-b0cf-7a1d-9c6d-7e8f90123456",    "goal": "The caller books a table",    "outcomeNames": [      "booked"    ],    "sampleRate": 1,    "judgedBy": "outcome_or_judge",    "knownOutcomes": [      {        "name": "booked",        "description": "A table was booked"      }    ],    "quote": {      "maxUsd": 0.0123,      "typicalUsd": 0.0031,      "maxScoresPerConversation": 3,      "sampleRate": 1,      "outcomeIsFree": true    },    "enabled": true  }}