Get the draft
SDK platic.agents.draft.get()
Read the draft’s complete configuration before editing it. Use config as the starting point if you want to replace the whole draft.
Example
curl https://api.platic.ai/v1/agents/$AGENT_ID/draft \
-H "Authorization: Bearer $PLATIC_API_KEY" await platic.agents.draft.get("agent_123"); Path parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
agentId | string | Agent id | ✓ |
Response
{
"status": "success",
"data": {
"agentId": "Xq8mTe2LwP4kZ1aB9cDf",
"draft": { "versionId": "v4", "number": 4 },
"config": {
"description": "",
"instructions": "You are the sales assistant for Acme Store.",
"model": "auto",
"guardrails": {
"enabled": true,
"rules": ["No responder preguntas de trivia, cultura general ni acertijos."],
"message": "",
"conversationStrikeThreshold": 3,
"clientStrikeThreshold": 3
}
}
}
} The response includes all 15 sections in full; the example shows four.
| Field | Description |
|---|---|
agentId | Agent id |
draft.versionId | Version the draft is on, for example v4 |
draft.number | Number of that version |
config | The complete configuration, with its 15 sections. instructions is a text |
Errors
| Status | details.code | When |
|---|---|---|
404 | AGENT_NOT_FOUND | The agent doesn't exist in the workspace or was deleted |
Notes
- The draft can be the same version that is published. To know whether it has unpublished changes, check
hasUnpublishedChangesin Get an agent. - To change one part, use Update the draft. This
configis also the simplest starting point for replacing the draft. - Saving doesn't change the publication. To put a change into production, publish it.