SQLAgent 2.11.09 — Meet the Agent
The AI Assistant grew up. Meet the Agent.
One persistent panel on every page. A reasoning pipeline that finally surfaces what the model is thinking. SQL blocks with Insert / Run / Copy buttons that route to the editor from anywhere. And strict guardrails that keep it focused on databases — politely refusing the rest.
Today's release is the largest single change to the in-app AI surface since we shipped it. The legacy "AI Assistant" panel that lived inside the SQL page is gone. In its place, a single canonical Agent reaches every page — database picker, table list, row browser, SQL editor — and survives navigation without losing your conversation, your scroll position, or your mid-stream response.
What's new at a glance
One canonical Agent
Right-edge side panel, persistent across every page. Toolbar pill on the SQL editor toggles it. ⌘I shortcut preserved. The legacy in-page assistant is gone.
Thinking pill + brain toggle
Reasoning models (Kimi, GLM, Hermes-4 hybrid) now stream their chain-of-thought into a collapsible "Thinking · 12s" card. Auto-collapses 2 s after the answer starts. Toggleable per-conversation via a brain icon in the composer.
Insert / Run / Copy on every SQL block
Generated SQL renders with the editor's syntax-highlighting palette. Run from anywhere — the app navigates to the SQL editor and executes in one click.
Floating "Ask a question" pill
When the panel is collapsed, an ultra-thin-material composer hovers at the bottom. Type, press Enter, the panel expands and the message sends — one gesture from idle to streaming.
Prompts as markdown files
System prompts moved to SQLAgent/Prompts/*.md — guardrails, schema/dialect intro, dialect rules (MySQL family, PostgreSQL family, SQLite + D1), answer format, optional thinking-mode activator. Editing is a markdown PR, not a Swift change.
Strict whitelist guardrails
The Agent answers databases / SQL / software-engineering questions and politely deflects everything else. No more drifting into recipes, history, or homework.
The Thinking pill, in one screen
Some models on the Nous Portal gateway (and elsewhere) emit their tokens in a separate delta.reasoning field while shipping an empty delta.content on every chunk. Our parser used to drop those entirely — leading to long silent pauses for "reasoning" models and zero visible output. Two fixes landed:
- Typed stream tokens —
LLMClientnow yields aStreamTokenenum (.contentor.reasoning) instead of a plainString. Both the OpenAI-compatible client and the Anthropic client tag tokens correctly so the UI can route them to different surfaces. - The pill — a small collapsible card above the answer. While reasoning is streaming, the brain glyph animates and a live duration ticks ("Thinking · 1s · 2s · 3s …"). The moment the first content token arrives, a 2-second grace period kicks off and the pill folds itself away. For settled messages, the pill is collapsed by default — one click expands it whenever you want to re-read the chain of thought.
SQL blocks that act
The legacy in-page assistant had Insert / Run buttons; the new side-panel Agent didn't. Now it does — and the buttons work from any page, not just the SQL editor. Click Run on a generated SELECT while you're on the row browser, and the app navigates to the SQL editor, pastes the query, and executes it. One click. No copy/paste.
The SQL itself renders with the same syntax-highlighting palette as the editor — accent-bold keywords, cyan backtick identifiers, orange string literals, purple numbers, pink functions:
FROM `wp_posts` p
LEFT JOIN `wp_comments` c ON p.ID = c.comment_post_ID
WHERE p.post_status = 'publish'
GROUP BY p.ID
ORDER BY comments DESC
LIMIT 10;
Strict guardrails
The Agent's system prompt is now a strict whitelist. Allowed: databases, SQL of any dialect, software engineering, computer science, programming. Refused: everything else — math homework, recipes, history, opinions, creative writing, persona requests. The deflection is a fixed template that points the user to a general-purpose LLM (ChatGPT, Claude, Gemini) for off-topic asks. Polite, brief, doesn't engage.
The same prompt also caps verbosity hard: one question gets one focused answer + at most one SQL block. No essays. No "here are 12 things to consider." If you ever miss the chatty version, that's the brain icon's job — flip thinking mode on and the reasoning model will happily ramble in the pill instead of the bubble.
Behind the scenes
This release also ships a few foundations that don't show up in the UI but matter for what comes next:
- Prompts as data, not code. Five markdown files under
SQLAgent/Prompts/compose the system prompt at runtime via a newPromptBuilder. Each connection's dialect picks its own file (MySQL family, PostgreSQL family, SQLite + Cloudflare D1). The build script copies the folder into the app bundle on every build. - Dual-buffer streaming. Content and reasoning tokens accumulate in separate buffers but flush on the same 16 ms tick, so the pill and the answer never desync.
- URL hardening across all OpenAI-compatible providers (Nous Portal, OpenRouter, OpenAI, xAI, Ollama) — trim whitespace, strip trailing slashes, validate scheme + host before any network call. The opaque
NSURLErrorBadURL (-1000)errors that used to come from pasted-with-newline keys are gone.
What's next
The next release line, release/08-Real-Small-Agent, leans further into intent: database fingerprinting on connect (recognize WordPress, Magento, Laravel, Django, generic e-commerce, GPS/IoT, SaaS…), capability-driven suggestion chips, and contextual greetings. The PRPs are written; the build is starting. We'll write again when it ships.
Update with the in-app updater, or grab a fresh download from the downloads page. The changelog for every version since the SQLAgent rename lives in RELEASE.md at the repo root.