Skip to content

Commit 537e713

Browse files
committed
making the rocket text more like a button, making it more obvious for users to hover over agents for more info, adding to troubleshooting doc pointers to lambda logs, cloudformation output is a link to the secret, bug fix in external MCP agents with custom names.
1 parent 9a17ed5 commit 537e713

File tree

6 files changed

+44
-18
lines changed

6 files changed

+44
-18
lines changed

docs/custom-MCP-agent.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ In the AWS account where the IDP solution is deployed, create a secret with your
147147

148148
1. **Navigate to AWS Secrets Manager** in the AWS Console
149149
2. **Find the External MCP Agents Secret**:
150-
- Look for a secret named `{StackName}/external-mcp-agents/credentials` (where StackName is your IDP stack name).
150+
- Use the `ExternalMCPAgentsSecretConsoleURL` link from your CloudFormation stack outputs to go directly to the secret
151+
- Alternatively, look for a secret named `{StackName}/external-mcp-agents/credentials` (where StackName is your IDP stack name)
151152
- This secret is automatically created by the CloudFormation template with an empty array `[]`
152-
- You can find the exact secret name in your CloudFormation stack outputs
153153

154154
3. **Update Secret with JSON Array Structure**:
155155
```json

docs/troubleshooting.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,14 @@ This guide provides solutions for common issues and optimization techniques for
4242
| **DynamoDB capacity exceeded** | Check CloudWatch metrics for throttling. Consider increasing provisioned capacity or switching to on-demand capacity. |
4343
| **S3 permission errors** | Verify bucket policies and IAM role permissions. Check for cross-account access issues. |
4444

45+
### Agent Processing Issues
46+
47+
| Issue | Resolution |
48+
|-------|------------|
49+
| **Agent query shows "processing failed"** | Check CloudWatch logs for the Agent Processing Lambda function (`{StackName}-AgentProcessorFunction-*`). Look for specific error messages, timeout issues, or permission errors. |
50+
| **External MCP agent not appearing** | Verify the External MCP Agents secret is properly configured with valid JSON array format. Check CloudWatch logs for agent registration errors. |
51+
| **Agent responses are incomplete** | Check CloudWatch logs for token limits, model throttling, or timeout issues in the Agent Processing function. |
52+
4553
## Performance Considerations
4654

4755
### Resource Sizing

lib/idp_common_pkg/idp_common/agents/factory/registry.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
agent_name="Analytics Agent",
3737
agent_description="""
3838
Converts natural language questions into SQL queries and generates visualizations from document data.
39-
This agent has access to all databases within the IDP system, including metering databases which track
39+
This agent has access to many databases within the IDP system, including metering databases which track
4040
the document processing volume and statistics, document-specific tables for different classes of documents,
4141
entity-specific information like names of people, numbers, and other entities extracted from documents,
4242
as well as evaluation tables which include confidence scores for extracted entities as well as
@@ -154,9 +154,8 @@ def wrapper(config=None, session=None, model_id=None, **kwargs):
154154
# Determine agent name and ID
155155
if "agent_name" in mcp_config and mcp_config["agent_name"]:
156156
agent_name = mcp_config["agent_name"]
157-
# Create ID from name with UUID for uniqueness
158-
name_no_spaces = agent_name.replace(" ", "_").lower()
159-
agent_id = f"{name_no_spaces}_{str(uuid.uuid4())[:8]}"
157+
# Create ID from name with no spaces - assume users provide unique names
158+
agent_id = agent_name.replace(" ", "_").lower()
160159
else:
161160
agent_name = f"External MCP Agent {i}"
162161
agent_id = f"external-mcp-agent-{i}"

src/ui/src/components/document-agents-layout/AgentQueryInput.jsx

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -414,21 +414,29 @@ const AgentQueryInput = ({ onSubmit, isSubmitting, selectedResult }) => {
414414
<form onSubmit={handleSubmit}>
415415
<SpaceBetween size="l">
416416
<Box>
417-
<SpaceBetween direction="horizontal" size="s" alignItems="center">
418-
<Box fontSize="body-m" fontWeight="bold">
417+
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
418+
<Box fontSize="heading-xs" fontWeight="bold">
419419
Select from available agents
420420
</Box>
421-
<Button variant="link" onClick={() => setShowMcpInfoModal(true)} fontSize="body-s">
421+
<Button
422+
variant="normal"
423+
onClick={() => setShowMcpInfoModal(true)}
424+
fontSize="body-s"
425+
style={{
426+
borderColor: '#e9ecef',
427+
}}
428+
>
422429
🚀 NEW: Integrate your own systems with MCP!
423430
</Button>
424-
</SpaceBetween>
431+
</div>
425432
<div
426433
style={{
427434
maxHeight: '200px',
428435
overflowY: 'auto',
429436
border: '1px solid #d5dbdb',
430437
padding: '8px',
431438
position: 'relative',
439+
marginTop: '16px',
432440
}}
433441
>
434442
{isLoadingAgents && (
@@ -446,10 +454,21 @@ const AgentQueryInput = ({ onSubmit, isSubmitting, selectedResult }) => {
446454
{availableAgents.map((agent) => (
447455
<div
448456
key={agent.agent_id}
449-
onMouseEnter={(e) => handleMouseEnter(agent.agent_id, e)}
457+
onMouseEnter={(e) => {
458+
handleMouseEnter(agent.agent_id, e);
459+
e.currentTarget.style.backgroundColor = '#f8f9fa';
460+
}}
450461
onMouseMove={handleMouseMove}
451-
onMouseLeave={handleMouseLeave}
452-
style={{ width: '100%' }}
462+
onMouseLeave={(e) => {
463+
handleMouseLeave();
464+
e.currentTarget.style.backgroundColor = 'transparent';
465+
}}
466+
style={{
467+
width: '100%',
468+
padding: '4px',
469+
borderRadius: '4px',
470+
transition: 'background-color 0.2s ease',
471+
}}
453472
>
454473
<Checkbox
455474
checked={selectedAgents.includes(agent.agent_id)}

src/ui/src/components/document-agents-layout/tools-panel.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ const ToolsPanel = () => {
2424
>
2525
<div>
2626
<p>
27-
Use Agent Analysis to interact with AI agents using natural language and receive interactive visualizations and
28-
insights.
27+
Use Agent Analysis to interact with AI agents using natural language and receive interactive visualizations
28+
and insights.
2929
</p>
3030
<h3>How to use</h3>
3131
<ol>

template.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6414,6 +6414,6 @@ Outputs:
64146414
REACT_APP_APPSYNC_GRAPHQL_URL=${GraphQLApi.GraphQLUrl}
64156415
REACT_APP_AWS_REGION=${AWS::Region}
64166416
REACT_APP_SETTINGS_PARAMETER=${SettingsParameter}
6417-
ExternalMCPAgentsSecretName:
6418-
Description: Name of the Secrets Manager secret for External MCP Agent credentials (JSON array format)
6419-
Value: !Sub "${AWS::StackName}/external-mcp-agents/credentials"
6417+
ExternalMCPAgentsSecretConsoleURL:
6418+
Description: External MCP Agents secret console URL - configure MCP server credentials here (JSON array format)
6419+
Value: !Sub "https://${AWS::Region}.console.aws.amazon.com/secretsmanager/secret?name=${AWS::StackName}/external-mcp-agents/credentials&region=${AWS::Region}"

0 commit comments

Comments
 (0)