Skip to content

Commit

Permalink
feat(agent): add support for collab, orch and FM in prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
krokoko committed Mar 4, 2025
1 parent 876bf3e commit 3f642b1
Show file tree
Hide file tree
Showing 22 changed files with 834 additions and 7 deletions.
7 changes: 7 additions & 0 deletions apidocs/namespaces/bedrock/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

## Enumerations

- [AgentCollaboratorType](enumerations/AgentCollaboratorType.md)
- [AgentStepType](enumerations/AgentStepType.md)
- [ChatMessageRole](enumerations/ChatMessageRole.md)
- [ConfluenceDataSourceAuthType](enumerations/ConfluenceDataSourceAuthType.md)
Expand All @@ -27,9 +28,11 @@
- [InferenceProfileType](enumerations/InferenceProfileType.md)
- [KnowledgeBaseType](enumerations/KnowledgeBaseType.md)
- [ManagedWordFilterType](enumerations/ManagedWordFilterType.md)
- [OrchestrationType](enumerations/OrchestrationType.md)
- [ParsingModality](enumerations/ParsingModality.md)
- [ParsingStategyType](enumerations/ParsingStategyType.md)
- [PromptTemplateType](enumerations/PromptTemplateType.md)
- [RelayConversationHistoryType](enumerations/RelayConversationHistoryType.md)
- [SalesforceDataSourceAuthType](enumerations/SalesforceDataSourceAuthType.md)
- [SalesforceObjectType](enumerations/SalesforceObjectType.md)
- [SharePointDataSourceAuthType](enumerations/SharePointDataSourceAuthType.md)
Expand Down Expand Up @@ -65,6 +68,7 @@
- [KendraKnowledgeBaseBase](classes/KendraKnowledgeBaseBase.md)
- [KnowledgeBaseBase](classes/KnowledgeBaseBase.md)
- [Memory](classes/Memory.md)
- [OrchestrationExecutor](classes/OrchestrationExecutor.md)
- [ParentActionGroupSignature](classes/ParentActionGroupSignature.md)
- [ParsingStategy](classes/ParsingStategy.md)
- [Prompt](classes/Prompt.md)
Expand All @@ -88,6 +92,8 @@
- [AgentAliasAttributes](interfaces/AgentAliasAttributes.md)
- [AgentAliasProps](interfaces/AgentAliasProps.md)
- [AgentAttributes](interfaces/AgentAttributes.md)
- [AgentCollaborator](interfaces/AgentCollaborator.md)
- [AgentDescriptor](interfaces/AgentDescriptor.md)
- [AgentPromptVariantProps](interfaces/AgentPromptVariantProps.md)
- [AgentProps](interfaces/AgentProps.md)
- [ApplicationInferenceProfileAttributes](interfaces/ApplicationInferenceProfileAttributes.md)
Expand All @@ -104,6 +110,7 @@
- [ContextualGroundingFilter](interfaces/ContextualGroundingFilter.md)
- [CrawlingFilters](interfaces/CrawlingFilters.md)
- [CrossRegionInferenceProfileProps](interfaces/CrossRegionInferenceProfileProps.md)
- [CustomOrchestration](interfaces/CustomOrchestration.md)
- [CustomParserProps](interfaces/CustomParserProps.md)
- [CustomTopicProps](interfaces/CustomTopicProps.md)
- [DataSourceAssociationProps](interfaces/DataSourceAssociationProps.md)
Expand Down
32 changes: 32 additions & 0 deletions apidocs/namespaces/bedrock/classes/Agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,22 @@ The ARN of the agent.

***

### agentCollaboration?

> `readonly` `optional` **agentCollaboration**: [`AgentCollaboratorType`](../enumerations/AgentCollaboratorType.md)
Agent collaboration type.

***

### agentCollaborators?

> `readonly` `optional` **agentCollaborators**: [`AgentCollaborator`](../interfaces/AgentCollaborator.md)[]
Agent collaborators.

***

### agentId

