Embed and organize AI chat threads in Obsidian
Smart Chat codeblocks keep provider conversations attached to the note they serve. The note stores readable thread references and active or done state, while desktop can render the provider interface directly inside Obsidian.
Availability and supported environments
Provider-specific codeblocks support the documented web chat providers. Smart Chat Pro also provides the universal smart-chat block. Full embedded provider interfaces require Obsidian desktop; mobile preserves saved thread references through the no-webview fallback.
Supported providers

The same note-attached thread workflow is available across the supported provider codeblocks.
Provider-specific codeblocks support:
| Codeblock | Provider |
|---|---|
smart-chatgpt |
ChatGPT, including recognized Codex and Sora links |
smart-claude |
Claude |
smart-gemini |
Gemini |
smart-grok |
Grok |
smart-perplexity |
Perplexity |
smart-deepseek |
DeepSeek |
smart-aistudio |
Google AI Studio |
smart-openwebui |
Open WebUI |
smart-kimi |
Kimi |
Smart Chat Pro also provides the universal smart-chat codeblock for supported providers in one block.
Insert a Smart Chat codeblock
Open the Command Palette and search for the provider name or Smart Chat codeblock action.
Run the insert action from the note that should own the thread. Provider-specific actions insert the matching fence; Pro can also insert the universal smart-chat fence.
Provider-specific and universal blocks
A provider-specific fence keeps one provider identity in the codeblock language. The universal Pro block stores the provider with each thread reference.
Use a provider-specific block for one provider. Use the universal block when one note may track threads from several supported providers.
Can one note track several providers?
Yes. Use several provider-specific blocks or the universal Pro smart-chat block.
Thread storage grammar
Saved state remains readable Markdown:
chat-active:: <unix_seconds> <thread_url>
chat-done:: <unix_seconds> <thread_url>
chat-active::means the thread still needs attention.chat-done::means the thread is complete for now.- The timestamp supports recency displays and Dataview queries.
- The provider URL remains the durable thread reference.
- Text after a valid URL can remain as an annotation.
Select a saved thread
When a block contains several saved threads, use the selector to choose which record the block displays.
The selector shows the provider and active/done state where supported. Selecting a thread does not remove or reorder the Markdown records.
Start a new provider chat

A new provider session remains unsaved until the provider exposes a durable thread URL.
The New chat menu starts an unsaved provider session.
A provider page is saved only after Smart Chat recognizes a durable thread URL. Home pages, temporary routes, and unsupported routes cannot be captured automatically.
Why was a new chat not saved automatically?
The provider has not navigated to a recognized durable thread URL, or the route is unsupported.
Mark done and Mark active

Mark done changes the note-owned thread state while leaving the provider conversation intact.
Use Mark done when the selected thread no longer needs attention.
- The Markdown field changes from
chat-active::tochat-done::. - The provider conversation is not deleted or archived.
- Mark active changes the field back to
chat-active::. - Repeating the current state does not create a duplicate update.
Does marking a thread done change the provider conversation?
No. It changes only the Markdown tracking state in the note.
Build context
Build context opens or reuses thread-specific Smart Context when the integration is available.
Review the selected notes or files before copying or sending that context to the provider.
Open, copy, and refresh
- Open in browser opens the selected provider thread outside the embed.
- Copy link copies its saved thread URL.
- Refresh reloads the current embedded provider page.
These controls do not change active/done state.
Grow and contain
Grow expands the embedded provider surface. Contain returns it to the normal note-width presentation.
This is a display setting; it does not change the thread record.
Build a thread dashboard with Dataview
Because state is stored as inline fields, Dataview can list active and completed thread bookmarks.
```dataview
LIST WITHOUT ID file.link
WHERE chat-active
SORT file.mtime DESC
```
```dataview
LIST WITHOUT ID file.link
WHERE chat-done
SORT file.mtime DESC
```
These queries read note-owned provider bookmarks. They do not list Smart Chat API Extension thread records.
Provider sign-in and browser data
Some providers complete sign-in more reliably through Obsidian Web Viewer.
- Sign in through Web Viewer.
- Return to the codeblock.
- Select Refresh.
For repeated human-verification loops, clear Web Viewer browser data only after confirming that the sign-in can be recreated. Google AI Studio may require saving the conversation before a durable URL exists.
Desktop and mobile behavior
Desktop uses Electron webview support for the full embedded provider interface.
On mobile, saved thread URLs remain useful as bookmarks or external links, but the full provider embed and automatic URL capture are unavailable.
Universal Smart Chat codeblock behavior (Pro)
The universal Pro block adds shared provider selection, stable block identity, managed provider surfaces, and cross-provider controls.
smart-chat codeblock
Smart Chat Pro adds one universal codeblock for supported provider threads.
```smart-chat
chat-id:: 002a41caaf2a4be9
chat-active:: 1767302492 https://chatgpt.com/c/example
chat-done:: 1767132305 https://claude.ai/chat/example
```
chat-id::
chat-id:: <id> gives the rendered block a stable identity. Smart Chat adds it during desktop initialization when it is missing. Do not copy the same ID into another block.
chat-active::
chat-active:: <unix_seconds> <thread_reference> tracks a saved thread that still needs attention. Text after the thread reference is preserved as a trailing annotation.
chat-done::
chat-done:: <unix_seconds> <thread_reference> tracks a completed thread. Marking a thread done changes only the note's tracking state; it does not archive or delete the provider conversation.
Does marking done change the provider conversation?
No. It changes only the Markdown tracking state.
Supported provider types
The universal block supports ChatGPT, Claude, Gemini, AI Studio, DeepSeek, Perplexity, Grok, Kimi, and configured Open WebUI instances. Saved unknown HTTP links can still be opened as generic links, but Smart Chat cannot automatically recognize their new-thread URLs.
New chat menu
Choose a provider from New chat to open an unsaved session. The thread is added to Markdown only after the provider navigates to a recognized durable thread URL.
Why was a new chat not saved?
The provider did not navigate to a recognized durable thread URL, or the page could not be captured.
Saved thread selector
The selector shows saved active and done threads with provider and recency information. When the saved list is large, done threads move into a separate submenu so active work remains easier to reach.
Thread actions
Available actions depend on the selected provider and thread state:
- Mark done or Mark active
- Open in browser
- Copy link
- Refresh
- Build context
- Append clipboard to input on providers that expose that action
Embedded provider surface
A saved provider thread keeps one managed embedded surface per thread and workspace document. When the same thread is already displayed elsewhere, use Show here to move the active surface instead of loading a duplicate session.
Why does the same thread say it is shown elsewhere?
One embedded provider surface is reused for that thread. Choose Show here to move it to the current block.
Web Viewer user-agent
The codeblock menu can copy the user-agent setting from Obsidian Web Viewer to the embedded provider surface. Use it only when a provider requires the same browser identity for sign-in or compatibility.
Obsidian hotkeys inside the provider surface
Supported configured Obsidian modifier hotkeys can pass through the embedded provider page. Editing keys and provider send behavior remain protected so typing in the chat input is not hijacked.
Mobile and no-webview fallback
When embedded webviews are unavailable, the codeblock renders a static bookmark list:
- saved web threads open externally
- native
smart-chat:references display as labels - new-chat capture, automatic URL saving, state actions, and embedded input automation are unavailable
Troubleshooting Smart Chat codeblocks
- A new chat is saved only after the provider creates a recognized durable thread URL.
- Use Refresh and Obsidian Web Viewer sign-in when a provider page stalls.
- Confirm the selected Markdown record when the wrong thread appears.
- Static links on mobile are expected.
- Repair duplicate or missing
chat-id::values before another unsafe block update.