Skip to content

Commit ce1a1f5

Browse files
committed
Merge branch 'ai-agents-documentation' into adp-pkg1
# Conflicts: # modules/ai-agents/pages/observability/concepts.adoc
2 parents bb2133c + 09ca2d1 commit ce1a1f5

22 files changed

Lines changed: 129 additions & 60 deletions

modules/ai-agents/examples/agents/account-agent-prompt.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ You are the account agent for ACME Bank's dispute resolution system. You special
2424
## PII Protection Rules
2525

2626
Always return masked data:
27-
- Email: First letter + **** + @domain (e.g., "s****@example.com")
27+
- Email: First letter + **** + @domain (for example, "s****@example.com")
2828
- Phone: ***-***-XXXX (last 4 digits only)
2929
- Card: Last 4 digits only
3030
- Never return: Full card numbers, SSNs, full account numbers

modules/ai-agents/examples/agents/dispute-root-agent-prompt.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,12 @@ Never:
6161
**Clear, bank-appropriate language:**
6262
- Use "I've reviewed your account" not "I called the account-agent"
6363
- Use "this charge doesn't match your typical spending" not "fraud score is 95/100"
64-
- Use "I'm blocking this card" not "I recommend you freeze it"
64+
- Use "We're blocking this card" not "I recommend you freeze it"
6565
- Don't reveal merchant reputation scores or fraud report counts
6666

6767
**Proactive protection:**
6868
For likely fraud (score 80+):
69-
- Block the card immediately: "I'm blocking your card ending in [XXXX] right now to prevent additional fraudulent charges"
69+
- Block the card immediately: "We're blocking your card ending in [XXXX] right now to prevent additional fraudulent charges"
7070
- Issue replacement: "We'll send you a replacement card with a new number"
7171
- Process the claim: "You'll see the credit for this charge within 10 business days"
7272

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ meta:
4646
properties:
4747
- name: city
4848
type: string
49-
description: "City name (e.g., 'London', 'New York', 'Tokyo')"
49+
description: "City name (for example, 'London', 'New York', 'Tokyo')"
5050
required: true
5151
- name: units
5252
type: string

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ meta:
2222
properties:
2323
- name: jql
2424
type: string
25-
description: "JQL query (e.g., 'project = DOC AND status = Open')"
25+
description: "JQL query (for example, 'project = DOC AND status = Open')"
2626
required: true
2727
- name: max_results
2828
type: number
3.71 MB
Loading
3.92 MB
Loading

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
The Agent-to-Agent (A2A) protocol is an open standard for agent communication and discovery. Redpanda Cloud uses A2A for both external integration and internal pipeline-to-agent communication.
1010

11+
include::ai-agents:partial$byoc-aws-requirement.adoc[]
12+
1113
After reading this page, you will be able to:
1214

1315
* [ ] {learning-objective-1}

modules/ai-agents/pages/agents/architecture-patterns.adoc

Lines changed: 52 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
:learning-objective-2: Choose appropriate LLM models based on task requirements
77
:learning-objective-3: Apply agent boundary design principles for maintainability
88

9-
Design agent systems that are maintainable, discoverable, and reliable by choosing the right architecture pattern and applying clear boundary principles.
9+
This topic helps you design agent systems that are maintainable, discoverable, and reliable by choosing the right architecture pattern and applying clear boundary principles.
10+
11+
include::ai-agents:partial$byoc-aws-requirement.adoc[]
1012

1113
After reading this page, you will be able to:
1214

@@ -20,25 +22,33 @@ Agent architecture determines how you manage complexity as your system grows. Th
2022

2123
Starting with a simple architecture is tempting, but can lead to unmaintainable systems as complexity increases. Planning for growth with clear boundaries prevents technical debt and costly refactoring later.
2224

23-
Warning signs include system prompts exceeding 2000 words, too many tools for the LLM to select correctly, multiple teams modifying the same agent, and changes in one domain breaking others. These symptoms indicate you need architectural boundaries, not just better prompts.
25+
Warning signs that you need architectural boundaries, not just better prompts:
26+
27+
* System prompts exceeding 2000 words
28+
* Too many tools for the LLM to select correctly
29+
* Multiple teams modifying the same agent
30+
* Changes in one domain breaking others
2431

2532
Match agent architecture to domain structure:
2633

