From question to answer in seconds

Every step is designed around one principle: your data never leaves your infrastructure, and you stay in control at every stage.

01

You connect your database

The connection form asks for your database host, port, username, password, and database name. Standard fields — the same thing you'd put in any DB client.

PostgreSQL MySQL MariaDB SQL Server ClickHouse Databricks Redshift
Credentials are encrypted with a server-side key before being stored. They are never held in plaintext.
Ottoch connects to your database server. Your database server is never exposed to Ottoch servers — it connects from the machine running the Docker image.
Connection is tested on save. You get an immediate pass/fail.
Enterprise edition supports LDAP / Active Directory — users are created automatically on first login with configurable default roles.
We never read, store, or transmit your actual row data.
02

You select which tables to expose

After connecting, you activate the specific tables you want the AI to be able to query. Ottoch reads the schema (column names and types) of those tables only.

Only activated tables are included in the AI prompt. Tables you don't activate are completely invisible to the model.
Schema metadata (table name, column names, types) is what gets sent — not your row data.
You can activate or deactivate tables at any time. The change takes effect immediately.
No table data, no row samples, no foreign key data is ever sent to the AI. Schema names only.
03

You bring your AI key

Ottoch does not have a built-in AI model. You supply an API key for the provider of your choice. Your key goes on your server and is used directly from there.

OpenAI Anthropic Google Gemini Any OpenAI-compatible API
Keys are encrypted at rest. Only your instance can decrypt them.
AI costs go directly to your provider account. Ottoch never handles billing for AI usage.
You can switch models or providers at any time from the LLM settings screen.

Get a key at platform.openai.com, console.anthropic.com, or aistudio.google.com.

04

You ask a question

Type your question in the chat interface — just like you'd ask a colleague. Ottoch builds a structured prompt containing your schema and sends it to your AI provider.

Which products had the most returns in Q4?
The prompt includes your active table schema so the model writes accurate, relevant SQL for your actual tables.
Questions are saved to named sessions so you can review or re-run them later.
05

We validate the SQL

The AI returns a SQL query. Before it ever touches your database, Ottoch parses it and verifies it is a pure SELECT statement. This check runs in code — it does not rely on the AI getting it right.

Any query that contains INSERT, UPDATE, DELETE, DROP, or any write operation is rejected immediately with an error — it never executes.
If the AI returns malformed or unparseable SQL, the error is fed back to the model and it retries — up to 3 times.
After 3 failed attempts, Ottoch reports the failure clearly rather than guessing or returning a partial result.
We never execute a query we haven't validated. Trust but verify.
06

You get a plain English answer

The validated SQL runs on your database. The result rows are passed back to the AI with the original question. The model translates the data into a plain English sentence and shows you the SQL and execution time alongside it.

SELECT p.name, COUNT(*) AS return_count
FROM returns r JOIN products p ON r.product_id = p.id
WHERE r.created_at >= '2024-10-01' AND r.created_at < '2025-01-01'
GROUP BY p.name ORDER BY return_count DESC LIMIT 10;
The top returned product was "Wireless Headset Pro" with 214 returns, followed by "USB-C Hub" (187) and "Laptop Stand" (143). All three are accessories.
Ran in 0.08s · 10 rows returned

What we never do

The security model only works if the boundaries are real. Here are the hard limits.

Never read your row data directly

Ottoch only reads schema metadata (table and column names). It never scans, exports, or indexes your actual row data.

Never persist query results

Query results are shown to you and discarded. They are not written to Ottoch's database, not sent to any third party, not logged.

Never allow write operations

The SQL validation layer rejects any non-SELECT statement before execution. INSERT, UPDATE, DELETE, DROP — all rejected in code, not by AI judgment.

Never phone home

Ottoch is self-hosted. There are no analytics, no telemetry, no license check servers. The only outbound calls are to your chosen AI provider.

Never store your AI key in plaintext

API keys are encrypted with a server-side secret before being written to the database. They cannot be read back in plaintext by anyone — including us.

Never touch tables you didn't activate

The AI only receives schema for tables you explicitly activated. Inactive tables are never included in prompts and never queried.

Ready to try it?

One Docker command and you're querying in minutes.

Try live demo → Deploy free