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 ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | Base-aws |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
messages | json | Yes | — | List of {role, content} message objects |
model_id | string | No | — | Bedrock model ID (default: claude-3-haiku) |
system | string | No | — | System prompt |
max_tokens | integer | No | — | Max tokens to generate (default: 1024) |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
response_text | string | Yes | — | The assistant's reply text |
model_id | string | Yes | — | Bedrock model ID that was used |
input_tokens | integer | Yes | — | Token count consumed by the input messages |
output_tokens | integer | Yes | — | Token count generated in the response |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | string | No | — | — |
failed_layer | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | execute | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | execute | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "aws.bedrock.chat",
"initial_data": {
"messages": "value"
}
}