Skip to main content

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.

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.

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:
  1. Understands the intent and extracts any missing parameters via clarification
  2. Links the question to the relevant ERP tables using FAISS semantic search
  3. Generates a MySQL query tailored to your SAP schema
  4. Validates syntax, security rules, and business constraints — retrying up to 3 times on failure
  5. Executes the query on your read-only MySQL RDS instance
  6. Analyzes results and builds charts, KPI cards, and optional executive summaries
  7. 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

1

Clone and configure

Copy .env.example to .env and fill in your AWS, database, and Cognito credentials.
2

Start with Docker Compose

docker compose -f infra/docker/docker-compose.yml up
The backend starts on port 8000, the frontend on port 80.
3

Open the chat interface

Navigate to http://localhost in your browser, log in with your Cognito credentials, and ask your first question.
4

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

FeatureDetails
Natural Language to SQLSpanish queries translated to MySQL via Claude Sonnet 4.5 on AWS Bedrock
Auto VisualizationBar, line, pie, horizontal bar, and stacked bar charts generated automatically
Self-CorrectionUp to 3 automatic retry attempts when SQL fails validation or execution
HITL ConfirmationHuman-in-the-loop gate for expensive or ambiguous queries
RBAC + ModulesPer-role permissions and per-module data access (Ingresos, Costos, Inventario, etc.)
Multi-TenantEach client runs on its own isolated instance with tenant-scoped data access
Long-Term Memory90-day conversation history in DynamoDB for contextual continuity
File AnalysisUpload Excel/CSV files and ask questions about the data directly
ForecastingTime-series projections using StatsForecast
ObservabilityPrometheus metrics, Grafana dashboards, cost tracking per user and node

Build docs developers (and LLMs) love