Documentation
Keisen AI
Keisen AI helps you write, explain, and optimize SQL using natural language. Press ⌘ L (macOS) or Ctrl+L (Windows/Linux) to open the AI panel.
What it can do
- Generate SQL — describe what you need in plain English (or any language) and get production-ready SQL
- Explain queries — paste a query and ask for an explanation of what it does
- Optimize queries — ask for performance suggestions, index recommendations, or rewrites
- Debug errors — share an error message and get help fixing it
Context-aware
Keisen AI automatically includes your schema context — tables, columns, types, and relationships — so generated queries always match your actual database structure. You don't need to describe your schema manually.
No setup required
AI is built in — no API keys to configure, no external accounts needed. It's included in your Base and Pro subscriptions.
Token limits
AI usage is tracked per billing cycle:
| Plan | AI queries / month |
|---|---|
| Lite | No AI |
| Base | 500 |
| Pro | 2,500 |
Token counts reset at the start of each billing cycle. When your quota is reached, the AI panel shows a limit message. Unused tokens do not carry over.
Chat history
AI conversations are saved per project and per tab. You can scroll back through previous messages, copy generated SQL, and insert it directly into the editor. Chat history is preserved even if your token quota runs out.
Tips
- Be specific: "Show me the top 10 customers by total order amount in the last 30 days" works better than "get customers"
- Mention table names when possible — the AI uses them to provide more accurate results
- Use follow-up messages to refine queries: "now add a WHERE clause for status = 'active'"
- You can ask questions in any language — the AI responds in the same language