Read an agent's goal
GET
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.
apiKeyheader
AuthorizationBearer <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.
id*stringThe agent id.
The agent's goal (or null), how it is decided, the known outcomes of the published version and the price
application/json- response
goal*|nullcurl "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 }}