Skip to main content
BoardPulse AI is built around a single idea: executives and analysts should be able to ask questions in plain language and get answers they can act on. You type a question, and the system translates it into a verified SQL query, runs it against your live database, and returns a structured response — including a professional summary, a data table, an optional chart, and downloadable files.

How it works

Each question you send moves through a five-stage LangGraph pipeline that handles everything from loading your workspace schema to composing the final answer.
1

load_context

BoardPulse loads your workspace configuration — the approved table list, source database dialect, and any workspace-level settings. This context shapes every subsequent step.
2

draft_query

Your message is sent to the configured AI provider (cloud, local, or mock) along with the workspace schema. The model returns a SQL draft and an executive summary in the answer field.
3

validate_query

The drafted SQL passes through the SQL guardrail layer. Only SELECT statements against your approved tables are allowed. Any forbidden operation raises an HTTP 422 before execution.
4

execute_query

The validated query runs against your source database in read-only mode. Results are wrapped with a safety LIMIT, then converted into a table, chart, and export files.
5

finalize_response

The executive summary and any pipeline warnings are merged into the final answer. The complete ChatResponse is returned to the caller.

Request schema

Send a POST to /api/v1/chat/query with a JSON body matching ChatRequest:

Provider options

cloud

Routes to an OpenAI-compatible API (e.g., GPT-4.1-mini). Requires OPENAI_API_KEY.

local

Routes to a local Ollama instance. Requires OLLAMA_ENABLED=true and a running model.

hybrid

Prefers local if Ollama is available, falls back to cloud. Good default for production.

mock

Returns deterministic responses without calling any AI model. Use for testing and CI.

Response schema

A successful query returns a ChatResponse object:

Example

Request

Response

Tips

Set include_sql: true (the default) to receive both the sql field (the generated and validated query) and executed_sql (the exact query that ran with any injected LIMIT). These are useful for audits, debugging, and building trust in the AI’s output.
The executed_sql field always reflects what actually ran against the database, including safety limits applied by the system. Use this field — not sql — for compliance logging.