AI in BlnkSpace
BlnkSpace has a fully integrated AI layer that can read, write, restructure, and extend your documents. It works through three surfaces — a persistent chat panel, a floating inline prompt on any block, and quick AI actions in the selection toolbar — all powered by your own API key with no usage markup.
How it works
All AI features in BlnkSpace run through your own provider API key. You paste it once in Settings, it's encrypted with AES-256 and stored server-side, and from that point every AI request is billed directly to your provider account — BlnkSpace never sees the key again and never adds a usage markup.
The AI has full read access to your document at all times — every block, its type, content, and metadata are serialized and sent as context. When the AI makes edits, it calls structured tools that modify your document in real time through the same block event system used by the editor. You see changes appear live, word by word.
Three AI surfaces
| Surface | How to open | Best for |
|---|---|---|
| AI Panel | Sparkles icon in the top toolbar, or ⌘⇧A | Conversations, multi-block edits, document restructuring, agents, memory. |
| Inline prompt | Click ✦ on any block, or type / → AI, or press Space on an empty block | Quick rewrites, continuations, and insertions scoped to one block. |
| Selection toolbar | Select text or multiple blocks | Improve writing, make shorter, expand, fix grammar, simplify, make formal. |
AI Panel
The AI Panel is a persistent sidebar that gives the AI full context of your document and the ability to make any kind of edit. It supports multi-turn conversations, persistent memory, document attachments, and a complete history of past conversations.
Conversations
Each document maintains its own conversation history. You can start a new conversation at any time from the panel header — the previous conversation is saved and accessible from the History view. Conversations are stored server-side and persist across sessions. Each one is auto-titled from your first message and can be renamed or deleted.
Document attachments
You can attach up to 3 other documents from your workspace to the conversation. The AI receives the full block content of attached documents alongside the current one, letting you ask questions across documents, copy structure from one to another, or compare content. Attachments are shown as chips above the input and can be removed at any time.
Memory
The AI can remember facts about a document across conversations. When it learns something relevant — a preference, a project constraint, a recurring pattern — it stores it as a key-value memory entry scoped to that document and user. Memories are injected into the system prompt at the start of every new conversation, so the AI picks up context without you having to re-explain it.
AI tools (what the AI can do)
The AI communicates with your document through a structured set of tools. Every visible edit is the result of a tool call — there is no hidden mutation path. Tool calls appear as labeled chips in the AI's response so you can see exactly what it did.
Block editing tools
| Tool | Description |
|---|---|
| insert_block | Inserts one or more blocks after a specified block ID. Supports all insertable block types including headings, lists, callouts, code, toggles, sections, hero, and carousel shells. |
| update_block | Replaces the content of a single existing block. Does not affect metadata or block type. |
| update_block_metadata | Patches the metadata of a block (image alt text, embed URL, font settings, section background, etc.). Array fields like heroElements and slides are merged by element ID rather than replaced wholesale. |
| delete_block | Deletes a block by ID. |
| change_block_type | Converts an existing block to a different type (e.g. paragraph → callout, heading1 → heading2). |
| bulk_edit | Batches multiple update, delete, insert, and change_type operations into a single tool call. Always preferred over sequential single-block calls when touching 2+ blocks. |
| replace_range | Replaces a contiguous range of blocks (from startId to endId) with a new set of blocks. |
| replace_all_blocks | Atomically replaces the entire document. Only used for version restoration — not for normal edits. |
| update_hero_asset | Edits hero block content: elements, background, colors, text effects. Hero blocks are asset-backed and require this tool — not update_block_metadata. |
| update_carousel_asset | Edits carousel block slides, background, and styling. Same asset-backed pattern as hero. |
Utility tools
| Tool | Description |
|---|---|
| propose_plan | Before making large or destructive changes, the AI presents a plan — a summary, a list of steps, and an estimated edit count. You must approve before any editing tools are called. |
| create_document | Creates a new document in the workspace with a given title. Can optionally navigate to it after creation. |
| get_version_history | Returns the last 10 saved versions of the document with timestamps and full block data. Used before restore operations. |
| remember | Stores a key-value fact about the document in persistent memory. The AI uses this proactively when it learns something worth retaining across sessions. |
| web_search | Available natively for Claude and Gemini models. Lets the AI look up current information and incorporate it into your document. Not available for OpenAI models. |
bulk_edit when touching more than one block, and to call propose_plan before any change that would require 3 or more tool calls after batching. This keeps edits fast and gives you a checkpoint before large restructuring operations.Plan approval
When the AI determines that an operation is large enough to warrant a checkpoint, it calls propose_plan before executing any edits. This shows you a structured plan card in the chat with a summary, a numbered list of steps, an estimated edit count, and a risk level per step. You can approve to proceed or cancel to abandon the plan.
Inline AI prompt
The inline prompt is a floating popup that appears directly on a block. It is scoped to that block — the AI receives the block's current content plus a serialization of surrounding blocks for context, and the result is streamed back as a pending diff on the block itself.
Quick actions
Four preset quick actions are available as chips in the inline prompt. Each one sends a pre-written prompt with the block's current content substituted in:
Diff review
After the AI generates a response, the result is shown as a pending diff on the block — the original content is struck through and the new content appears alongside it. You can accept to replace the block content, or reject to discard the change and restore the original. The diff is non-destructive until you explicitly accept.
Selection toolbar AI
The floating selection toolbar that appears when you select text or multiple blocks has an AI button that opens a mini panel with quick-action chips and a custom prompt input. This is optimised for quick text transformations.
Six quick actions are available: Improve writing, Make shorter, Expand, Fix grammar, Simplify, and Make formal. Each sends the selected text to the inline AI stream and replaces it with the result. A custom prompt field lets you type any instruction.
Version history and restore
The AI can retrieve the last 10 saved versions of a document and restore any of them. If you ask the AI to undo a change it made, or if you want to go back to an earlier state, the recommended flow is:
Say "Show me the version history" or "Undo that last change." The AI calls get_version_history and lists the available versions with timestamps.
Tell the AI which version you want — by number, description, or approximate time. The AI selects it.
The AI calls replace_all_blocks with the selected version's block array. Your document is atomically restored to that exact state.
AI providers and models
BlnkSpace supports three AI providers. You connect one at a time — switching providers in Settings takes effect immediately for all subsequent AI requests.
| Provider | Models | Notes |
|---|---|---|
| Claude | Sonnet 4 (recommended), Opus 4.5 (most capable), Haiku 4.5 (fastest) | Native web search available. Keys begin with sk-ant-. |
| OpenAI | GPT-4o (recommended), GPT-4o Mini (fastest), o3-mini (reasoning) | Web search not available — switch to Claude or Gemini for search. Keys begin with sk-. |
| Gemini | Gemini 2.0 Flash (recommended), Flash Lite (fastest), 2.5 Pro (most capable) | Native web search available. |
Setting up your API key
Go to your provider's console — Anthropic, OpenAI, or Google AI Studio — and create a new API key.
In BlnkSpace, click your avatar → Settings → AI tab. Select your provider and model from the tabs and dropdown.
Paste the key into the API key field and click Save. The key is validated for correct format before saving.
Open any document and click the Sparkles icon in the toolbar. The AI panel is now active.
Key management
Agents
Agents are persistent AI tasks that run automatically — on a schedule, in response to a trigger, or as a multi-step sequence requiring approvals. They are configured in the AI Panel's Agents tab and operate on the same document context and tool set as the chat AI.
| Agent type | Description |
|---|---|
| Scheduled | Runs a task on a cron schedule — every N minutes, hourly, daily at a specific UTC hour, or weekly on a specific day. Useful for recurring content updates, summaries, or maintenance tasks. |
| Triggered | Fires when a specific condition is met in the document or a connected database (e.g. a status column changes). Lets you automate reactions to document events. |
| Multi-step | A sequential list of steps, each with an action description and an optional approval gate. Steps run one at a time; if a step requires approval, the agent pauses and waits for you to approve or skip before proceeding. |
| Autonomous | Watches the document continuously and applies a set of rules automatically. The most flexible but most powerful agent type — use rules to describe the agent's behaviour and boundaries precisely. |
Agent lifecycle
Known limitations
The following are known rough edges as of the current build. They are being actively worked on and will improve over time.
AI Panel
Inline prompt
Agents
Provider behaviour
replace_all_blocksis a hard reset to a known-good saved state.