Generative AI · Business Intelligence · AWS

AI Data Analyst for Real-Time Conversational Insights

Chatwit — a conversational analytics platform that combines Amazon Bedrock, Amazon Nova Pro, autonomous database exploration, real-time streaming and controlled SQL execution.

Chatwit — AI Data Analyst for Real-Time Conversational Insights

Client · Chatwit · Generative AI · AWS

The Challenge

Chatwit needed a more intuitive way for users to interact with business data and obtain insights without depending on SQL expertise or predefined dashboards.

Traditional analytics workflows often require users to know which reports to open, which filters to apply, or which technical team to contact when the required information is not already available. This becomes particularly challenging when users have follow-up questions and want to explore the data interactively.

Chatwit wanted to provide an always-available AI data analyst that could understand questions expressed in natural language, investigate the underlying data, and return meaningful insights in real time.

The solution also needed to maintain strong security controls because the AI would interact with operational databases.

Grey Bracket DevOps Automation designed and implemented a conversational AI analytics platform that combines Generative AI, autonomous database exploration, real-time streaming, and controlled SQL execution.

Discovery

Natural-language analytics · Autonomous exploration

Grey Bracket DevOps Automation focused on understanding how users could interact with data through a conversational experience rather than a traditional dashboard-driven workflow.

The platform was designed to support questions such as:

  • "What is our best-selling product?"
  • "Show me the sales trend for the last three months."
  • "Which category is performing the best?"
  • "How many new users joined this month?"
  • "Show me the top five products."
  • "Can you visualize the results?"

Instead of requiring users to know the underlying database structure, the AI agent investigates the available schema and determines which information is required.

A key requirement was real-time interaction. Users should be able to see the AI working through the question rather than waiting silently while multiple database operations are performed.

Onboarding

Amazon Bedrock · Amazon Nova Pro · ECS Fargate

Grey Bracket DevOps Automation implemented an AI data analyst using Amazon Bedrock and Amazon Nova Pro.

The AI agent acts as an always-available analytics assistant that can investigate data and respond to users without requiring SQL knowledge.

When a user asks a question, the agent can:

  1. Understand the natural-language request.
  2. Determine the information required.
  3. Discover relevant database tables.
  4. Inspect columns and structures.
  5. Explore data values when necessary.
  6. Generate database-specific SQL.
  7. Submit the SQL to the server-side validation layer.
  8. Execute the approved read-only query.
  9. Analyze the returned results.
  10. Correct and retry queries when errors occur.
  11. Generate a business-friendly response.
  12. Return the result as a table, metric, or visualization.

Operations & Support

Real-time streaming · SQL Guard · Private VPC

Real-time interaction

The platform uses Amazon Bedrock ConverseStream together with Socket.IO to stream agent activity to the browser.

Instead of displaying only a final answer, the interface can show processing stages such as:

Understanding questionExploring databaseInspecting schemaGenerating SQLExecuting queryAnalyzing resultsPreparing answer

This provides users with transparency into the AI-driven workflow.

Security controls

The AI model does not receive direct database access. All database requests pass through the controlled execute_sql_query tool and application-level SQL validation.

Only approved read operations are allowed:

  • SELECT
  • WITH
  • SHOW
  • DESCRIBE
  • EXPLAIN

Operations such as INSERT, UPDATE, DELETE, DROP, ALTER, and CREATE are rejected. Stacked SQL statements are blocked, and unbounded queries receive an automatic LIMIT 500.

Optimisation & Advisory

Responsiveness · Conversational continuity · Portability

Grey Bracket DevOps Automation optimized Chatwit's architecture around responsiveness, conversational continuity, security, and usability.

A major optimization was the use of streaming throughout the AI interaction. With Amazon Bedrock ConverseStream, the system can begin delivering processing information before the complete agent workflow has finished.

The platform also maintains short-term conversational context.

User: "Which category has the highest sales?"

User: "Show me the top five products from that category."

User: "Now show me the results as a chart."

The agent can use the preceding conversation to understand the context of each follow-up request.

The architecture also allows the AI to dynamically determine whether a table, headline metric, or visualization is the most appropriate way to communicate the result.

The reusable query-agent was separated from the application server so that the conversational analytics capability can be reused across different applications and database environments.

Support for both MySQL and PostgreSQL further improves the portability of the solution.

Architecture

Chatwit AWS AI Data Analyst Architecture

Real-time AI processing and results with Amazon Bedrock, Amazon Nova Pro, autonomous database exploration and application-level SQL Guard.

Chatwit AWS AI Data Analyst architecture showing business user, React frontend, ECS Fargate application, Amazon Bedrock Nova Pro, SQL Guard, private VPC databases, DynamoDB conversation memory and the AI agent workflow

Summary

Business value · Conversational analytics

Grey Bracket DevOps Automation helped Chatwit create an always-available AI data analyst that brings real-time conversational interaction to business analytics.

Users can ask questions naturally, watch the AI investigate the data, and receive results as metrics, tables, or visualizations without needing SQL knowledge.

The AI agent dynamically explores database structures, generates database-specific SQL, validates queries before execution, recovers from errors, analyzes results, and maintains conversational context for follow-up questions.

The solution combines Amazon Bedrock, Amazon Nova Pro, Amazon ECS Fargate, Amazon RDS, Amazon Aurora PostgreSQL, Amazon DynamoDB, Amazon CloudFront, Amazon S3, Amazon ECR, AWS Secrets Manager, AWS IAM, Amazon VPC, Application Load Balancer, React, TypeScript, Node.js, Express, Socket.IO, and Chart.js.

About Grey Bracket DevOps Automation

Cloud · DevOps · Generative AI

Grey Bracket DevOps Automation specializes in cloud architecture, DevOps automation, application modernization, Generative AI, AI-powered solutions, cloud security, containerization, automation, and managed cloud services.

We help organizations adopt modern cloud-native technologies to solve practical business challenges and improve operational efficiency.

Our expertise spans AWS cloud architecture, Generative AI, agentic AI solutions, DevOps, application modernization, automation, security, and scalable cloud infrastructure.

We design and implement secure, production-ready solutions that combine cloud, automation, and Generative AI to create measurable business value.

Build a conversational AI analytics platform

Talk to Grey Bracket about turning your operational data into a secure, real-time conversational analytics experience.