@@ -3,43 +3,69 @@ SPDX-License-Identifier: MIT-0
33
44# Agent Analysis Feature
55
6- The GenAIIDP solution includes an integrated Agent Analysis feature that enables you to interactively query and analyze your processed document data using natural language . This feature leverages AI agents to convert natural language questions into SQL queries, execute them against your document analytics database, and generate visualizations or tables to answer your questions .
6+ The GenAIIDP solution includes an integrated Agent Analysis feature that provides intelligent document analysis capabilities through multiple specialized AI agents . This feature enables you to interactively query and analyze your processed document data using natural language, with an intelligent orchestrator that routes queries to the most appropriate specialized agent .
77
88## Overview
99
10- The Agent Analysis feature provides intelligent data exploration capabilities that allow users to :
10+ The Agent Analysis feature provides intelligent data exploration and analysis capabilities through :
1111
12+ - ** Multi-Agent Architecture** : Multiple specialized agents handle different types of queries
13+ - ** Intelligent Orchestration** : Automatic routing of queries to the most appropriate agent
1214- ** Natural Language Querying** : Ask questions about your document data in plain English
13- - ** Automated SQL Generation** : AI agents convert your questions into optimized SQL queries
15+ - ** Automated SQL Generation** : Analytics agents convert questions into optimized SQL queries
1416- ** Interactive Visualizations** : Generate charts, graphs, and tables from query results
1517- ** Real-time Analysis** : Get insights from your processed documents without manual data analysis
1618- ** Secure Code Execution** : Python visualization code runs in isolated AWS Bedrock AgentCore sandboxes
19+ - ** MCP Integration** : Connect external systems and tools via Model Context Protocol (MCP) servers
1720
1821
1922https://github.com/user-attachments/assets/e2dea2c5-5eb1-42f6-9af5-469afd2135a7
2023
2124
2225## Key Features
2326
24- - ** Multi-Modal AI Agent** : Uses advanced language models (Claude 3.7 Sonnet by default) for intelligent query understanding
27+ - ** Multi-Agent System** : Specialized agents for different types of queries (analytics, calculations, etc.)
28+ - ** Intelligent Orchestration** : Automatic query routing based on content analysis and agent capabilities
29+ - ** Multi-Agent Selection** : Select multiple agents simultaneously for complex analysis workflows
30+ - ** MCP External Integration** : Connect custom external tools and systems via MCP servers
2531- ** Secure Architecture** : All code execution happens in AWS Bedrock AgentCore sandboxes, not in Lambda functions
26- - ** Database Schema Discovery** : Agents automatically explore and understand your database structure
32+ - ** Database Schema Discovery** : Analytics agents automatically explore and understand your database structure
2733- ** Flexible Visualization** : Supports multiple chart types including bar charts, line charts, pie charts, and data tables
28- - ** Query History** : Track and manage previous analytics queries through the web interface
29- - ** Real-time Progress** : Live display of agent thought processes and SQL query execution
34+ - ** Query History** : Track and manage previous questions through the web interface with agent selection memory
35+ - ** Real-time Progress** : Live display of agent thought processes and execution steps
3036- ** Error Handling** : Intelligent retry logic for failed queries with automatic corrections
3137
3238## Architecture
3339
40+ ### Multi-Agent System
41+
42+ The Agent Analysis feature uses a multi-agent architecture with:
43+
44+ 1 . ** Orchestrator Agent** : Routes queries to appropriate specialized agents based on query content and agent capabilities
45+ 2 . ** Analytics Agent** : Handles data analysis, SQL generation, and visualization creation
46+ 3 . ** Dummy Agent** : Provides simple calculations and development testing capabilities
47+ 4 . ** External MCP Agents** : Custom agents connected via Model Context Protocol servers
48+ 5 . ** Extensible Framework** : Easy addition of new specialized agents for specific use cases
49+
3450### Agent Workflow
3551
36521 . ** Question Processing** : User submits a natural language question through the web UI
37- 2 . ** Database Discovery** : Agent explores database schema using ` get_database_info ` tool
38- 3 . ** SQL Generation** : Agent converts the question into optimized SQL queries with proper column quoting
39- 4 . ** Query Execution** : SQL queries are executed against Amazon Athena with results stored in S3
40- 5 . ** Data Processing** : Query results are securely transferred to AWS Bedrock AgentCore sandbox
41- 6 . ** Visualization Generation** : Python code generates charts or tables from the data
42- 7 . ** Result Display** : Final visualizations are displayed in the web interface
53+ 2 . ** Agent Selection** : User can choose multiple specific agents or let the orchestrator decide automatically
54+ 3 . ** Query Routing** : Orchestrator analyzes the query and routes it to the most appropriate specialized agent
55+ 4 . ** Specialized Processing** : Selected agent processes the query using its specific tools and capabilities
56+ 5 . ** Result Generation** : Agent generates appropriate responses (visualizations, calculations, text, etc.)
57+ 6 . ** Result Display** : Final results are displayed in the web interface with agent conversation history
58+
59+ ### Analytics Agent Workflow
60+
61+ For data analysis queries, the Analytics Agent follows this workflow:
62+
63+ 1 . ** Database Discovery** : Agent explores database schema using ` get_database_info ` tool
64+ 2 . ** SQL Generation** : Agent converts the question into optimized SQL queries with proper column quoting
65+ 3 . ** Query Execution** : SQL queries are executed against Amazon Athena with results stored in S3
66+ 4 . ** Data Processing** : Query results are securely transferred to AWS Bedrock AgentCore sandbox
67+ 5 . ** Visualization Generation** : Python code generates charts or tables from the data
68+ 6 . ** Result Display** : Final visualizations are displayed in the web interface
4369
4470### Security Architecture
4571
@@ -95,9 +121,37 @@ The analytics agent has access to four specialized tools:
95121### Accessing the Feature
96122
971231 . Log in to the GenAIIDP Web UI
98- 2 . Navigate to the "Document Analytics " section in the main navigation
124+ 2 . Navigate to the "Agent Analysis " section in the main navigation
991253 . You'll see a chat-like interface for querying your document data
100126
127+ ### Agent Selection
128+
129+ The Agent Analysis interface allows you to select from multiple available agents:
130+
131+ ** Multi-Agent Selection:**
132+ - Select multiple agents simultaneously for complex analysis workflows
133+ - Use "Select All Agents" / "Deselect All Agents" for bulk selection
134+ - Each agent brings specialized capabilities to your analysis
135+
136+ ** Available Agent Types:**
137+ - ** Analytics Agent** : Database queries, SQL generation, and data visualization
138+ - ** Dummy Agent** : Simple calculations and testing capabilities
139+ - ** External MCP Agents** : Custom tools and systems integrated via MCP servers
140+
141+ ** Agent Selection Tips:**
142+ - Select specific agents when you know what type of analysis you need
143+ - Choose multiple agents for comprehensive analysis requiring different capabilities
144+ - The system intelligently routes your question to the most appropriate selected agents
145+
146+ ### MCP Integration
147+
148+ ** Custom System Integration:**
149+ - Click "🚀 NEW: Integrate your own systems with MCP!" to learn about connecting external tools
150+ - Add custom agents without code changes or redeployments
151+ - Integrate APIs, databases, and specialized tools via Model Context Protocol servers
152+
153+ For detailed MCP setup instructions, see the [ Custom MCP Agent Documentation] ( ./custom-MCP-agent.md ) .
154+
101155### Asking Questions
102156
103157The agent can answer various types of questions about your processed documents:
0 commit comments