Skip to content

AI-Powered SQL Client

Mako is a SQL client. The AI is how you talk to it.

Instead of manually browsing schemas, writing queries from scratch, and iterating through syntax errors, you describe what you want in plain English. Mako inspects your database, writes the query, tests it against your live data, and places the working result directly in your console editor — ready to run, tweak, or save.

The chat is secondary. The console is the product.

Every interaction follows the same pattern:

  1. You ask a question — “Show me users who signed up last week but haven’t made a purchase”
  2. Mako inspects your schema — discovers tables, columns, types, relationships
  3. Writes and tests the query — executes it against your real database to verify it works
  4. Delivers to your console — the working query appears in your editor via modify_console

You get a brief explanation in chat, but the real output is always a working query in your console.

The console is a full SQL editor — not a chat window with code blocks you copy-paste from. Mako treats it as the primary output:

  • Preserves your work — won’t overwrite a console with valuable content. Creates a new tab instead.
  • Reads before writing — always checks the current console state before modifying
  • Supports patching — for small edits (adding a WHERE clause, fixing a column name), it patches specific lines instead of replacing everything
  • Multiple consoles — each query gets its own tab, organized by topic

Mako auto-detects the database type from your connection and adapts its SQL dialect:

DatabaseDialectNotes
PostgreSQLpostgresqlFull support — arrays, JSON operators, ILIKE
Cloud SQLpostgresqlSame as PostgreSQL
BigQuerybigqueryBacktick identifiers, CAST(), REGEXP_CONTAINS()
MongoDBAggregationPipelines, find(), collection inspection
MySQLmysqlBacktick identifiers, CONVERT()
ClickHouseclickhouseColumnar-optimized queries
RedshiftpostgresqlPostgreSQL wire-compatible
SQLitesqliteIncluding Cloudflare D1

You don’t configure dialects — Mako reads the connection metadata and does the right thing.

Before writing any query, Mako inspects your actual schema. No guessing, no hallucinated column names:

ToolWhat It Does
list_connectionsShows all database connections in the workspace
sql_list_databases / mongo_list_databasesLists databases on a connection
sql_list_tables / mongo_list_collectionsLists tables/collections with row counts
sql_inspect_table / mongo_inspect_collectionGets column types, constraints, and sample data

The agent uses sample data to understand real values — not just types. If your status column contains 'active', 'churned', 'trial', it knows what to filter on.

Mako learns your database over time. When it discovers that your created_at column stores Unix timestamps instead of dates, or that your users table uses uuid instead of id as the primary key, it saves that knowledge:

ToolWhat It Does
read_self_directiveReads learned rules for this workspace
update_self_directiveSaves schema quirks, preferences, conventions

This persists across all conversations. The more you use Mako, the less explaining you need to do.

Beyond the always-on self-directive, Mako supports skills — named, workspace-scoped playbooks that load only when their trigger fires. Good for per-country queries, multi-step procedures, or rare schema gotchas that shouldn’t clutter the always-on memory.

ToolWhat It Does
save_skillCreate or overwrite a named playbook
delete_skillRetract a skill that turned out to be wrong
load_skillExplicitly load a skill mid-turn when the index hints at it
search_skillsFree-text fallback when the auto-injected index misses

Every turn, Mako injects a compact index of every skill plus the top-3 auto-retrieved bodies (entity overlap 0.6 + semantic similarity 0.4). See Skills for the full model, admin UI, and REST API.

Different contexts activate different specialized agents:

Active when you’re working in a console tab. This is the core SQL client experience — schema discovery, query writing, execution, and console delivery.

Active in the flow editor. Helps configure database-to-database sync flows — inspects source and destination schemas, writes extraction queries with template placeholders, and validates before applying.

Active when working on a dashboard. Dashboards combine saved queries (consoles) into interactive visualizations powered by in-browser DuckDB and Vega-Lite charts.

Key capabilities:

  • Data sources — create dashboard-local query definitions materialized into a local DuckDB instance
  • Widgets — charts (Vega-Lite), KPI cards, and data tables that query the local data
  • Cross-filtering — clicking a bar or slice in one chart filters all other charts automatically
  • Global filters — dashboard-level date range pickers, dropdowns, and search fields
  • Debugging & Guardrails — enforces cross-filter diagnosis and source-query edit safety, verifying causes before modifying charts or retrying broken SQL edits.
  • Multi-dashboard — multiple dashboards can be open simultaneously, each with its own isolated DuckDB instance

The agent handles edit-mode locking, so concurrent users cannot conflict.

Mako routes all AI requests through the Vercel AI Gateway, which provides access to 180+ models across Anthropic, OpenAI, Google, DeepSeek, and others. Only AI_GATEWAY_API_KEY is required — no individual provider API keys needed.

Models are discovered dynamically at runtime by merging the Gateway model catalog with arena.ai code leaderboard ELO scores. The catalog refreshes hourly.

When billing is enabled, models are split into two tiers:

TierCriteriaExamples
FreeBlended cost ≤ $3 / 1M tokensGPT-4o Mini, Gemini 2.5 Flash, DeepSeek Chat
ProAll other modelsClaude Sonnet 4, GPT-4o, Gemini 2.5 Pro

The top 3 free-tier models are auto-selected by ELO ranking. Free users are gated to free-tier models. Pro users can access all models.

When billing is disabled (self-hosted default), all models are available to all users.

Models tagged with reasoning in the Gateway catalog automatically enable extended thinking. Budget tokens are set to 10,000 by default.

Users pick their preferred model in the chat UI. The model is persisted per-user in workspace settings. If a user’s saved model becomes unavailable (e.g. billing downgrade), Mako falls back to the best available model for their plan.

  • SELECT queries are auto-limited to 500 rows unless you explicitly override
  • Queries are tested before delivery — you get working SQL, not best-effort guesses
  • Write operations require explicit user intent