Deepak Vaid836 downloadsAI-powered chat with multi-device relay, agentic tools, and collaborative conversation.
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 | 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 |
| 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 |
Chat Lab AI adds a persistent chat panel to Obsidian with multi-agent conversations, vault-aware context, and structured tools for working with notes.
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.
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.
@mention Notes — Reference any note in chat.![[...]] embeds resolved recursively up to depth 2.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.
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.
Ask about recent events or facts beyond the model's training data:
search_past_sessions tool finds earlier conversations by topic, keyword, or content.Sync chat sessions through WebDAV storage for cross-device access and backup. Start a manual sync with Sync Now in Settings.
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.
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.
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.
Stay current without manual downloads:
main branchRequires Obsidian 1.11.4 or newer.
main.js, styles.css, and manifest.json.obsidian/plugins/chat-lab/Click the 💬 icon in the left ribbon (or run "Open Chat Lab AI sidebar" from the Command Palette).
Open Settings → Chat Lab: Obsidian AI → Provider Profiles.
Click Add Profile, choose your provider, and enter:
@AgentName to route a message to a specific agentWhen the AI generates content you want to keep:
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 noteAsk the AI to manage your vault directly:
"Summarize my
[[Project Notes]]and create a draft inDrafts/"
The AI will:
Project Notes via read_notecreate_note — pending your approval (unless Auto-Apply is on)Open Settings → Web Search. Choose a provider (DuckDuckGo works without setup). Now you can ask:
"What happened in quantum gravity research this week?"
Chat Lab: Obsidian AI works on mobile (iOS/Android), but there are platform-specific behaviors to be aware of:
When the Obsidian app is moved to the background, the operating system suspends its webview to preserve battery. This means:
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.
The chat interface adapts to smaller screens:
# 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
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
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
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.
Licensed under the GPL-3.0 license.
Made with ❤️ for the Obsidian community