Agents / REST API

Complete agent chat turn

Save your coding-agent-authored response as the addressed agent in its private chat, complete the leased external turn, and return any parent continuation. Report your actual provider and model as client-reported provenance. Persist real artifacts through Pipeline tools before claiming completion. Identical submission retries do not duplicate replies. No hosted inference.

POST /api/agents/conversationsDeterministic operation

Parameters

workspaceIdOptional · string
See the input schema for this field.
actionRequired · string
See the input schema for this field.
turnIdRequired · string
See the input schema for this field.
claimTokenRequired · string
See the input schema for this field.
textRequired · string
See the input schema for this field.
modelRequired · string
See the input schema for this field.
providerRequired · string
See the input schema for this field.
outputsOptional · array
See the input schema for this field.
replyInterpretationOptional · object
See the input schema for this field.
Request example
curl -X POST "https://app.pipeline.help/api/agents/conversations" \
  -H "Authorization: Bearer $PIPELINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"action":"external_complete","turnId":"00000000-0000-4000-8000-000000000000","claimToken":"00000000-0000-4000-8000-000000000000","text":"example","model":"example","provider":"example"}'
Full input schema
Input schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "workspaceId": {
      "type": "string",
      "format": "uuid"
    },
    "action": {
      "default": "external_complete",
      "type": "string",
      "const": "external_complete"
    },
    "turnId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "claimToken": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "text": {
      "type": "string",
      "minLength": 1,
      "maxLength": 20000
    },
    "model": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "provider": {
      "type": "string",
      "minLength": 1,
      "maxLength": 60
    },
    "outputs": {
      "maxItems": 10,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "artifact"
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "target": {
            "type": "string",
            "enum": [
              "content",
              "tables",
              "campaigns",
              "workflows"
            ]
          }
        },
        "required": [
          "kind",
          "id",
          "label",
          "target"
        ],
        "additionalProperties": false
      }
    },
    "replyInterpretation": {
      "type": "object",
      "properties": {
        "stage": {
          "type": "string",
          "enum": [
            "initial",
            "interested",
            "neutral",
            "objection",
            "meeting_ready",
            "closed_lost",
            "closed_won"
          ]
        },
        "sentiment": {
          "type": "string",
          "enum": [
            "positive",
            "neutral",
            "negative"
          ]
        },
        "confidence": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "keyTopics": {
          "maxItems": 20,
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 200
          }
        },
        "detectedIntents": {
          "maxItems": 20,
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 200
          }
        },
        "urgencyLevel": {
          "type": "string",
          "enum": [
            "low",
            "medium",
            "high"
          ]
        },
        "nextBestAction": {
          "type": "string",
          "enum": [
            "review_reply",
            "needs_human"
          ]
        },
        "reasoning": {
          "type": "string",
          "minLength": 1,
          "maxLength": 2000
        }
      },
      "required": [
        "stage",
        "sentiment",
        "confidence",
        "keyTopics",
        "detectedIntents",
        "urgencyLevel",
        "nextBestAction",
        "reasoning"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "action",
    "turnId",
    "claimToken",
    "text",
    "model",
    "provider"
  ],
  "additionalProperties": false
}
See this operation inCLI MCP TypeScript SDK
API reference | Pipeline v2 preview