Skip to content

Commit 29a7123

Browse files
committed
Merge branch 'ai-agents-documentation' into adp-pkg1
2 parents 438319a + ea9910a commit 29a7123

File tree

16 files changed

+44
-31
lines changed

16 files changed

+44
-31
lines changed

modules/ai-agents/examples/mcp-tools/inputs/event_driven_workflow.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,16 @@ redpanda:
2020
- http:
2121
url: "${secrets.INVENTORY_API}/reserve"
2222
verb: POST
23+
headers:
24+
Content-Type: application/json
2325
body: '{"order_id": "${! this.order_id }", "items": ${! json("items") }}'
2426
- check: this.event_type == "payment_confirmed"
2527
processors:
2628
- http:
2729
url: "${secrets.FULFILLMENT_API}/ship"
2830
verb: POST
31+
headers:
32+
Content-Type: application/json
2933
body: '{"order_id": "${! this.order_id }"}'
3034
# end::component[]
3135

modules/ai-agents/examples/mcp-tools/processors/get_order_status.yaml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
label: get_order_status
2-
3-
processors:
4-
- mapping: |
5-
let order_id = this.order_id
6-
root = if $order_id == "ORD-12345" {
2+
mapping: |
3+
let order_id = this.order_id
4+
root = if $order_id == "ORD-12345" {
75
{
86
"order_id": $order_id,
97
"status": "shipped",
@@ -23,7 +21,7 @@ processors:
2321
}
2422
} else if $order_id == "ORD-99999" {
2523
{
26-
"error": true,
24+
"error": "order_not_found",
2725
"message": "Order not found"
2826
}
2927
} else {

modules/ai-agents/examples/mcp-tools/processors/get_risk_indicators.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ mapping: |
7474
"critical_count": 0,
7575
"high_count": 0,
7676
"medium_count": 2,
77+
"low_count": 1,
78+
"none_count": 0,
7779
"overall_assessment": "medium_fraud_probability"
7880
},
7981
this.transaction_id == "TXN-89015" => {
@@ -99,6 +101,8 @@ mapping: |
99101
"critical_count": 0,
100102
"high_count": 0,
101103
"medium_count": 0,
104+
"low_count": 1,
105+
"none_count": 2,
102106
"overall_assessment": "low_fraud_probability"
103107
},
104108
_ => {
@@ -108,6 +112,8 @@ mapping: |
108112
"critical_count": 0,
109113
"high_count": 0,
110114
"medium_count": 0,
115+
"low_count": 0,
116+
"none_count": 0,
111117
"overall_assessment": "insufficient_data"
112118
}
113119
}

modules/ai-agents/examples/mcp-tools/processors/get_transaction_details.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ mapping: |
99
"merchant": {
1010
"name": "LUXURY WATCHES INT",
1111
"category": "jewelry",
12-
"country": "Singapore",
12+
"country": "SG",
1313
"mcc": "5944"
1414
},
1515
"card_last_four": "4532",
@@ -29,7 +29,7 @@ mapping: |
2929
"merchant": {
3030
"name": "EXAMPLE MKTPLACE",
3131
"category": "online_retail",
32-
"country": "USA",
32+
"country": "US",
3333
"mcc": "5942"
3434
},
3535
"card_last_four": "4532",
@@ -49,7 +49,7 @@ mapping: |
4949
"merchant": {
5050
"name": "EXAMPLE STREAMING",
5151
"category": "subscription_service",
52-
"country": "USA",
52+
"country": "US",
5353
"mcc": "4899"
5454
},
5555
"card_last_four": "8821",
@@ -70,7 +70,7 @@ mapping: |
7070
"merchant": {
7171
"name": "HOTEL PARIS",
7272
"category": "lodging",
73-
"country": "France",
73+
"country": "FR",
7474
"mcc": "7011"
7575
},
7676
"card_last_four": "2193",

modules/ai-agents/examples/mcp-tools/processors/openai_chat.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ openai_chat_completion:
1212
2. Key themes
1313
3. Actionable insights
1414
15-
Feedback: ${! json("feedback_text") }
15+
Feedback: ${! json(feedback_text) }
1616
max_tokens: 500
1717
# end::component[]
1818

modules/ai-agents/examples/mcp-tools/processors/transform_validate.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ processors:
1414
root.is_premium = this.subscription_tier == "premium"
1515
1616
# Filter sensitive data
17-
root.profile = this.profile.without("ssn", "credit_card")
17+
root.profile = this.profile.or({}).without("ssn", "credit_card")
1818
# end::mapping[]
1919

2020
meta:

modules/ai-agents/examples/mcp-tools/processors/verify_merchant.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,13 @@ mapping: |
103103
"reputation_score": 50,
104104
"reputation_level": "unknown",
105105
"verification_status": "not_found",
106+
"fraud_reports": {
107+
"total_reports": 0,
108+
"recent_reports_30d": 0,
109+
"confirmed_fraud_cases": 0
110+
},
111+
"business_details": {},
112+
"red_flags": [],
106113
"message": "Merchant not found in verification database",
107114
"recommendation": "manual_review_required"
108115
}

modules/ai-agents/examples/mcp-tools/snippets/defaults.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,8 @@ properties:
1717
type: string
1818
description: "Temperature units: 'metric' or 'imperial' (default: metric)"
1919
required: false
20+
- name: limit
21+
type: number
22+
description: "Max results (default: 10)"
23+
required: false
2024
# end::properties[]

modules/ai-agents/examples/pipelines/fraud-detection-routing.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ pipeline:
3232
Return JSON: { "fraud_score": 0-100, "reason": "explanation", "recommend_block": true/false }
3333
result_map: |
3434
root = this
35-
root.fraud_analysis = content()
35+
root.fraud_analysis = content().parse_json().catch({})
3636
3737
- mapping: |
3838
root = this

modules/ai-agents/pages/agents/a2a-concepts.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ For example, if your agent URL is `\https://my-agent.ai-agents.abc123.cloud.redp
4545

4646
The `.well-known` path follows internet standards for service discovery, making agents discoverable without configuration.
4747

48-
To configure these fields, see xref:ai-agents:agents/create-agent.adoc#configure-a2a-discovery-metadata-optional[Configure A2A discovery metadata].
48+
To configure the agent card, see xref:ai-agents:agents/create-agent.adoc#configure-a2a-discovery-metadata-optional[Configure A2A discovery metadata].
4949

5050
== Where A2A is used in Redpanda Cloud
5151

0 commit comments

Comments
 (0)