sdkHosted AI, explicit consent
Send agent chat message
pipeline.sendAgentChatMessage
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.
Parameters
workspaceId
string
No description.
action
string
No description.
send
conversationIdrequired
string
No description.
textrequired
string
No description.
idempotencyKeyrequired
string
No description.
executionMode
string
No description.
external_agent | pipeline_hosted
references
object[]
No description.
surfaceContext
unknown
No description.
planIntent
object
No description.
selectedSkill
object
No description.
allowHostedAi
boolean
Must be true when this operation uses Pipeline hosted inference.
Example
TypeScripttypescript
await pipeline.sendAgentChatMessage({"conversationId": "00000000-0000-4000-8000-000000000000","text": "example","idempotencyKey": "example1","allowHostedAi": true})
Response
Success response schemajson schema
{"type": "object","properties": {"message": {"type": "object"},"turns": {"type": "array","items": {"type": "object"}}},"required": ["message","turns"]}
Exceptions
- PipelineError
- Thrown for validation, authentication, JSON-RPC, HTTP, and network failures. Inspect code and data when present.