Pi Durable Platformdocs
ReferenceAgents, threads and templates

Add a version; new agents get it, existing agents keep theirs until upgraded

POST
/v1/agent-templates/{templateId}/versions

Path Parameters

templateId*string
Formatuuid

Request Body

application/json
  1. body
instructions*string
Lengthlength <= 20000
notes?string

What changed

Lengthlength <= 2000
modelId?string

The model it runs on (a model's ID; "" for the platform's default; omitted keeps the current version's)

mcp?array<>

MCP servers its agents get (omitted keeps the current version's; [] none)

clientMcp?boolean

Let apps give its agents MCP servers for a thread (omitted keeps the current version's)

Response Body

The template with its new current version

application/json
  1. response
data*
curl -X POST 'https://agents.example.com/v1/agent-templates/497f6eca-6276-4993-bfeb-53cbbbba6f08/versions' \  -H 'Content-Type: application/json' \  -d '{  "instructions": "string"}'
{  "data": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "slug": "assistant",    "name": "string",    "description": "string",    "teamId": "a4ede8ba-7c0a-4485-8763-cbd9b282fbec",    "teamSlug": "string",    "teamName": "string",    "status": "private",    "reviewNote": "string",    "archived": true,    "currentVersion": 0,    "agentCount": 0,    "revision": 0,    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z"  }}