Skip to content

Commit 91db9e4

Browse files
authored
feat(agent): add support for agent collab, orch and FM in prompt (#1011)
* feat(agent): add support for collab, orch and FM in prompt
1 parent 236230f commit 91db9e4

26 files changed

+1263
-16
lines changed

apidocs/namespaces/bedrock/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
## Enumerations
1414

15+
- [AgentCollaboratorType](enumerations/AgentCollaboratorType.md)
1516
- [AgentStepType](enumerations/AgentStepType.md)
1617
- [ChatMessageRole](enumerations/ChatMessageRole.md)
1718
- [ConfluenceDataSourceAuthType](enumerations/ConfluenceDataSourceAuthType.md)
@@ -27,9 +28,11 @@
2728
- [InferenceProfileType](enumerations/InferenceProfileType.md)
2829
- [KnowledgeBaseType](enumerations/KnowledgeBaseType.md)
2930
- [ManagedWordFilterType](enumerations/ManagedWordFilterType.md)
31+
- [OrchestrationType](enumerations/OrchestrationType.md)
3032
- [ParsingModality](enumerations/ParsingModality.md)
3133
- [ParsingStategyType](enumerations/ParsingStategyType.md)
3234
- [PromptTemplateType](enumerations/PromptTemplateType.md)
35+
- [RelayConversationHistoryType](enumerations/RelayConversationHistoryType.md)
3336
- [SalesforceDataSourceAuthType](enumerations/SalesforceDataSourceAuthType.md)
3437
- [SalesforceObjectType](enumerations/SalesforceObjectType.md)
3538
- [SharePointDataSourceAuthType](enumerations/SharePointDataSourceAuthType.md)
@@ -45,6 +48,7 @@
4548
- [AgentAlias](classes/AgentAlias.md)
4649
- [AgentAliasBase](classes/AgentAliasBase.md)
4750
- [AgentBase](classes/AgentBase.md)
51+
- [AgentCollaborator](classes/AgentCollaborator.md)
4852
- [ApiSchema](classes/ApiSchema.md)
4953
- [ApplicationInferenceProfile](classes/ApplicationInferenceProfile.md)
5054
- [BedrockFoundationModel](classes/BedrockFoundationModel.md)
@@ -65,6 +69,7 @@
6569
- [KendraKnowledgeBaseBase](classes/KendraKnowledgeBaseBase.md)
6670
- [KnowledgeBaseBase](classes/KnowledgeBaseBase.md)
6771
- [Memory](classes/Memory.md)
72+
- [OrchestrationExecutor](classes/OrchestrationExecutor.md)
6873
- [ParentActionGroupSignature](classes/ParentActionGroupSignature.md)
6974
- [ParsingStategy](classes/ParsingStategy.md)
7075
- [Prompt](classes/Prompt.md)
@@ -88,6 +93,7 @@
8893
- [AgentAliasAttributes](interfaces/AgentAliasAttributes.md)
8994
- [AgentAliasProps](interfaces/AgentAliasProps.md)
9095
- [AgentAttributes](interfaces/AgentAttributes.md)
96+
- [AgentCollaboratorProps](interfaces/AgentCollaboratorProps.md)
9197
- [AgentPromptVariantProps](interfaces/AgentPromptVariantProps.md)
9298
- [AgentProps](interfaces/AgentProps.md)
9399
- [ApplicationInferenceProfileAttributes](interfaces/ApplicationInferenceProfileAttributes.md)
@@ -104,6 +110,7 @@
104110
- [ContextualGroundingFilter](interfaces/ContextualGroundingFilter.md)
105111
- [CrawlingFilters](interfaces/CrawlingFilters.md)
106112
- [CrossRegionInferenceProfileProps](interfaces/CrossRegionInferenceProfileProps.md)
113+
- [CustomOrchestration](interfaces/CustomOrchestration.md)
107114
- [CustomParserProps](interfaces/CustomParserProps.md)
108115
- [CustomTopicProps](interfaces/CustomTopicProps.md)
109116
- [DataSourceAssociationProps](interfaces/DataSourceAssociationProps.md)

apidocs/namespaces/bedrock/classes/Agent.md

+50
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,22 @@ The ARN of the agent.
6666

6767
***
6868

69+
### agentCollaboration?
70+
71+
> `readonly` `optional` **agentCollaboration**: [`AgentCollaboratorType`](../enumerations/AgentCollaboratorType.md)
72+
73+
Agent collaboration type.
74+
75+
***
76+
77+
### agentCollaborators?
78+
79+
> `readonly` `optional` **agentCollaborators**: [`AgentCollaborator`](AgentCollaborator.md)[]
80+
81+
Agent collaborators.
82+
83+
***
84+
6985
### agentId
7086

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

99115
***
100116

117+
### customOrchestration?
118+
119+
> `readonly` `optional` **customOrchestration**: [`CustomOrchestration`](../interfaces/CustomOrchestration.md)
120+
121+
Custom orchestration configuration.
122+
123+
***
124+
101125
### description?
102126

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

225249
***
226250

251+
### orchestrationType?
252+
253+
> `readonly` `optional` **orchestrationType**: [`OrchestrationType`](../enumerations/OrchestrationType.md)
254+
255+
The type of orchestration for the agent.
256+
257+
***
258+
227259
### physicalName
228260

229261
> `protected` `readonly` **physicalName**: `string`
@@ -365,6 +397,24 @@ Add multiple action groups to the agent.
365397

366398
***
367399

400+
### addAgentCollaborator()
401+
402+
> **addAgentCollaborator**(`agentCollaborator`): `void`
403+
404+
Add an agent collaborator to the agent.
405+
406+
#### Parameters
407+
408+
##### agentCollaborator
409+
410+
[`AgentCollaborator`](AgentCollaborator.md)
411+
412+
#### Returns
413+
414+
`void`
415+
416+
***
417+
368418
### addGuardrail()
369419

370420
> **addGuardrail**(`guardrail`): `void`

apidocs/namespaces/bedrock/classes/AgentAlias.md

+22
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,28 @@ Grant the given principal identity permissions to perform actions on this agent
322322

323323
***
324324

325+
### grantGet()
326+
327+
> **grantGet**(`grantee`): `Grant`
328+
329+
Grant the given identity permissions to get the agent alias.
330+
331+
#### Parameters
332+
333+
##### grantee
334+
335+
`IGrantable`
336+
337+
#### Returns
338+
339+
`Grant`
340+
341+
#### Inherited from
342+
343+
[`AgentAliasBase`](AgentAliasBase.md).[`grantGet`](AgentAliasBase.md#grantget)
344+
345+
***
346+
325347
### grantInvoke()
326348

327349
> **grantInvoke**(`grantee`): `Grant`

apidocs/namespaces/bedrock/classes/AgentAliasBase.md

+22
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,28 @@ Grant the given principal identity permissions to perform actions on this agent
337337

338338
***
339339

340+
### grantGet()
341+
342+
> **grantGet**(`grantee`): `Grant`
343+
344+
Grant the given identity permissions to get the agent alias.
345+
346+
#### Parameters
347+
348+
##### grantee
349+
350+
`IGrantable`
351+
352+
#### Returns
353+
354+
`Grant`
355+
356+
#### Implementation of
357+
358+
[`IAgentAlias`](../interfaces/IAgentAlias.md).[`grantGet`](../interfaces/IAgentAlias.md#grantget)
359+
360+
***
361+
340362
### grantInvoke()
341363

342364
> **grantInvoke**(`grantee`): `Grant`
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
[**@cdklabs/generative-ai-cdk-constructs**](../../../README.md)
2+
3+
***
4+
5+
[@cdklabs/generative-ai-cdk-constructs](../../../README.md) / [bedrock](../README.md) / AgentCollaborator
6+
7+
# Class: AgentCollaborator
8+
9+
***************************************************************************
10+
DEF - Agent Collaborator Class
11+
***************************************************************************
12+
13+
## Constructors
14+
15+
### new AgentCollaborator()
16+
17+
> **new AgentCollaborator**(`props`): [`AgentCollaborator`](AgentCollaborator.md)
18+
19+
#### Parameters
20+
21+
##### props
22+
23+
[`AgentCollaboratorProps`](../interfaces/AgentCollaboratorProps.md)
24+
25+
#### Returns
26+
27+
[`AgentCollaborator`](AgentCollaborator.md)
28+
29+
## Properties
30+
31+
### agentAlias
32+
33+
> `readonly` **agentAlias**: [`IAgentAlias`](../interfaces/IAgentAlias.md)
34+
35+
***
36+
37+
### collaborationInstruction
38+
39+
> `readonly` **collaborationInstruction**: `string`
40+
41+
Instructions on how this agent should collaborate with the main agent.
42+
43+
***
44+
45+
### collaboratorName
46+
47+
> `readonly` **collaboratorName**: `string`
48+
49+
A friendly name for the collaborator.
50+
51+
***
52+
53+
### relayConversationHistory?
54+
55+
> `readonly` `optional` **relayConversationHistory**: `boolean`
56+
57+
Whether to relay conversation history to this collaborator.
58+
59+
#### Default
60+
61+
```ts
62+
- undefined (uses service default)
63+
```
64+
65+
## Methods
66+
67+
### \_render()
68+
69+
> **\_render**(): `AgentCollaboratorProperty`
70+
71+
**`Internal`**
72+
73+
Format as CFN properties
74+
75+
This is an internal core function and should not be called directly.
76+
77+
#### Returns
78+
79+
`AgentCollaboratorProperty`
80+
81+
***
82+
83+
### grant()
84+
85+
> **grant**(`grantee`): `Grant`
86+
87+
Grants the specified principal permissions to get the agent alias and invoke the agent
88+
from this collaborator.
89+
90+
#### Parameters
91+
92+
##### grantee
93+
94+
`IGrantable`
95+
96+
The principal to grant permissions to
97+
98+
#### Returns
99+
100+
`Grant`
101+
102+
The Grant object
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
[**@cdklabs/generative-ai-cdk-constructs**](../../../README.md)
2+
3+
***
4+
5+
[@cdklabs/generative-ai-cdk-constructs](../../../README.md) / [bedrock](../README.md) / OrchestrationExecutor
6+
7+
# Class: OrchestrationExecutor
8+
9+
Contains details about the Lambda function containing the orchestration logic carried
10+
out upon invoking the custom orchestration.
11+
12+
## Properties
13+
14+
### lambdaFunction
15+
16+
> `readonly` **lambdaFunction**: `IFunction`
17+
18+
## Methods
19+
20+
### \_render()
21+
22+
> **\_render**(): `OrchestrationExecutorProperty`
23+
24+
**`Internal`**
25+
26+
Format as CFN properties
27+
28+
This is an internal core function and should not be called directly.
29+
30+
#### Returns
31+
32+
`OrchestrationExecutorProperty`
33+
34+
***
35+
36+
### fromlambdaFunction()
37+
38+
> `static` **fromlambdaFunction**(`lambdaFunction`): [`OrchestrationExecutor`](OrchestrationExecutor.md)
39+
40+
Defines an orchestration executor with a Lambda function containing the business logic.
41+
42+
#### Parameters
43+
44+
##### lambdaFunction
45+
46+
`IFunction`
47+
48+
Lambda function to be called by the orchestration.
49+
50+
#### Returns
51+
52+
[`OrchestrationExecutor`](OrchestrationExecutor.md)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
[**@cdklabs/generative-ai-cdk-constructs**](../../../README.md)
2+
3+
***
4+
5+
[@cdklabs/generative-ai-cdk-constructs](../../../README.md) / [bedrock](../README.md) / AgentCollaboratorType
6+
7+
# Enumeration: AgentCollaboratorType
8+
9+
Enum for collaborator's relay conversation history types.
10+
11+
## Enumeration Members
12+
13+
### DISABLED
14+
15+
> **DISABLED**: `"DISABLED"`
16+
17+
Disabling collaboration.
18+
19+
***
20+
21+
### SUPERVISOR
22+
23+
> **SUPERVISOR**: `"SUPERVISOR"`
24+
25+
Supervisor agent.
26+
27+
***
28+
29+
### SUPERVISOR\_ROUTER
30+
31+
> **SUPERVISOR\_ROUTER**: `"SUPERVISOR_ROUTER"`
32+
33+
Supervisor router.

0 commit comments

Comments
 (0)