Getting started Community Training Tutorials Documentation APIs, AI & Tools
Text Decorators
Policy Name |
A2A Prompt Decorator |
Summary |
Decorates prompts with context information |
Category |
A2A |
First Omni Gateway version available |
v1.9.3 |
Release Notes |
|
Returned Status Codes |
No return codes exist for this policy. |
| This policy supports Agent2Agent Protocol (A2A) version v0.3.0. To learn more about A2A versions, see A2A Releases. |
The A2A Prompt Decorator policy injects additional content into provided prompts before they are sent to the upstream server. You can specify the content to inject either as a DataWeave string parameter or by referencing a file. Additionally, you can use a DataWeave expression to filter which requests should have prompts decorated.
When you apply the policy from the UI, the following parameters are displayed:
| Element | Description |
|---|---|
Text Decorators |
List of text decorations you want to add to the prompts. |
Prompt Text |
DataWeave Expression that generates the prompt text injected into the request. For example: |
Condition |
DataWeave Expression that filters which prompts to decorate. For example: |
File Decorators |
List of file decorations to add to the prompts. |
Condition |
DataWeave Expression that filters which prompts to decorate. For example: |
File Name |
DataWeave Expression with the File Name. For example: |
File Mime Type |
DataWeave Expression with the Mime Type of the file to inject. For example: |
File Source |
Select Base64 if the file Content is base64-encoded data, or Uri if the file Content is a URL to an external file. |
Content |
DataWeave Expression containing either base64-encoded file content or a URL to download the content file. For example: #['https://domain/file-location'] or #['QmFzZTY0IGVuY29kZWQgZmlsZSBjb250ZW50']. |