The ERP Financial Agent lets your finance and operations teams ask questions about SAP data in everyday Spanish — no SQL knowledge required. The agent translates natural language into validated MySQL queries, executes them against your ERP database, and returns interactive charts, KPI cards, and narrative summaries in a chat interface.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/yohangr3/agentelanggrafh/llms.txt
Use this file to discover all available pages before exploring further.
Quickstart
Get the backend and frontend running locally in under 10 minutes.
Architecture
Understand the two-level LangGraph pipeline and how all components fit together.
Configuration
All environment variables, AWS settings, and database options explained.
API Reference
Full REST and WebSocket API documentation with request/response schemas.
What the Agent Does
A user sends a message like “¿Cuánto vendimos por región en Q1?” and the agent:- Understands the intent and extracts any missing parameters via clarification
- Links the question to the relevant ERP tables using FAISS semantic search
- Generates a MySQL query tailored to your SAP schema
- Validates syntax, security rules, and business constraints — retrying up to 3 times on failure
- Executes the query on your read-only MySQL RDS instance
- Analyzes results and builds charts, KPI cards, and optional executive summaries
- Streams the complete response back to the user over WebSocket
Agent Pipeline
Inner and outer LangGraph graphs, all 20+ nodes, and routing logic.
Schema Registry
FAISS-backed semantic table linking for 60+ ERP tables.
RBAC
Role and module-based access control for financial data segregation.
Multi-Tenancy
Isolated tenant instances, provisioning, and cross-instance access.
Memory
Redis session memory and 90-day DynamoDB conversation history.
Monitoring
Prometheus metrics, Grafana dashboards, and LangSmith tracing.
Getting Started
Clone and configure
Copy
.env.example to .env and fill in your AWS, database, and Cognito credentials.Open the chat interface
Navigate to
http://localhost in your browser, log in with your Cognito credentials, and ask your first question.Explore the API
The REST API is at
http://localhost:8000. Try GET /health to verify connectivity, then read the API Reference to integrate programmatically.Key Features
| Feature | Details |
|---|---|
| Natural Language to SQL | Spanish queries translated to MySQL via Claude Sonnet 4.5 on AWS Bedrock |
| Auto Visualization | Bar, line, pie, horizontal bar, and stacked bar charts generated automatically |
| Self-Correction | Up to 3 automatic retry attempts when SQL fails validation or execution |
| HITL Confirmation | Human-in-the-loop gate for expensive or ambiguous queries |
| RBAC + Modules | Per-role permissions and per-module data access (Ingresos, Costos, Inventario, etc.) |
| Multi-Tenant | Each client runs on its own isolated instance with tenant-scoped data access |
| Long-Term Memory | 90-day conversation history in DynamoDB for contextual continuity |
| File Analysis | Upload Excel/CSV files and ask questions about the data directly |
| Forecasting | Time-series projections using StatsForecast |
| Observability | Prometheus metrics, Grafana dashboards, cost tracking per user and node |