27-
[cols="2,3,3"]
34+
[cols="2,2,3,3"]
2835
|===
29-
| Domain Characteristics | Architecture Fit | Reasoning
36+
| Domain Characteristics | Architecture | Pros | Cons
3037

3138
| Single business area, stable requirements
3239
| Single agent
33-
| Simplicity outweighs flexibility needs
40+
| Simple to build and maintain, one deployment, lower latency
41+
| Limited flexibility, difficult to scale to multi-domain problems
3442

3543
| Multiple business areas, shared infrastructure
3644
| Root agent with internal subagents
37-
| Domain separation without deployment complexity
45+
| Separation of concerns, easier debugging, shared resources reduce cost
46+
| Single point of failure, all subagents constrained to same model and budget
3847

3948
| Cross-organization workflows, independent evolution
4049
| External agent-to-agent
41-
| Organizational boundaries require system boundaries
50+
| Independent deployment and scaling, security isolation, flexible infrastructure
51+
| Network latency, authentication complexity, harder to debug across boundaries
4252
|===
4353

4454

@@ -70,6 +80,8 @@ Single agents are simpler to build and maintain. You have one system prompt, one
7080

7181
However, all capabilities must coexist in one agent. Adding features increases complexity rapidly, making single agents difficult to scale to multi-domain problems.
7282

83+
TIP: You can migrate from a single agent to a root agent with subagents without starting over. Add subagents to an existing agent using the Redpanda Cloud Console, then gradually move tools and responsibilities to the new subagents.
84+
7385
== Root agent with subagents pattern
7486

7587
A multi-agent architecture uses a root agent that delegates to specialized internal subagents.
@@ -98,11 +110,11 @@ Internal subagents provide domain isolation, allowing you to update the order su
98110

99111
External A2A integration connects agents across organizational boundaries, platforms, or independent systems.
100112

101-
NOTE: Cross-agent calling between separate Redpanda Cloud agents is not supported. This pattern applies to connecting Redpanda Cloud agents with external agents you host elsewhere.
113+
NOTE: Cross-agent calling between separate Redpanda Cloud agents is not supported. This pattern only applies to connecting Redpanda Cloud agents with external agents you host elsewhere.
102114

103115
=== When to use external A2A
104116

105-
Use external A2A for multi-organization workflows that coordinate agents across company boundaries, for platform integration connecting Redpanda Cloud agents with agents hosted elsewhere, and when agents require different deployment environments such as GPU clusters, air-gapped networks, or regional constraints.
117+
Use external glossterm:Agent2Agent (A2A) protocol[] for multi-organization workflows that coordinate agents across company boundaries, for platform integration connecting Redpanda Cloud agents with agents hosted elsewhere, and when agents require different deployment environments such as GPU clusters, air-gapped networks, or regional constraints.
106118

107119
=== How it works
108120

@@ -130,39 +142,61 @@ For implementation details on external A2A integration, see xref:ai-agents:agent
130142

131143
== Common anti-patterns
132144

133-
Avoid these architecture mistakes that lead to unmaintainable agent systems.
145+
Avoid these architecture mistakes that lead to unmaintainable agent systems. For examples of well-structured agents, see the xref:ai-agents:agents/tutorials/customer-support-agent.adoc[multi-tool orchestration tutorial] and xref:ai-agents:agents/tutorials/transaction-dispute-resolution.adoc[multi-agent architecture tutorial].
134146

135147
=== The monolithic prompt
136148

137149
A monolithic prompt is a single 3000+ word system prompt covering multiple domains.
138150

139-
This pattern fails because LLM confusion increases with prompt length, multiple teams modify the same prompt creating conflicts and unclear ownership, and changes to one domain risk breaking others.
151+
This pattern fails because:
152+
153+
* LLM confusion increases with prompt length
154+
* Multiple teams modify the same prompt creating conflicts and unclear ownership
155+
* Changes to one domain risk breaking others
140156

141157
Split into domain-specific subagents instead. Each subagent gets a focused prompt under 500 words.
142158

143159
=== The tool explosion
144160

145-
A tool explosion occurs when a single agent has 30+ tools from every MCP server in the cluster.
161+
A tool explosion occurs when a single agent has too many tools from every MCP server in the cluster.
146162

147-
This pattern fails because the LLM struggles to choose correctly from large tool sets, tool descriptions compete for limited prompt space, and the agent invokes wrong tools with similar names, wasting iteration budget on selection mistakes.
163+
This pattern fails because:
148164

