How pedropompeu/franq works
Indaga is a Portuguese-language natural-language-to-SQL assistant over a read-only SQLite database. Users ask through the Streamlit interface, API, or CLI; the agent gathers schema and business context, asks an LLM to plan and review a query, executes it with read-only safeguards, and returns a response with data and presentation guidance. The product also provides conversation memory, privacy masking, warnings, visualizations, evaluation, and optional tracing. Edges reflect README statements and SOURCE INDEX references; unsampled implementation details are not inferred.
Main entry points: graph.py Agent graph · app.py Streamlit app · api.py HTTP API · cli.py Command line
Components 21
User entry
- Streamlit app
app.py - HTTP API
src/api.py - Command line
src/cli.py
Query agent
- Agent graph
src/agent/graph.py - Decision contracts
src/agent/models.py - Agent prompts
src/agent/prompts.py - Conversation memory
src/agent/memory.py - PII pseudonymization
src/privacy.py - Result warnings
src/agent/notices.py - LLM provider
src/llm.py
Data access
- Business dictionary
src/semantic/dictionary.py - SQL tools
src/db/tools.py - SQLite database
data/anexo_desafio_1.db
Results and UI
- Result presentation
src/ui/view.py - Query visualization
src/ui/query_graph.py - Data visualization
src/ui/data_graph.py
Evaluation and tracing
- Evaluation runner
src/evaluation.py - Local tracing
src/observability.py - LangFuse bridge
src/langfuse_bridge.py
Other components
- User
- Google Gemini
Connections 22
- User → Streamlit app: asks via
README.md - User → HTTP API: asks via
README.md - User → Command line: asks via
README.md - Streamlit app → Agent graph: invokes
app.py - HTTP API → Agent graph: invokes
src/api.py - Command line → Agent graph: invokes
src/cli.py - Agent graph → Decision contracts: uses decisions
src/agent/graph.py - Agent graph → Agent prompts: uses prompts
src/agent/graph.py - Agent graph → Conversation memory: reads and stores turns
src/agent/graph.py - Agent graph → PII pseudonymization: masks model data
src/agent/graph.py - Agent graph → Business dictionary: loads context
src/agent/graph.py - Agent graph → SQL tools: executes queries
src/agent/graph.py - Agent graph → LLM provider: requests decisions
src/agent/graph.py - SQL tools → SQLite database: reads
src/db/tools.py - LLM provider → Google Gemini: calls provider
src/llm.py - Agent graph → Result warnings: computes warnings
src/agent/graph.py - Streamlit app → Result presentation: renders results
app.py - Streamlit app → Query visualization: shows query graph
app.py - Streamlit app → Data visualization: shows data graph
app.py - Evaluation runner → Agent graph: evaluates answers
src/evaluation.py - Agent graph → Local tracing: writes traces
src/agent/graph.py - Agent graph → LangFuse bridge: sends traces