Skip to content
Proud to collaborate with Microsoft for Startups

aws.bedrock.chat ​

Send a conversation to a Bedrock model via the Converse API

Send a conversation to an Amazon Bedrock model and receive the assistant reply.

Uses the Bedrock Converse API, which works with all Bedrock-supported models (Anthropic Claude, Amazon Titan, Meta Llama, Mistral, etc.).

Inputs:

  • messages: List of {role, content} objects (required). content can be a string or a Bedrock-native content list.
  • model_id: Bedrock model ID (optional, default: anthropic.claude-3-haiku-20240307-v1:0).
  • system: System prompt string (optional).
  • max_tokens: Maximum tokens in the response (optional, default: 1024).

Outputs (terminal state_data):

  • response_text: str — the assistant's reply
  • model_id: str — model that was used
  • input_tokens: int — tokens consumed by the input
  • output_tokens: int — tokens generated in the response

Plugin required: context.get_plugin("aws") must expose .bedrock_client().

Overview ​

PropertyValue
Workflow typeAtomic
LibraryBase-aws
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
messagesjsonYes—List of {role, content} message objects
model_idstringNo—Bedrock model ID (default: claude-3-haiku)
systemstringNo—System prompt
max_tokensintegerNo—Max tokens to generate (default: 1024)

Output Schema ​

FieldTypeRequiredDefaultDescription
response_textstringYes—The assistant's reply text
model_idstringYes—Bedrock model ID that was used
input_tokensintegerYes—Token count consumed by the input messages
output_tokensintegerYes—Token count generated in the response
failure_reasonstringNo——
failure_typestringNo——
failed_actionstringNo——
failed_at_statestringNo——
failed_stepstringNo——
failed_layerstringNo——
errorstringNo——
error_typestringNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—execute—
completedNoYesYes——
failedNoYesNo——

State Diagram ​

Transitions ​

FromActionToDescription
pendingexecutecompleted—
* (any state)failfailed—

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "aws.bedrock.chat",
  "initial_data": {
    "messages": "value"
  }
}