149-
Limit tools per agent. Use subagents to partition tools by domain. For tool design patterns, see xref:ai-agents:mcp/remote/tool-patterns.adoc[].
165+
* The LLM struggles to choose correctly from large tool sets
166+
* Tool descriptions compete for limited prompt space
167+
* The agent invokes wrong tools with similar names, wasting iteration budget on selection mistakes
168+
169+
Limit tools per agent to 10-15 for optimal performance. Agents with more than 20-25 tools often show degraded tool selection accuracy. Use subagents to partition tools by domain. For tool design patterns, see xref:ai-agents:mcp/remote/tool-patterns.adoc[].
150170

151171
=== Premature A2A splitting
152172

153173
Premature splitting creates three separate A2A agents when all logic could fit in one agent with internal subagents.
154174

155-
This pattern fails because network latency affects every cross-agent call, authentication complexity multiplies with three sets of credentials, debugging requires correlating logs across systems, and you manage three deployments instead of one.
175+
This pattern fails because:
176+
177+
* Network latency affects every cross-agent call
178+
* Authentication complexity multiplies with three sets of credentials
179+
* Debugging requires correlating logs across systems
180+
* You manage three deployments instead of one
156181

157182
Start with internal subagents for domain separation. Split to external A2A only when you need organizational boundaries or different infrastructure.
158183

159184
=== Unbounded tool chaining
160185

161186
Unbounded chaining sets max iterations to 100, returns hundreds of items from tools, and places no constraints on tool call frequency.
162187

163-
This pattern fails because the context window fills with tool results, requests time out before completion, costs spiral with many iterations multiplied by large context, and the agent loses track of the original goal.
188+
This pattern fails because:
189+
190+
* The context window fills with tool results
191+
* Requests time out before completion
192+
* Costs spiral with many iterations multiplied by large context
193+
* The agent loses track of the original goal
194+
195+
For best results:
164196

165-
Design workflows to complete in 20-30 iterations. Return paginated results from tools. Add prompt constraints like "Never call the same tool more than 3 times per request."
197+
* Design workflows to complete in 20-30 iterations
198+
* Return paginated results from tools
199+
* Add prompt constraints like "Never call the same tool more than 3 times per request"
166200

167201
== Model selection guide
168202

@@ -180,7 +214,7 @@ For complex reasoning, choose premium models such as Claude Opus 4.5 or GPT-5.2.
180214

181215
For real-time responses, choose smaller models. Use models optimized for speed, such as Mini or base tiers.
182216

183-
For batch processing, optimize for accuracy over speed. Use larger models when users don't wait for results.
217+
For batch processing, optimize for accuracy over speed. Use larger models when users aren't waiting for results.
184218

185219
=== Optimize for cost and volume
186220

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

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
Agents execute through a reasoning loop where the LLM analyzes context, decides which tools to invoke, processes results, and repeats until the task completes. Understanding this execution model helps you design reliable agent systems.
1010

11+
include::ai-agents:partial$byoc-aws-requirement.adoc[]
12+
1113
After reading this page, you will be able to:
1214

1315
* [ ] {learning-objective-1}
@@ -20,6 +22,11 @@ Every agent request follows a reasoning loop. The agent doesn't execute all tool
2022

2123
=== The reasoning loop
2224

25+
The following diagram shows how agents process requests through iterative reasoning:
26+
27+
.Agent reasoning loop with tool integration
28+
image::ai-agents:agent-reasoning-loop.png[Diagram showing the agent reasoning loop: User Request flows to LLM Receives Context, then to LLM Decision which branches to Tool Executes, Request Clarification, or Return Response to User]
29+
2330
When an agent receives a request:
2431

2532
. The LLM receives the context, including system prompt, conversation history, user request, and previous tool results.
@@ -30,10 +37,15 @@ When an agent receives a request:
3037

3138
The loop continues until one of these conditions is met:
3239

40+
.Reasoning loop exit conditions
41+
image::ai-agents:agent-exit-conditions.png[Diagram showing exit conditions: Task Complete returns response, Max Iterations returns partial result, Unrecoverable Error returns error, otherwise continue loop]
42+
3343
* Agent completes the task and responds to the user
3444
* Agent reaches max iterations limit
3545
* Agent encounters an unrecoverable error
3646