> `readonly` **agentId**: `string`
Expand Down Expand Up @@ -98,6 +114,14 @@ Whether the agent can generate, run, and troubleshoot code when trying to comple

***

### customOrchestration?

> `readonly` `optional` **customOrchestration**: [`CustomOrchestration`](../interfaces/CustomOrchestration.md)
Custom orchestration configuration.

***

### description?

> `readonly` `optional` **description**: `string`
Expand Down Expand Up @@ -224,6 +248,14 @@ The tree node.

***

### orchestrationType?

> `readonly` `optional` **orchestrationType**: [`OrchestrationType`](../enumerations/OrchestrationType.md)
The type of orchestration for the agent.

***

### physicalName

> `protected` `readonly` **physicalName**: `string`
Expand Down
52 changes: 52 additions & 0 deletions apidocs/namespaces/bedrock/classes/OrchestrationExecutor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
[**@cdklabs/generative-ai-cdk-constructs**](../../../README.md)

***

[@cdklabs/generative-ai-cdk-constructs](../../../README.md) / [bedrock](../README.md) / OrchestrationExecutor

# Class: OrchestrationExecutor

Contains details about the Lambda function containing the orchestration logic carried
out upon invoking the custom orchestration.

## Properties

### lambdaFunction

> `readonly` **lambdaFunction**: `IFunction`
## Methods

### \_render()

> **\_render**(): `OrchestrationExecutorProperty`
**`Internal`**

Format as CFN properties

This is an internal core function and should not be called directly.

#### Returns

`OrchestrationExecutorProperty`

***

### fromlambdaFunction()

> `static` **fromlambdaFunction**(`lambdaFunction`): [`OrchestrationExecutor`](OrchestrationExecutor.md)
Defines an orchestration executor with a Lambda function containing the business logic.

#### Parameters

##### lambdaFunction

`IFunction`

Lambda function to be called by the orchestration.

#### Returns

[`OrchestrationExecutor`](OrchestrationExecutor.md)
33 changes: 33 additions & 0 deletions apidocs/namespaces/bedrock/enumerations/AgentCollaboratorType.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
[**@cdklabs/generative-ai-cdk-constructs**](../../../README.md)

***

[@cdklabs/generative-ai-cdk-constructs](../../../README.md) / [bedrock](../README.md) / AgentCollaboratorType

# Enumeration: AgentCollaboratorType

Enum for collaborator's relay conversation history types.

## Enumeration Members

### DISABLED

> **DISABLED**: `"DISABLED"`
Disabling collaboration.

***

### SUPERVISOR

> **SUPERVISOR**: `"SUPERVISOR"`
Supervisor agent.

***

### SUPERVISOR\_ROUTER

> **SUPERVISOR\_ROUTER**: `"SUPERVISOR_ROUTER"`
supervisor router.
25 changes: 25 additions & 0 deletions apidocs/namespaces/bedrock/enumerations/OrchestrationType.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[**@cdklabs/generative-ai-cdk-constructs**](../../../README.md)

***

[@cdklabs/generative-ai-cdk-constructs](../../../README.md) / [bedrock](../README.md) / OrchestrationType

# Enumeration: OrchestrationType

Enum for orchestration types available for agents.

## Enumeration Members

### CUSTOM

> **CUSTOM**: `"CUSTOM"`
Custom orchestration using Lambda.

***

### STANDARD

> **STANDARD**: `"STANDARD"`
Default orchestration by the agent.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[**@cdklabs/generative-ai-cdk-constructs**](../../../README.md)

***

[@cdklabs/generative-ai-cdk-constructs](../../../README.md) / [bedrock](../README.md) / RelayConversationHistoryType

# Enumeration: RelayConversationHistoryType

Enum for collaborator's relay conversation history types.

## Enumeration Members

### DISABLED

> **DISABLED**: `"DISABLED"`
Disabling relay of conversation history to the collaborator.

***

### TO\_COLLABORATOR

