You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/ai-agents/pages/agents/architecture-patterns.adoc
+46-14Lines changed: 46 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,25 +20,33 @@ Agent architecture determines how you manage complexity as your system grows. Th
20
20
21
21
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.
22
22
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.
23
+
Warning signs that you need architectural boundaries, not just better prompts:
24
+
25
+
* System prompts exceeding 2000 words
26
+
* Too many tools for the LLM to select correctly
27
+
* Multiple teams modifying the same agent
28
+
* Changes in one domain breaking others
24
29
25
30
Match agent architecture to domain structure:
26
31
27
-
[cols="2,3,3"]
32
+
[cols="2,2,3,3"]
28
33
|===
29
-
| Domain Characteristics | Architecture Fit | Reasoning
| Organizational boundaries require system boundaries
48
+
| Independent deployment and scaling, security isolation, flexible infrastructure
49
+
| Network latency, authentication complexity, harder to debug across boundaries
42
50
|===
43
51
44
52
@@ -70,6 +78,8 @@ Single agents are simpler to build and maintain. You have one system prompt, one
70
78
71
79
However, all capabilities must coexist in one agent. Adding features increases complexity rapidly, making single agents difficult to scale to multi-domain problems.
72
80
81
+
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.
82
+
73
83
== Root agent with subagents pattern
74
84
75
85
A multi-agent architecture uses a root agent that delegates to specialized internal subagents.
@@ -102,7 +112,7 @@ NOTE: Cross-agent calling between separate Redpanda Cloud agents is not supporte
102
112
103
113
=== When to use external A2A
104
114
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.
115
+
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.
106
116
107
117
=== How it works
108
118
@@ -136,33 +146,55 @@ Avoid these architecture mistakes that lead to unmaintainable agent systems.
136
146
137
147
A monolithic prompt is a single 3000+ word system prompt covering multiple domains.
138
148
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.
149
+
This pattern fails because:
150
+
151
+
* LLM confusion increases with prompt length
152
+
* Multiple teams modify the same prompt creating conflicts and unclear ownership
153
+
* Changes to one domain risk breaking others
140
154
141
155
Split into domain-specific subagents instead. Each subagent gets a focused prompt under 500 words.
142
156
143
157
=== The tool explosion
144
158
145
-
A tool explosion occurs when a single agent has 30+ tools from every MCP server in the cluster.
159
+
A tool explosion occurs when a single agent has too many tools from every MCP server in the cluster.
160
+
161
+
This pattern fails because:
146
162
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
+
* The LLM struggles to choose correctly from large tool sets
164
+
* Tool descriptions compete for limited prompt space
165
+
* The agent invokes wrong tools with similar names, wasting iteration budget on selection mistakes
148
166
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[].
167
+
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[].
150
168
151
169
=== Premature A2A splitting
152
170
153
171
Premature splitting creates three separate A2A agents when all logic could fit in one agent with internal subagents.
154
172
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.
173
+
This pattern fails because:
174
+
175
+
* Network latency affects every cross-agent call
176
+
* Authentication complexity multiplies with three sets of credentials
177
+
* Debugging requires correlating logs across systems
178
+
* You manage three deployments instead of one
156
179
157
180
Start with internal subagents for domain separation. Split to external A2A only when you need organizational boundaries or different infrastructure.
158
181
159
182
=== Unbounded tool chaining
160
183
161
184
Unbounded chaining sets max iterations to 100, returns hundreds of items from tools, and places no constraints on tool call frequency.
162
185
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.
186
+
This pattern fails because:
187
+
188
+
* The context window fills with tool results
189
+
* Requests time out before completion
190
+
* Costs spiral with many iterations multiplied by large context
191
+
* The agent loses track of the original goal
192
+
193
+
For best results:
164
194
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."
195
+
* Design workflows to complete in 20-30 iterations
196
+
* Return paginated results from tools
197
+
* Add prompt constraints like "Never call the same tool more than 3 times per request"
Copy file name to clipboardExpand all lines: modules/ai-agents/pages/agents/concepts.adoc
+12-2Lines changed: 12 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,11 @@ Every agent request follows a reasoning loop. The agent doesn't execute all tool
20
20
21
21
=== The reasoning loop
22
22
23
+
The following diagram shows how agents process requests through iterative reasoning:
24
+
25
+
.Agent reasoning loop with tool integration
26
+
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]
27
+
23
28
When an agent receives a request:
24
29
25
30
. The LLM receives the context, including system prompt, conversation history, user request, and previous tool results.
@@ -30,10 +35,15 @@ When an agent receives a request:
30
35
31
36
The loop continues until one of these conditions is met:
* Agent completes the task and responds to the user
34
42
* Agent reaches max iterations limit
35
43
* Agent encounters an unrecoverable error
36
44
45
+
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.
46
+
37
47
=== Why iterations matter
38
48
39
49
Each iteration includes three phases:
@@ -42,9 +52,9 @@ Each iteration includes three phases:
42
52
. **Tool invocation**: If the agent decides to call a tool, execution happens and waits for results.
43
53
. **Context expansion**: Tool results are added to the conversation history for the next iteration.
44
54
45
-
With higher iteration limits, agents can complete complex tasks but costs more and takes longer.
55
+
With higher iteration limits, agents can complete complex tasks but can cost more and take longer.
46
56
47
-
With lower iteration limits, agents respond faster and cheaper but may fail on complex requests.
57
+
With lower iteration limits, agents can respond faster and are cheaper but may fail on complex requests.
Copy file name to clipboardExpand all lines: modules/ai-agents/pages/agents/create-agent.adoc
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,8 @@
8
8
9
9
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.
@@ -16,7 +18,7 @@ After reading this page, you will be able to:
16
18
17
19
== Prerequisites
18
20
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].
20
22
* xref:ai-agents:ai-gateway/gateway-quickstart.adoc[AI Gateway configured] with at least one LLM provider enabled.
21
23
* At least one xref:ai-agents:mcp/remote/overview.adoc[Remote MCP server] deployed with tools.
22
24
* 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:
169
171
170
172
Start with 30 for most use cases.
171
173
172
-
=== Configure A2A discovery metadata
174
+
=== Configure A2A discovery metadata (optional)
173
175
174
176
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^].
175
177
@@ -192,8 +194,8 @@ Skills describe what your agent can do for capability-based discovery. External
192
194
.. Click *+ Add Skill* to define what this agent can do.
193
195
.. For each skill, configure:
194
196
+
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")
197
199
* *Description* (required): Explain what this skill does and when to use it. Be specific about inputs, outputs, and use cases.
198
200
* *Tags* (optional): Add tags for categorization and search. Use common terms like `fraud`, `security`, `finance`, `orders`.
199
201
* *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
202
204
203
205
. Click *Save Changes*.
204
206
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].
Copy file name to clipboardExpand all lines: modules/ai-agents/pages/agents/overview.adoc
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,8 @@
8
8
9
9
AI agents are systems that combine large language models (LLMs) with the ability to execute actions and process data. Redpanda Cloud provides real-time streaming infrastructure and standardized tool access to support agent development.
@@ -16,15 +18,15 @@ After reading this page, you will be able to:
16
18
17
19
== What is an AI agent?
18
20
19
-
An AI agent is a system built around a large language model that can interpret user intent, decide which actions are required, invoke external tools, process live and historical data, and chain multiple steps into a workflow. AI agents differ from text-only LLMs by executing actions and invoking external tools.
21
+
An AI agent is a system built around a glossterm:large language model (LLM)[] that can interpret user intent, decide which actions are required, invoke external tools, process live and historical data, and chain multiple steps into a workflow. AI agents differ from text-only LLMs by executing actions and invoking external tools.
20
22
21
23
== How agents work
22
24
23
25
Every AI agent consists of four essential components:
24
26
25
27
* *System prompt*: Defines the agent's role, responsibilities, and constraints
26
28
* *LLM*: Interprets user intent and decides which tools to invoke
27
-
* *Tools*: External capabilities exposed through the Model Context Protocol (MCP)
29
+
* *Tools*: External capabilities exposed through the xref:ai-agents:mcp/remote/overview.adoc[Model Context Protocol (MCP)]
28
30
* *Context*: Conversation history, tool results, and real-time events from Redpanda topics
29
31
30
32
Agents can invoke Redpanda Connect components as tools on-demand. Redpanda Connect pipelines can also invoke agents for event-driven processing. This bidirectional integration supports both interactive workflows and automated streaming.
@@ -35,7 +37,7 @@ For a deeper understanding of how agents execute, manage context, and maintain s
35
37
36
38
== Key benefits
37
39
38
-
Redpanda Cloud provides real-time streaming data so agents access live events instead of batch snapshots. Remote MCP support enables standardized tool access. Managed infrastructure handles deployment, scaling, and security for you. Low-latency execution means tools run close to your data. Integrated secrets management securely stores API keys and credentials.
40
+
Redpanda Cloud provides real-time streaming data so agents access live events instead of batch snapshots. xref:ai-agents:mcp/remote/overview.adoc[Remote MCP] support enables standardized tool access. Managed infrastructure handles deployment, scaling, and security for you. Low-latency execution means tools run close to your data. Integrated secrets management securely stores API keys and credentials.
0 commit comments