47+
NOTE: If the agent encounters an unrecoverable error on the first iteration, it returns an error immediately. Unrecoverable errors include authentication failures, invalid tool configurations, or LLM API failures.
48+
3749
=== Why iterations matter
3850

3951
Each iteration includes three phases:
@@ -42,9 +54,9 @@ Each iteration includes three phases:
4254
. **Tool invocation**: If the agent decides to call a tool, execution happens and waits for results.
4355
. **Context expansion**: Tool results are added to the conversation history for the next iteration.
4456

45-
With higher iteration limits, agents can complete complex tasks but costs more and takes longer.
57+
With higher iteration limits, agents can complete complex tasks but can cost more and take longer.
4658

47-
With lower iteration limits, agents respond faster and cheaper but may fail on complex requests.
59+
With lower iteration limits, agents can respond faster and are cheaper but may fail on complex requests.
4860

4961
==== Cost calculation
5062

modules/ai-agents/pages/agents/create-agent.adoc

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
Create a new AI agent through the Redpanda Cloud Console. This guide walks you through configuring the agent's model, system prompt, tools, and execution settings.
1010

11+
include::ai-agents:partial$byoc-aws-requirement.adoc[]
12+
1113
After reading this page, you will be able to:
1214

1315
* [ ] {learning-objective-1}
@@ -16,7 +18,7 @@ After reading this page, you will be able to:
1618
1719
== Prerequisites
1820

19-
* A xref:get-started:cluster-types/byoc/index.adoc[BYOC cluster] with Remote MCP enabled.
21+
* A xref:get-started:cluster-types/byoc/index.adoc[BYOC cluster].
2022
* xref:ai-agents:ai-gateway/gateway-quickstart.adoc[AI Gateway configured] with at least one LLM provider enabled.
2123
* At least one xref:ai-agents:mcp/remote/overview.adoc[Remote MCP server] deployed with tools.
2224
* System prompt prepared (see xref:ai-agents:agents/prompt-best-practices.adoc[System Prompt Best Practices]).
@@ -169,7 +171,7 @@ Choose based on task complexity:
169171

170172
Start with 30 for most use cases.
171173

172-
=== Configure A2A discovery metadata
174+
=== Configure A2A discovery metadata (optional)
173175

174176
After creating your agent, configure discovery metadata for external integrations. For detailed agent card design guidance, see link:https://agent2agent.info/docs/guides/create-agent-card/[Create an Agent Card^].
175177

@@ -192,8 +194,8 @@ Skills describe what your agent can do for capability-based discovery. External
192194
.. Click *+ Add Skill* to define what this agent can do.
193195
.. For each skill, configure:
194196
+
195-
* *Skill ID* (required): Unique identifier using lowercase letters, numbers, and hyphens (e.g., `fraud-analysis`, `order-lookup`)
196-
* *Skill Name* (required): Human-readable name displayed in agent directories (e.g., "Fraud Analysis", "Order Lookup")
197+
* *Skill ID* (required): Unique identifier using lowercase letters, numbers, and hyphens (for example, `fraud-analysis`, `order-lookup`)
198+
* *Skill Name* (required): Human-readable name displayed in agent directories (for example, "Fraud Analysis", "Order Lookup")
197199
* *Description* (required): Explain what this skill does and when to use it. Be specific about inputs, outputs, and use cases.
198200
* *Tags* (optional): Add tags for categorization and search. Use common terms like `fraud`, `security`, `finance`, `orders`.
199201
* *Examples* (optional): Click *+ Add Example* to provide sample queries demonstrating how to invoke this skill. Examples help users understand how to interact with your agent.
@@ -202,7 +204,7 @@ Skills describe what your agent can do for capability-based discovery. External
202204

203205
. Click *Save Changes*.
204206

205-
The updated metadata appears immediately at `\https://your-agent-url/.well-known/agent-card.json`. For more about what these fields mean and how they're used, see xref:ai-agents:agents/a2a-concepts.adoc#agent-card-metadata[Agent card metadata].
207+
The updated metadata appears immediately at `\https://your-agent-url/.well-known/agent-card.json`. For more about what these fields mean and how they're used, see xref:ai-agents:agents/a2a-concepts.adoc#agent-cards[Agent cards].
206208

207209
=== Review and create
208210

0 commit comments

Comments
 (0)