Agents / CLI

Send agent chat message

Attach bounded page IDs with surfaceContext for contextual work. Context is validated at acceptance and inherited by delegated work. Send a message to an exact private Agent Teams chat from list-agent-chats. Defaults to external_agent: claim the returned turn, reason with your current coding-agent model, use Pipeline tools for real work, then complete-agent-chat-turn to save the reply in the UI. No workspace model key or hosted inference is required. Explicit pipeline_hosted mode uses chat model settings and requires hosted-AI consent. Reuse the idempotencyKey only for retries of the same message. Read get-agent-chat for progress and results.

pipeline send-agent-chat-messageBackend AI, consent required

Parameters

workspaceIdOptional · string
See the input schema for this field.
actionOptional · string
See the input schema for this field.send
conversationIdRequired · string
See the input schema for this field.
textRequired · string
See the input schema for this field.
idempotencyKeyRequired · string
See the input schema for this field.
executionModeOptional · string
See the input schema for this field.external_agent · pipeline_hosted
referencesOptional · array
See the input schema for this field.
surfaceContextOptional · object
See the input schema for this field.
planIntentOptional · object
See the input schema for this field.
selectedSkillOptional · object
See the input schema for this field.
allowHostedAiOptional · boolean
Must be true when this operation uses Pipeline hosted inference.
Request example
pipeline send-agent-chat-message \
  --conversation-id "00000000-0000-4000-8000-000000000000" \
  --text "example" \
  --idempotency-key "example1" \
  --allow-hosted-ai
