Skip to content
Pile
Esc
↑↓navigate↵open⌘Jpreview

Create agent session activity

POST/workspaces/{organizationId}/agent/sessions/{sessionId}/activities
Authorization
AuthorizationBearer token · headerrequired

Workspace API key (Authorization: Bearer <key>). Issue keys under Settings → Developer or POST /workspaces/{organizationId}/tokens.

Path parameters
organizationIdstringrequired
sessionIdstringrequired
Request body
application/json
typestringrequired
Allowed:thoughtresponseerrorelicitationpromptactionstatusartifact
messagestringrequired
min length 1
payloadobject
parentIdstring
startedAtstring
endedAtstring
durationMsnumber
Responses
201

Activity added

idstringrequired
sessionIdstringrequired
actorIdstring | nullrequired
typestringrequired
Allowed:thoughtresponseerrorelicitationpromptactionstatusartifact
messagestringrequired
payloadany | null
parentIdstring | nullrequired
startedAtstring | nullrequired
endedAtstring | nullrequired
durationMsnumber | nullrequired
createdAtstringrequired
404

Session not found

409

Session is terminal

Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST 'https://pile.nyc/workspaces/string/agent/sessions/string/activities' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "type": "thought",
  "message": "string",
  "payload": {
    "property1": null,
    "property2": null
  },
  "parentId": "string",
  "startedAt": "string",
  "endedAt": "string",
  "durationMs": 0
}'
Response
{
  "id": "string",
  "sessionId": "string",
  "actorId": "string",
  "type": "thought",
  "message": "string",
  "payload": null,
  "parentId": "string",
  "startedAt": "string",
  "endedAt": "string",
  "durationMs": 0,
  "createdAt": "string"
}

Was this page helpful?