Skip to content

Commit dbc44ea

Browse files
author
Avichay Marciano
committed
[Doc] Add documentation for Amazon Bedrock, Amazon OpenSearch, and Amazon S3 Vectors integrations
Documents all AWS integrations contributed in #533 and #534. Adds per-provider sections to chat_models.md, embedding_models.md, and vector_stores.md following the same structure as existing providers. Uses the ResourceName constants from the companion PR.
1 parent 9a35575 commit dbc44ea

3 files changed

Lines changed: 388 additions & 0 deletions

File tree

docs/content/docs/development/chat_models.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -961,6 +961,103 @@ Some popular options include:
961961
Model availability and specifications may change. Always check the official DashScope documentation for the latest information before implementing in production.
962962
{{< /hint >}}
963963

964+
### Amazon Bedrock
965+
966+
Amazon Bedrock provides access to a wide range of foundation models from leading AI providers through a unified API. The Flink Agents Bedrock integration uses the [Converse API](https://docs.aws.amazon.com/bedrock/latest/userguide/conversation-inference.html), which provides a consistent interface across all supported models with native tool calling support. Authentication is handled via SigV4 using the AWS default credentials chain — no API keys required.
967+
968+
{{< hint info >}}
969+
Amazon Bedrock is only supported in Java currently. To use Amazon Bedrock from Python agents, see [Using Cross-Language Providers](#using-cross-language-providers).
970+
{{< /hint >}}
971+
972+
#### Prerequisites
973+
974+
1. An AWS account with [Amazon Bedrock model access](https://docs.aws.amazon.com/bedrock/latest/userguide/model-access.html) enabled for the models you plan to use
975+
2. IAM credentials configured via any method supported by the [AWS Default Credentials Provider](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/credentials-chain.html) (environment variables, `~/.aws/credentials`, IAM role, etc.)
976+
977+
#### BedrockChatModelConnection Parameters
978+
979+
{{< tabs "BedrockChatModelConnection Parameters" >}}
980+
981+
{{< tab "Java" >}}
982+
983+
| Parameter | Type | Default | Description |
984+
|-----------|------|---------|-------------|
985+
| `region` | String | `"us-east-1"` | AWS region for the Bedrock service |
986+
| `model` | String | None | Default model ID (can be overridden per setup) |
987+
| `max_retries` | int | `5` | Maximum number of API retry attempts (retries on throttling, 429, 503) |
988+
989+
{{< /tab >}}
990+
991+
{{< /tabs >}}
992+
993+
#### BedrockChatModelSetup Parameters
994+
995+
{{< tabs "BedrockChatModelSetup Parameters" >}}
996+
997+
{{< tab "Java" >}}
998+
999+
| Parameter | Type | Default | Description |
1000+
|-----------|------|---------|-------------|
1001+
| `connection` | String | Required | Reference to connection method name |
1002+
| `model` | String | Required | Bedrock model ID (e.g. `"us.anthropic.claude-sonnet-4-20250514-v1:0"`) |
1003+
| `prompt` | Prompt \| String | None | Prompt template or reference to prompt resource |
1004+
| `tools` | List<String> | None | List of tool names available to the model |
1005+
| `temperature` | double | `0.1` | Sampling temperature (0.0 to 1.0) |
1006+
| `max_tokens` | int | None | Maximum number of tokens to generate |
1007+
1008+
{{< /tab >}}
1009+
1010+
{{< /tabs >}}
1011+
1012+
#### Usage Example
1013+
1014+
{{< tabs "Amazon Bedrock Usage Example" >}}
1015+
1016+
{{< tab "Java" >}}
1017+
```java
1018+
public class MyAgent extends Agent {
1019+
@ChatModelConnection
1020+
public static ResourceDescriptor bedrockConnection() {
1021+
return ResourceDescriptor.Builder.newBuilder(ResourceName.ChatModel.BEDROCK_CONNECTION)
1022+
.addInitialArgument("region", "us-east-1")
1023+
.build();
1024+
}
1025+
1026+
@ChatModelSetup
1027+
public static ResourceDescriptor bedrockChatModel() {
1028+
return ResourceDescriptor.Builder.newBuilder(ResourceName.ChatModel.BEDROCK_SETUP)
1029+
.addInitialArgument("connection", "bedrockConnection")
1030+
.addInitialArgument("model", "us.anthropic.claude-sonnet-4-20250514-v1:0")
1031+
.addInitialArgument("temperature", 0.1d)
1032+
.addInitialArgument("max_tokens", 4096)
1033+
.build();
1034+
}
1035+
1036+
...
1037+
}
1038+
```
1039+
{{< /tab >}}
1040+
1041+
{{< /tabs >}}
1042+
1043+
#### Available Models
1044+
1045+
Amazon Bedrock supports models from multiple providers through a single API. Visit the [Amazon Bedrock Model IDs documentation](https://docs.aws.amazon.com/bedrock/latest/userguide/models-supported.html) for the complete and up-to-date list of available models.
1046+
1047+
Some popular options include:
1048+
- **Claude** (Anthropic): `us.anthropic.claude-sonnet-4-6`, `us.anthropic.claude-opus-4-7`, `us.anthropic.claude-opus-4-6-v1`
1049+
- **Llama** (Meta): `us.meta.llama4-scout-17b-16e-instruct-v1:0`
1050+
- **Mistral**: `mistral.mistral-large-2402-v1:0`
1051+
- **Amazon Nova**: `us.amazon.nova-pro-v1:0`, `us.amazon.nova-lite-v1:0`
1052+
1053+
{{< hint warning >}}
1054+
Model availability varies by AWS region and requires explicit model access enablement in the Bedrock console. Always check the [Amazon Bedrock documentation](https://docs.aws.amazon.com/bedrock/latest/userguide/models-regions.html) for regional availability before implementing in production.
1055+
{{< /hint >}}
1056+
1057+
{{< hint warning >}}
1058+
**Current limitations:** The integration uses text content blocks only. Extended thinking / reasoning content blocks (e.g. Claude extended thinking), citation blocks, and image / document content blocks are not yet supported.
1059+
{{< /hint >}}
1060+
9641061
## Using Cross-Language Providers
9651062

9661063
Flink Agents supports cross-language chat model integration, allowing you to use chat models implemented in one language (Java or Python) from agents written in the other language. This is particularly useful when a chat model provider is only available in one language (e.g., Tongyi is currently Python-only).

docs/content/docs/development/embedding_models.md

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,99 @@ Some popular options include:
464464
Model availability and specifications may change. Always check the official DashScope documentation for the latest information before implementing in production.
465465
{{< /hint >}}
466466

467+
### Amazon Bedrock
468+
469+
Amazon Bedrock provides embedding capabilities through the Amazon Titan Text Embeddings V2 model via the [InvokeModel API](https://docs.aws.amazon.com/bedrock/latest/userguide/titan-embedding-models.html). The integration supports configurable output dimensions (256, 512, or 1024) and parallelizes batch embedding via a configurable thread pool, since the Titan V2 model processes one text per API call. Authentication is handled via SigV4 using the AWS default credentials chain.
470+
471+
{{< hint info >}}
472+
Amazon Bedrock embedding models are only supported in Java currently. To use Amazon Bedrock embeddings from Python agents, see [Using Cross-Language Providers](#using-cross-language-providers).
473+
{{< /hint >}}
474+
475+
#### Prerequisites
476+
477+
1. An AWS account with [Amazon Bedrock model access](https://docs.aws.amazon.com/bedrock/latest/userguide/model-access.html) enabled for Amazon Titan Text Embeddings V2
478+
2. IAM credentials configured via any method supported by the [AWS Default Credentials Provider](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/credentials-chain.html)
479+
480+
#### BedrockEmbeddingModelConnection Parameters
481+
482+
{{< tabs "BedrockEmbeddingModelConnection Parameters" >}}
483+
484+
{{< tab "Java" >}}
485+
486+
| Parameter | Type | Default | Description |
487+
|-----------|------|---------|-------------|
488+
| `region` | String | `"us-east-1"` | AWS region for the Bedrock service |
489+
| `model` | String | `"amazon.titan-embed-text-v2:0"` | Default embedding model ID |
490+
| `embed_concurrency` | int | `4` | Thread pool size for parallel batch embedding |
491+
| `max_retries` | int | `5` | Maximum number of API retry attempts (retries on throttling, 429, 503) |
492+
493+
{{< /tab >}}
494+
495+
{{< /tabs >}}
496+
497+
#### BedrockEmbeddingModelSetup Parameters
498+
499+
{{< tabs "BedrockEmbeddingModelSetup Parameters" >}}
500+
501+
{{< tab "Java" >}}
502+
503+
| Parameter | Type | Default | Description |
504+
|-----------|------|---------|-------------|
505+
| `connection` | String | Required | Reference to connection method name |
506+
| `model` | String | None | Override the default embedding model from the connection |
507+
| `dimensions` | int | None | Output embedding dimensions: 256, 512, or 1024 |
508+
509+
{{< /tab >}}
510+
511+
{{< /tabs >}}
512+
513+
#### Usage Example
514+
515+
{{< tabs "Amazon Bedrock Embedding Usage Example" >}}
516+
517+
{{< tab "Java" >}}
518+
```java
519+
public class MyAgent extends Agent {
520+
521+
@EmbeddingModelConnection
522+
public static ResourceDescriptor bedrockEmbeddingConnection() {
523+
return ResourceDescriptor.Builder.newBuilder(ResourceName.EmbeddingModel.BEDROCK_CONNECTION)
524+
.addInitialArgument("region", "us-east-1")
525+
.addInitialArgument("embed_concurrency", 8)
526+
.build();
527+
}
528+
529+
@EmbeddingModelSetup
530+
public static ResourceDescriptor bedrockEmbedding() {
531+
return ResourceDescriptor.Builder.newBuilder(ResourceName.EmbeddingModel.BEDROCK_SETUP)
532+
.addInitialArgument("connection", "bedrockEmbeddingConnection")
533+
.addInitialArgument("model", "amazon.titan-embed-text-v2:0")
534+
.addInitialArgument("dimensions", 1024)
535+
.build();
536+
}
537+
538+
...
539+
}
540+
```
541+
{{< /tab >}}
542+
543+
{{< /tabs >}}
544+
545+
#### Available Models
546+
547+
The Bedrock embedding integration currently supports:
548+
- **Amazon Titan Text Embeddings V2** (`amazon.titan-embed-text-v2:0`) — supports 256, 512, or 1024 dimensions
549+
550+
{{< hint info >}}
551+
The integration always requests **normalized** embeddings (unit vectors), which makes cosine similarity equivalent to dot product. If you need raw, un-normalized vectors, use a custom provider.
552+
{{< /hint >}}
553+
554+
Visit the [Amazon Bedrock Embedding Models documentation](https://docs.aws.amazon.com/bedrock/latest/userguide/titan-embedding-models.html) for the latest information.
555+
556+
{{< hint warning >}}
557+
Model availability varies by AWS region and requires explicit model access enablement in the Bedrock console. Always check the [Amazon Bedrock documentation](https://docs.aws.amazon.com/bedrock/latest/userguide/models-regions.html) for regional availability before implementing in production.
558+
{{< /hint >}}
559+
467560
## Using Cross-Language Providers
468561

469562
Flink Agents supports cross-language embedding model integration, allowing you to use embedding models implemented in one language (Java or Python) from agents written in the other language. This is particularly useful when an embedding model provider is only available in one language (e.g., OpenAI embedding is currently Python-only).

0 commit comments

Comments
 (0)