Semantic Layer + Multi-Agent Analytics Platform
中文 | English
Multi-agent ChatBI platform — three-tier deterministic architecture (Semantic Layer + VQR + NL2SQL) for intelligent data analysis through natural language conversations across multiple data sources.
Agentic Data is an enterprise-grade AI Agent-powered data analytics platform. Users can ask questions in natural language, which are automatically routed to the appropriate data source (Athena / PostgreSQL / MySQL / Snowflake), translated into SQL, and returned with visualized results.
Core capabilities:
- Natural Language Queries — ask in Chinese or English, auto-generates and executes SQL
- Multi-Data Source Support — Athena, PostgreSQL, MySQL, Snowflake, S3
- Multi-Agent Collaboration — Supervisor intelligent routing + specialized Sub-Agent parallel analysis
- Semantic Layer — predefined metrics, dimensions, and synonyms to improve query accuracy
- VQR (Verified Query Repository) — prioritize matching verified SQL to avoid redundant generation
- Real-time Streaming — SSE push for analysis process and results
- Auto Visualization — query results automatically rendered as ECharts charts
- Alerts & KPI — configure alert rules and dashboard metrics via natural language
┌─────────────────────────────────────────────────────┐
│ ALB (HTTPS:443) │
├─────────────────────────────────────────────────────┤
│ ECS Fargate (ARM64) │
│ ┌───────────────────────────────────────────────┐ │
│ │ FastAPI (uvicorn) │ │
│ │ ├── /api/chat (SSE streaming) │ │
│ │ ├── /api/config, /api/cost, /api/data-catalog│ │
│ │ └── Static Web (React SPA) │ │
│ ├───────────────────────────────────────────────┤ │
│ │ Agentic Core │ │
│ │ ├── Supervisor Agent (routing + orchestration)│ │
│ │ ├── DataAnalyst Agent (SQL gen + execution) │ │
│ │ ├── Orchestrator (direct/parallel/pipeline) │ │
│ │ ├── Semantic Layer (metrics/dimensions) │ │
│ │ └── VQR (verified query cache) │ │
│ └───────────────────────────────────────────────┘ │
├─────────────────────────────────────────────────────┤
│ AWS Services │
│ ├── DynamoDB x5 (config/chat/cost/events/feedback) │
│ ├── S3 (data lake + report storage) │
│ ├── Athena (data lake queries) │
│ ├── Bedrock / OpenAI Compatible (LLM) │
│ └── RDS PostgreSQL/MySQL (optional) │
└─────────────────────────────────────────────────────┘
| Layer | Technology |
|---|---|
| Frontend | React (CDN) + ECharts + Leaflet |
| Backend | Python 3.12 + FastAPI + Uvicorn |
| AI Agent | Strands Agents SDK |
| LLM | Bedrock (Claude) / OpenAI Compatible / SiliconFlow / LiteLLM |
| Infrastructure | AWS CDK (TypeScript) |
| Container | ECS Fargate (ARM64) |
| Storage | DynamoDB + S3 + Athena |
| Auth | Local Auth / Cognito / Authing |
- AWS CLI — configured with credentials and region
- Node.js 18+ — for CDK and frontend build
- Docker — for container image build
- AWS CDK CLI — for infrastructure deployment
# Verify environment
aws sts get-caller-identity
node --version # >= 18
docker info
cdk --version # if not installed: npm install -g aws-cdkcd cdk
npm install
npx cdk bootstrapTo specify a region:
npx cdk bootstrap aws://<ACCOUNT_ID>/<REGION>
bash deploy.shThe script will guide you through configuration:
| Setting | Description | Default |
|---|---|---|
| Region | Deployment region | AWS CLI default region |
| Admin Password | Admin login password | Admin@2026 |
| Security Group Allowlist | IPs allowed to access ALB | 10.0.0.0/8 |
| VPC | Use existing VPC or create new | Create new |
| Model | LLM provider config | Global: Bedrock / China: manual config |
| RDS | Enable PostgreSQL | No |
cd cdk
npm install
npx cdk deploy \
--parameters AdminPassword=<YOUR_PASSWORD> \
--parameters AllowedCIDRs="1.2.3.4/32" \
--require-approval broadening# China region + OpenAI compatible model
npx cdk deploy \
-c model_provider=openai \
-c openai_base_url=https://api.siliconflow.cn/v1 \
-c openai_api_key=sk-xxx \
-c openai_model=Pro/Qwen/Qwen2.5-72B-Instruct \
--parameters AdminPassword=<YOUR_PASSWORD> \
--parameters AllowedCIDRs="1.2.3.4/32"
# Use existing VPC + enable RDS
npx cdk deploy \
-c vpc_id=vpc-xxx \
-c enable_rds=true \
--parameters AdminPassword=<YOUR_PASSWORD> \
--parameters AllowedCIDRs="1.2.3.4/32"
# Specify Bedrock region (app in ap-southeast-1, Bedrock in us-east-1)
npx cdk deploy \
-c bedrock_region=us-east-1 \
--parameters AdminPassword=<YOUR_PASSWORD> \
--parameters AllowedCIDRs="1.2.3.4/32"After deployment, CDK outputs:
Outputs:
AgenticDataStack.ApplicationURL = http://Agenti-ALB-xxxxx.elb.amazonaws.com
AgenticDataStack.AdminUser = admin
AgenticDataStack.ConfigTableName = agentic-data-config
AgenticDataStack.DataBucketName = agenticdatastack-databucket-xxxxx
Open ApplicationURL and log in with admin / your configured password.
Go to Admin Console > Model Management and add an LLM:
| Region | Recommended Model |
|---|---|
| Global | Bedrock Claude Sonnet 4.6 (configured by default) |
| China | SiliconFlow / ZhipuAI (GLM) / DeepSeek |
Go to Admin Console > Data Source Management:
- Athena — S3 data lake queries (requires database, tables, output location)
- PostgreSQL / MySQL — RDS or self-hosted databases
- Snowflake — cloud data warehouse
- S3 — analyze CSV/JSON files directly
Go to Admin Console > Semantic Layer to define:
- Metrics — e.g. "daily output" =
SUM(output_qty) - Dimensions — e.g. "factory" =
factory_name - Synonyms — e.g. "production" -> "daily output"
- Query Templates — predefined SQL for common queries
# Install dependencies
pip install -r requirements.txt
# Set environment variables
export AGENTIC_AUTO_REGION=us-east-1
export AGENTIC_AUTO_CONFIG_TABLE=agentic-data-config
export AGENTIC_AUTO_CHAT_TABLE=agentic-data-chat-history
export AGENTIC_AUTO_COST_TABLE=agentic-data-cost
export AGENTIC_AUTO_EVENTS_TABLE=agentic-data-events
export AGENTIC_AUTO_FEEDBACK_TABLE=agentic-data-feedback
export AGENTIC_AUTO_DATA_BUCKET=your-data-bucket
# Start
python -m uvicorn api.main:app --host 0.0.0.0 --port 8501 --reloadVisit http://localhost:8501
├── api/
│ └── main.py # FastAPI entry (REST + SSE)
├── agentic_core/
│ ├── agents.py # Supervisor + Sub-Agent definitions
│ ├── orchestrator.py # Orchestration engine (direct/parallel/pipeline/supervisor)
│ ├── tools.py # Agent tools (NL2SQL, semantic query, reports, etc.)
│ ├── semantic_layer.py # Semantic layer (metrics/dimensions/templates)
│ ├── dynamic_context.py # Dynamic prompt construction
│ ├── vqr.py # Verified Query Repository
│ ├── db_engine.py # Multi-database engine abstraction
│ ├── agent_registry.py # Agent definition registry
│ ├── alert_rules.py # Alert/KPI rule engine
│ ├── sql_cache.py # SQL cache
│ ├── user_memory.py # User memory
│ ├── local_auth.py # Local authentication
│ ├── cognito_auth.py # Cognito authentication
│ └── authing_auth.py # Authing authentication
├── web/
│ └── index.html # React SPA (single file)
├── cdk/
│ ├── lib/
│ │ └── agentic-data-stack.ts # CDK infrastructure definition
│ ├── bin/cdk.ts # CDK entry point
│ └── deploy.sh # Interactive deploy script
├── config.py # Centralized config (env vars)
├── auth.py # Auth middleware
├── Dockerfile # Production image
└── requirements.txt # Python dependencies
| Variable | Description | Default |
|---|---|---|
AGENTIC_AUTO_REGION |
AWS region | us-east-1 |
BEDROCK_REGION |
Bedrock region (can differ from app region) | Same as REGION |
AGENTIC_AUTO_MODEL_PROVIDER |
Model provider (bedrock / openai) |
bedrock |
AGENTIC_AUTO_SUP_MODEL |
Supervisor model ID | Claude Sonnet 4.6 |
AGENTIC_AUTO_SUB_MODEL |
Sub-Agent model ID | Claude Haiku 4.5 |
SQL_ENGINE |
SQL engine (sqlite / postgresql / snowflake) |
sqlite |
AGENTIC_AUTO_AUTH_ENABLED |
Enable authentication | false |
AGENTIC_AUTO_PORT |
Application port | 8501 |
See config.py for the full list.
- ALB security group blocks
0.0.0.0/0— allowlisted IPs required - Supports Local Auth / Cognito / Authing authentication
- DynamoDB tables set to
RETAINdeletion protection - S3 Bucket defaults to Block All Public Access
- Supports Bedrock Guardrails for content safety filtering
cd cdk
npx cdk destroyNote: DynamoDB tables and S3 Bucket are set to
RETAINand will not be deleted with the stack. Manual cleanup required.
Private — All rights reserved.