by Deepak Vaid
AI-powered chat with multi-device relay, agentic tools, and collaborative conversation.
Chat Lab AI
GitHub ยท Report Bug ยท Discussions
๐ค Multi-Agent AI Chat for Obsidian
A persistent chat panel where you can work with one or several AI profiles in a shared conversation. Agents can use selected vault context and tools; connect providers with API keys or supported account sign-in.
โจ Feature Highlights
Core features
| Feature | What It Does |
|---|---|
| Multi-Agent Chat | Select multiple AI profiles to participate in one conversation |
| Agentic Vault Tools | Ask agents to read, search, create, and edit vault notes |
| Vault-Aware Context | Include notes, folders, tags, the active note, and expanded embeds |
| Dataview Queries | Run optional, read-only DQL queries when Dataview is available |
| Model Providers | OpenAI, Codex, Anthropic, Google, DeepSeek, Kimi, Ollama, OpenRouter, Azure, and custom endpoints |
| Web Search | DuckDuckGo, Brave, Tavily, Exa, and SearXNG |
| Session History & Search | Save and restore conversations; agents can search past sessions by topic, keyword, or content |
| Session Tags | Tag saved chats, filter History, organize the vocabulary, and optionally generate tag suggestions |
| Remote Sync | Sync chat sessions across devices through WebDAV storage |
| Agent Introspection | Let agents report the plugin version and currently available capabilities |
| Token Usage & Statistics | Track context usage and review token totals, model usage, and response statistics |
Additional features
| Feature | What It Does |
|---|---|
| Chat Note Editing | Review AI-generated note changes in a visual diff before applying them |
| Agent Prompt | Edit the shared base prompt or inspect and copy the latest generated system prompt |
| Mobile Layout | Responsive chat controls for phone and tablet screens |
| Auto-Updater | Check and install stable or development releases |
โจ What It Does
Chat Lab AI adds a persistent chat panel to Obsidian with multi-agent conversations, vault-aware context, and structured tools for working with notes.
๐ Core Features
Multi-Agent Chat
Select one or several AI profiles to participate in a chat. Each selected agent receives the shared conversation and can respond. Use @AgentName to route a request to a specific agent.
Agentic Vault Tools
Agents can use structured tools to read, search, create, and update vault content. A few representative tools:
| Tool | What It Does |
|---|---|
read_note | Read a note's full content |
search_notes, search_note_content | Find notes by name or path, or search within note text |
create_note, edit_note, patch_note | Create notes or update existing content |
query_dataview | Run read-only DQL queries when Dataview is available |
read_pdf | Extract text from a PDF URL or vault file |
Approval Flow: Read-only tools run directly. Vault-changing tools require approval by default; Auto-Apply can skip approval for supported workflows.
Smart Results: Tool outputs are formatted as markdown tables and lists before the AI sees them โ no raw JSON dumps in your chat.
Vault-Aware Context
@mentionNotes โ Reference any note in chat.- Folder & Tag Context โ Attach folders or tags (returns file listings, not full contents โ no token bloat).
- Active Note โ Include the note you're currently editing.
- Embed Expansion โ
![[...]]embeds resolved recursively up to depth 2.
Dataview Queries (Optional)
When the Dataview plugin exposes its query API, the agent can run read-only Dataview Query Language (DQL) queries against your vault. Queries and returned output are bounded. DataviewJS is not executed.
Model Providers
Connect supported providers using API keys or account sign-in. Available providers include OpenAI, Codex, Anthropic, Google Gemini, DeepSeek, Kimi, Ollama, OpenRouter, Azure OpenAI, and custom OpenAI-compatible endpoints. Model availability depends on the provider and account.
- Per-Provider Profiles โ Save multiple configurations and switch between them.
- Model Discovery โ Fetch available models from your provider automatically.
- Mid-Session Switching โ Change profile without starting a new chat.
Web Search
Ask about recent events or facts beyond the model's training data:
- 5 Providers: DuckDuckGo (free), Brave Search API, Tavily, Exa, SearXNG (self-hosted).
- No extra setup for DuckDuckGo โ works immediately.
- API keys for Brave, Tavily, Exa entered in Settings.
Session History & Search
- Session History โ Save and restore conversations across Obsidian restarts; archive and rename past chats.
- Session Tags โ Tag saved chats, filter History by tag, and normalize the tag vocabulary in Settings. Optional tag suggestions are off by default.
- Past Session Search โ The
search_past_sessionstool finds earlier conversations by topic, keyword, or content.
Remote Sync
Sync chat sessions through WebDAV storage for cross-device access and backup. Start a manual sync with Sync Now in Settings.
Agent Introspection
The get_plugin_info tool lets agents inspect the plugin's name, version, creator, and currently available capabilities, then answer questions about what they can do.
Token Usage & Statistics
- Context Usage โ See a visual indicator of the current context budget in chat.
- Usage Statistics โ Review input and output token totals, usage by model, completed responses, and average response time in Diagnostics. Provider-reported usage is used when available; otherwise, the plugin shows estimates.
Streaming & Quality-of-Life
- Streaming Responses โ See generated text as it arrives; behavior varies by provider. Codex mobile responses appear after the request completes.
- Abort โ Cancel streaming mid-generation.
- Retry โ Regenerate a response with one click.
โจ Additional Features
In Progress: Multi-User Chat
The optional WebSocket relay lets Chat Lab users on different devices join shared conversations. This feature is in progress and still needs full testing. You can run the relay on your own machine or server.
See Multi-User Chat Design for architecture details.
Review Note Changes from Chat
Use Apply โ Note to preview AI-generated changes in the active note. Review the additions and removals, then run Accept AI note edit or Discard AI note edit from Obsidian's command palette.
For the complete, implementation-independent capability and behavior map of the chat component, see the Chat Component Capability Map.
Auto-Updater (v1.2.5+)
Stay current without manual downloads:
- Automatic Update Checks โ Plugin checks for new releases on startup (configurable interval)
- One-Click Update โ Notification shows latest version, commit message, and author; click to update
- Stable / Dev Channels โ Switch between release builds and latest
mainbranch - Manual Check โ Button in Settings to check immediately
Debug & Diagnostics
- Diagnostics Panel โ Memory usage, DOM nodes, chat sessions, total messages.
- Data Health Check โ In Settings โ Advanced controls โ Diagnostics, run a read-only check of plugin assets, settings, session files, and saved AI memory. Review file-specific findings and export a report. No automatic repairs; oversized files and scan limits are reported.
- File-Based Logger โ Debug logs written to disk for troubleshooting.
- Error Boundary โ Catches React render crashes, shows fallback UI.
- Build Info in Settings โ Version badge, git commit hash, and branch name visible in Settings hero.
๐ฆ Installation
Requires Obsidian 1.11.4 or newer.
From Community Plugins (Recommended)
- In Obsidian, open Settings โ Community plugins โ Browse.
- Search for Chat Lab AI and select Install.
- Enable Chat Lab AI in Settings โ Community plugins.
Manual Installation
- Download the latest release from GitHub Releases
- Extract
main.js,styles.css, andmanifest.json - Copy them to your vault:
.obsidian/plugins/chat-lab/ - Enable in Settings โ Community plugins.
โก Quick Start
1. Open the Chat Panel
Click the ๐ฌ icon in the left ribbon (or run "Open Chat Lab AI sidebar" from the Command Palette).
2. Configure Your Provider
Open Settings โ Chat Lab: Obsidian AI โ Provider Profiles.
Click Add Profile, choose your provider, and enter:
- API Key (if required)
- Model โ type a name or click Fetch Models to discover
- Custom URL (for OpenAI-compatible or other custom endpoints)
3. Chat with AI Agents
- Select which AI profiles participate via the ๐ฅ participant button
- Type a message โ all selected agents see it and can respond
- Use
@AgentNameto route a message to a specific agent - Toggle Zen Mode (๐ง) to hide all chrome
4. Edit Notes from Chat
When the AI generates content you want to keep:
- Click Apply โ Note to diff-merge the response into the active note
- Click Create Note to save it as a new file
- Click Append โ Note to add it to the end of an existing file
Or use slash commands in your message:
/create [[Note Name]]โ create a new note/edit [[Note Name]]โ overwrite an existing note/append [[Note Name]]โ append to an existing note
5. Agentic Tools
Ask the AI to manage your vault directly:
"Summarize my
[[Project Notes]]and create a draft inDrafts/"
The AI will:
- Read
Project Notesviaread_note - Generate a summary
- Create the draft via
create_noteโ pending your approval (unless Auto-Apply is on)
6. Web Search (Optional)
Open Settings โ Web Search. Choose a provider (DuckDuckGo works without setup). Now you can ask:
"What happened in quantum gravity research this week?"
๐ฑ Mobile Notes
Chat Lab: Obsidian AI works on mobile (iOS/Android), but there are platform-specific behaviors to be aware of:
Background Execution
When the Obsidian app is moved to the background, the operating system suspends its webview to preserve battery. This means:
- LLM streams pause โ Any in-progress response stops streaming and may fail
- Tool calls abort โ Pending vault operations (create, edit, move) will not complete
- Network requests cancel โ Any API calls in flight will be interrupted
- Timers freeze โ JavaScript intervals and timeouts stop
What persists: Your chat history, session state, and context items are saved to local storage aggressively. When you return to the app, the conversation resumes exactly where you left it.
Recommendation: For long-running operations (large document analysis, multi-step tool workflows), keep the Obsidian app in the foreground. Use the Abort button if you need to pause mid-stream.
Mobile-Responsive UI
The chat interface adapts to smaller screens:
- Horizontal scrolling for the action bar on narrow viewports
- Auto-expanding textarea for the input field
- Compact icon buttons to maximize message space
- Zen mode (hide all chrome) via the header toggle
๐ ๏ธ Development
# Clone
git clone https://github.com/space-cadet/obsidian-ai.git
cd obsidian-ai
# Install
pnpm install
# Dev build with hot reload
pnpm run dev
# Production build
pnpm run build
# Package release artifacts
pnpm run package
# Start the relay server
pnpm run relay
Project Structure
src/
โโโ agent/ # Agent orchestration, tools, and execution
โโโ api/ # Provider APIs, streaming, and response history
โโโ auth/ # Codex login and compatibility support
โโโ components/ # React chat interface
โโโ context/ # Vault context, attachments, and token budgeting
โโโ data/ # Plugin data management
โโโ hooks/ # Chat, session, context, and settings hooks
โโโ host/ # Obsidian and fixture chat hosts
โโโ integrations/ # Provider registry
โโโ intelligence/ # Memory, session summaries, and persona
โโโ lib/ # Shared helpers, prompts, and usage statistics
โโโ lifecycle/ # Persistence and plugin sync lifecycle
โโโ modals/ # Login, migration, and sync dialogs
โโโ modules/ # Editor extensions and commands
โโโ noteEditing/ # Apply, append, and create note editing bridge
โโโ preview/ # Standalone chat UI preview
โโโ search/ # Saved-session search
โโโ settings-sections/ # Plugin settings UI
โโโ storage/ # Chat and session storage
โโโ sync/ # WebDAV storage and WebSocket relay sync
โโโ ui/ # UI registration and events
โโโ updater/ # Plugin update support
โโโ utils/ # PDF extraction and export helpers
โโโ views/ # Obsidian chat view
โโโ api.ts # Public chat/provider API
โโโ default_prompts.ts # Built-in system prompts
โโโ logger.ts # File-based logging
โโโ main.ts # Plugin entry point
โโโ settings.ts # Plugin settings and defaults
โโโ types.ts # Shared data types
โโโ version-info.ts # Generated build metadata
relay/
โโโ relay-server.js # Relay server used by `pnpm run relay`
โโโ server.js # Presence-aware WebSocket relay server
โโโ package.json # Relay package metadata and scripts
๐ค Contributing
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
- Bug Reports: Open an issue
- Feature Requests: Start a discussion
- Showcase: Share your workflows in Discussions โ Showcase
Acknowledgments
This plugin was originally forked from FBarrca/obsidian-inlineAI and has been significantly extended with chat, context, agentic tools, and multi-user/agent collaborative features.
Inspired by Logan Yang's excellent Obsidian Copilot plugin.
License
Licensed under the GPL-3.0 license.
Made with โค๏ธ for the Obsidian community
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.