Full input schema
Input schema
{
  "type": "object",
  "properties": {
    "workspaceId": {
      "type": "string"
    },
    "action": {
      "type": "string",
      "enum": [
        "send"
      ],
      "default": "send"
    },
    "conversationId": {
      "type": "string",
      "format": "uuid"
    },
    "text": {
      "type": "string",
      "minLength": 1,
      "maxLength": 20000
    },
    "idempotencyKey": {
      "type": "string",
      "minLength": 8,
      "maxLength": 160
    },
    "executionMode": {
      "type": "string",
      "enum": [
        "external_agent",
        "pipeline_hosted"
      ],
      "default": "external_agent"
    },
    "references": {
      "type": "array",
      "maxItems": 5,
      "items": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "work_order"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          }
        },
        "required": [
          "kind",
          "id"
        ],
        "additionalProperties": false
      }
    },
    "surfaceContext": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "page": {
              "type": "object",
              "properties": {
                "section": {
                  "type": "string",
                  "maxLength": 80
                },
                "view": {
                  "type": "string",
                  "maxLength": 160
                },
                "objectLabel": {
                  "type": "string",
                  "maxLength": 200
                }
              },
              "required": [
                "section",
                "view"
              ],
              "additionalProperties": false
            },
            "scope": {
              "type": "string",
              "const": "tables"
            },
            "tableId": {
              "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)$"
            },
            "selectedRowIds": {
              "maxItems": 100,
              "type": "array",
              "items": {
                "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)$"
              }
            }
          },
          "required": [
            "scope"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "page": {
              "type": "object",
              "properties": {
                "section": {
                  "type": "string",
                  "maxLength": 80
                },
                "view": {
                  "type": "string",
                  "maxLength": 160
                },
                "objectLabel": {
                  "type": "string",
                  "maxLength": 200
                }
              },
              "required": [
                "section",
                "view"
              ],
              "additionalProperties": false
            },
            "scope": {
              "type": "string",
              "const": "campaigns"
            },
            "campaignId": {
              "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)$"
            },
            "activeTab": {
              "type": "string",
              "enum": [
                "overview",
                "prospects",
                "settings",
                "workflow",
                "subsequences",
                "analytics",
                "activity"
              ]
            },
            "subsequenceId": {
              "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)$"
            }
          },
          "required": [
            "scope"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "page": {
              "type": "object",
              "properties": {
                "section": {
                  "type": "string",
                  "maxLength": 80
                },
                "view": {
                  "type": "string",
                  "maxLength": 160
                },
                "objectLabel": {
                  "type": "string",
                  "maxLength": 200
                }
              },
              "required": [
                "section",
                "view"
              ],
              "additionalProperties": false
            },
            "scope": {
              "type": "string",
              "const": "workflows"
            },
            "workflowId": {
              "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)$"
            },
            "campaignId": {
              "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)$"
            }
          },
          "required": [
            "scope"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "page": {
              "type": "object",
              "properties": {
                "section": {
                  "type": "string",
                  "maxLength": 80
                },
                "view": {
                  "type": "string",
                  "maxLength": 160
                },
                "objectLabel": {
                  "type": "string",
                  "maxLength": 200
                }
              },
              "required": [
                "section",
                "view"
              ],
              "additionalProperties": false
            },
            "scope": {
              "type": "string",
              "const": "content"
            },
            "workId": {
              "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)$"
            },
            "outputId": {
              "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)$"
            },
            "linkedinAccountId": {
              "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)$"
            },
            "draft": {
              "type": "string",
              "maxLength": 20000
            }
          },
          "required": [
            "scope"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "page": {
              "type": "object",
              "properties": {
                "section": {
                  "type": "string",
                  "maxLength": 80
                },
                "view": {
                  "type": "string",
                  "maxLength": 160
                },
                "objectLabel": {
                  "type": "string",
                  "maxLength": 200
                }
              },
              "required": [
                "section",
                "view"
              ],
              "additionalProperties": false
            },
            "scope": {
              "type": "string",
              "const": "inbox"
            },
            "inboxConversationId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "campaignId": {
              "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)$"
            }
          },
          "required": [
            "scope"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "page": {
              "type": "object",
              "properties": {
                "section": {
                  "type": "string",
                  "maxLength": 80
                },
                "view": {
                  "type": "string",
                  "maxLength": 160
                },
                "objectLabel": {
                  "type": "string",
                  "maxLength": 200
                }
              },
              "required": [
                "section",
                "view"
              ],
              "additionalProperties": false
            },
            "scope": {
              "type": "string",
              "const": "crm"
            }
          },
          "required": [
            "scope"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "page": {
              "type": "object",
              "properties": {
                "section": {
                  "type": "string",
                  "maxLength": 80
                },
                "view": {
                  "type": "string",
                  "maxLength": 160
                },
                "objectLabel": {
                  "type": "string",
                  "maxLength": 200
                }
              },
              "required": [
                "section",
                "view"
              ],
              "additionalProperties": false
            },
            "scope": {
              "type": "string",
              "const": "intent"
            }
          },
          "required": [
            "scope"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "page": {
              "type": "object",
              "properties": {
                "section": {
                  "type": "string",
                  "maxLength": 80
                },
                "view": {
                  "type": "string",
                  "maxLength": 160
                },
                "objectLabel": {
                  "type": "string",
                  "maxLength": 200
                }
              },
              "required": [
                "section",
                "view"
              ],
              "additionalProperties": false
            },
            "scope": {
              "type": "string",
              "const": "engagement"
            }
          },
          "required": [
            "scope"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "page": {
              "type": "object",
              "properties": {
                "section": {
                  "type": "string",
                  "maxLength": 80
                },
                "view": {
                  "type": "string",
                  "maxLength": 160
                },
                "objectLabel": {
                  "type": "string",
                  "maxLength": 200
                }
              },
              "required": [
                "section",
                "view"
              ],
              "additionalProperties": false
            },
            "scope": {
              "type": "string",
              "const": "launchpad"
            },
            "tableId": {
              "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)$"
            },
            "campaignId": {
              "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)$"
            },
            "phase": {
              "type": "string",
              "maxLength": 40
            },
            "segmentName": {
              "type": "string",
              "maxLength": 200
            },
            "launchReadiness": {
              "type": "object",
              "properties": {
                "researchReady": {
                  "type": "boolean"
                },
                "outreachReady": {
                  "type": "boolean"
                },
                "hasLiveSegment": {
                  "type": "boolean"
                },
                "pilotStatus": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 40
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "scaleStatus": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 40
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "researchReady",
                "outreachReady",
                "hasLiveSegment",
                "pilotStatus",
                "scaleStatus"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "scope"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "page": {
              "type": "object",
              "properties": {
                "section": {
                  "type": "string",
                  "maxLength": 80
                },
                "view": {
                  "type": "string",
                  "maxLength": 160
                },
                "objectLabel": {
                  "type": "string",
                  "maxLength": 200
                }
              },
              "required": [
                "section",
                "view"
              ],
              "additionalProperties": false
            },
            "scope": {
              "type": "string",
              "const": "agent-pipeline"
            }
          },
          "required": [
            "scope"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "page": {
              "type": "object",
              "properties": {
                "section": {
                  "type": "string",
                  "maxLength": 80
                },
                "view": {
                  "type": "string",
                  "maxLength": 160
                },
                "objectLabel": {
                  "type": "string",
                  "maxLength": 200
                }
              },
              "required": [
                "section",
                "view"
              ],
              "additionalProperties": false
            },
            "scope": {
              "type": "string",
              "const": "gtm-context"
            },
            "targetOfferingId": {
              "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)$"
            },
            "activeTab": {
              "type": "string",
              "maxLength": 40
            },
            "serviceDescription": {
              "type": "string",
              "maxLength": 8000
            },
            "icpSummary": {
              "type": "string",
              "maxLength": 8000
            },
            "draftStatement": {
              "type": "string",
              "maxLength": 4000
            }
          },
          "required": [
            "scope"
          ],
          "additionalProperties": false
        }
      ]
    },
    "planIntent": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "create_plan"
        },
        "planOnly": {
          "type": "boolean",
          "const": true
        },
        "requestId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160
        },
        "templateId": {
          "type": "string",
          "enum": [
            "launch_campaign",
            "build_lead_list",
            "improve_offer",
            "create_lead_magnet",
            "competitor_engagers",
            "content_batch",
            "campaign_iteration",
            "weekly_performance_review"
          ]
        }
      },
      "required": [
        "kind",
        "planOnly",
        "requestId",
        "templateId"
      ],
      "additionalProperties": false
    },
    "selectedSkill": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "role": {
          "type": "string",
          "enum": [
            "strategist",
            "gtm_engineer",
            "reply_agent",
            "sdr_agent",
            "gtm_lead",
            "content_agent",
            "engagement"
          ]
        },
        "definitionVersion": {
          "type": "integer",
          "minimum": 1
        },
        "contentHash": {
          "type": "string",
          "maxLength": 128
        }
      },
      "required": [
        "id",
        "role",
        "definitionVersion",
        "contentHash"
      ],
      "additionalProperties": false
    },
    "allowHostedAi": {
      "type": "boolean",
      "description": "Must be true when this operation uses Pipeline hosted inference."
    }
  },
  "required": [
    "conversationId",
    "text",
    "idempotencyKey"
  ],
  "additionalProperties": false
}
See this operation inMCP REST API TypeScript SDK
CLI guide | Pipeline v2 preview