> **TO\_COLLABORATOR**: `"TO_COLLABORATOR"`
Sending to the collaborator.
47 changes: 47 additions & 0 deletions apidocs/namespaces/bedrock/interfaces/AgentCollaborator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
[**@cdklabs/generative-ai-cdk-constructs**](../../../README.md)

***

[@cdklabs/generative-ai-cdk-constructs](../../../README.md) / [bedrock](../README.md) / AgentCollaborator

# Interface: AgentCollaborator

Settings for agent collaboration with other agents.

## Properties

### agentDescriptor

> `readonly` **agentDescriptor**: [`AgentDescriptor`](AgentDescriptor.md)
Descriptor for the collaborating agent.

***

### collaborationInstruction

> `readonly` **collaborationInstruction**: `string`
Instructions on how this agent should collaborate with the main agent.

***

### collaboratorName

> `readonly` **collaboratorName**: `string`
A friendly name for the collaborator.

***

### relayConversationHistory?

> `readonly` `optional` **relayConversationHistory**: [`RelayConversationHistoryType`](../enumerations/RelayConversationHistoryType.md)
Whether to relay conversation history to this collaborator.

#### Default

```ts
- undefined (uses service default)
```
17 changes: 17 additions & 0 deletions apidocs/namespaces/bedrock/interfaces/AgentDescriptor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[**@cdklabs/generative-ai-cdk-constructs**](../../../README.md)

***

[@cdklabs/generative-ai-cdk-constructs](../../../README.md) / [bedrock](../README.md) / AgentDescriptor

# Interface: AgentDescriptor

An agent descriptor.

## Properties

### aliasArn

> `readonly` **aliasArn**: `string`
The ARN of the alias for the collaborating agent.
56 changes: 56 additions & 0 deletions apidocs/namespaces/bedrock/interfaces/AgentProps.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,34 @@ The Action Groups associated with the agent.

***

### agentCollaboration?

> `readonly` `optional` **agentCollaboration**: [`AgentCollaboratorType`](../enumerations/AgentCollaboratorType.md)
The collaboration type for the agent.

#### Default

```ts
- No collaboration (disabled).
```

***

### agentCollaborators?

> `readonly` `optional` **agentCollaborators**: [`AgentCollaborator`](AgentCollaborator.md)[]
Collaborators that this agent will work with.

#### Default

```ts
- No collaborators.
```

***

### codeInterpreterEnabled?

> `readonly` `optional` **codeInterpreterEnabled**: `boolean`
Expand All @@ -32,6 +60,20 @@ Select whether the agent can generate, run, and troubleshoot code when trying to

***

### customOrchestration?

> `readonly` `optional` **customOrchestration**: [`CustomOrchestration`](CustomOrchestration.md)
Details of custom orchestration for the agent.

#### Default

```ts
- Standard orchestration.
```

***

### description?

> `readonly` `optional` **description**: `string`
Expand Down Expand Up @@ -172,6 +214,20 @@ The name of the agent.

***

### orchestrationType?

> `readonly` `optional` **orchestrationType**: [`OrchestrationType`](../enumerations/OrchestrationType.md)
The type of orchestration to use for the agent.

#### Default

```ts
- STANDARD
```

***

### promptOverrideConfiguration?

> `readonly` `optional` **promptOverrideConfiguration**: [`PromptOverrideConfiguration`](../classes/PromptOverrideConfiguration.md)
Expand Down
17 changes: 17 additions & 0 deletions apidocs/namespaces/bedrock/interfaces/CustomOrchestration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[**@cdklabs/generative-ai-cdk-constructs**](../../../README.md)

***

[@cdklabs/generative-ai-cdk-constructs](../../../README.md) / [bedrock](../README.md) / CustomOrchestration

# Interface: CustomOrchestration

Configuration for custom orchestration of the agent.

## Properties

### executor

> `readonly` **executor**: [`OrchestrationExecutor`](../classes/OrchestrationExecutor.md)
The Lambda function to use for custom orchestration.
Loading

0 comments on commit 3f642b1

Please sign in to comment.