Pi Durable Platformdocs
ReferenceAgents, threads and templates

Create a template private to the team, with its first version (editors and above)

POST
/v1/teams/{team}/agent-templates

Path Parameters

team*string

Team slug or ID

Request Body

application/json
  1. body
slug*string
Match^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$
name*string
Lengthlength <= 100
description?string
Lengthlength <= 2000
instructions*string

The agent's system prompt (version 1)

Lengthlength <= 20000
notes?string
Lengthlength <= 2000
modelId?string

The model version 1 runs on (default the platform's default model)

Formatuuid
mcp?array<>

MCP servers its agents get

clientMcp?boolean

Let apps give its agents MCP servers for a thread

Response Body

Created

application/json
  1. response
data*
curl -X POST 'https://agents.example.com/v1/teams/string/agent-templates' \  -H 'Content-Type: application/json' \  -d '{  "slug": "string",  "name": "string",  "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"  }}