Groundeddocs
ReferenceAgents

Chat with the draft (editors). Nothing is saved to conversations; usage and analytics use channel test.

POST/v1/teams/{team}/agents/{agentId}/test

The same pipeline and response as POST /v1/agents/{team}/{agent}/chat, on the draft configuration. The draft must pass publish validation (422 agent_invalid). conversation.conversationId and agentVersion are null.

Path Parameters

team*string

Team slug or ID

agentId*string
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/teams/string/agents/497f6eca-6276-4993-bfeb-53cbbbba6f08/test" \  -H "Content-Type: application/json" \  -d '{    "message": "string"  }'
{  "data": {    "conversationId": "ee6e55e8-45fe-4a3e-9bc8-4669f9fdf77a",    "userMessageId": "213e61c8-c98a-43da-84bd-347b3cdc3eec",    "messageId": "8540d774-4863-4d2b-b788-4ecb19412e85",    "persisted": true,    "agentVersion": 0,    "text": "string",    "thinking": "string",    "citations": [      {        "n": 0,        "documentId": "4704590c-004e-410d-adf7-acb7ca0a7052",        "sourceId": "797f5a94-3689-4ac8-82fd-d749511ea2b2",        "title": "string",        "snippet": "string",        "headingPath": [          "string"        ],        "pageStart": 0,        "pageEnd": 0,        "url": "string",        "verification": "verified",        "confidence": 0,        "markers": [          {            "verification": "verified",            "confidence": 0          }        ]      }    ],    "sources": [      {        "n": 0,        "title": "string",        "url": "string",        "snippet": "string",        "conflicting": true      }    ],    "usage": {      "input": 0,      "output": 0,      "reasoning": 0,      "cacheRead": 0,      "cacheWrite": 0,      "total": 0    },    "stopReason": "stop",    "errorCode": "string",    "errorMessage": "string",    "refused": true,    "noContext": true,    "latencyMs": 0,    "moderation": {      "stage": "input",      "action": "blocked",      "category": "violence",      "notice": "string"    },    "uncited": [      {        "start": 0,        "end": 0      }    ],    "claims": [      {        "index": 0,        "start": 0,        "end": 0,        "text": "string",        "verdict": "supported",        "sources": [          0        ],        "confidence": 0,        "checks": [          {            "n": 0,            "occurrence": 0,            "verification": "verified",            "confidence": 0          }        ]      }    ]  }}