vault searcher
pendingby Sabig
Strong Thai language support. An AI-powered search assistant that lets you chat with your notes and automate vault operations.
π€ AI Chat & Agent for Obsidian
An intelligent AI-powered Obsidian plugin that brings smart search, agentic capabilities, and function calling to your vault. Chat with Claude, GPT-4, or Gemini to search, analyze, create, and manage your notesβall without leaving Obsidian.
Languages: English Β· πΉπ Thai
β¨ Features
π¬ AI Chat View
- Dedicated chat sidebar powered by OpenRouter API
- Support for multiple AI models (Claude 3.5 Sonnet, GPT-4, Gemini Pro, etc.)
- Context-aware conversations with your vault
- Real-time message rendering with markdown support
π Vault Search Agent
- Semantic & full-text search of your notes
- AI automatically searches and includes relevant context
- Answers questions based on YOUR vault content
- Shows source notes for transparency
- Configurable max search results
π€ Function Calling / Agentic Mode
AI can autonomously:
- π Read notes - "Read my project notes"
- π Create files - "Create a meeting notes template"
- βοΈ Edit files - "Add a new task to my TODO"
- π Manage folders - "Create a Projects folder"
- π Browse vault - "List all files in the Archives folder"
Multi-turn interactions with tool use loops for complex tasks.
π In-Note AI Queries
Write inline AI queries directly in your notes:
`β`β`ai-chat
Summarize this note in 3 bullet points
`β`β`
Then use the "Ask AI in Note" command to get instant answers.
ποΈ Smart Toggles
- π Search Toggle: Enable/disable vault search for context
- π€ Agent Toggle: Enable/disable file operations
- Use both or separately depending on your needs
π Quick Start
Installation
From Community Plugins (Recommended)
- Open Obsidian β Settings β Community Plugins
- Turn off Safe Mode
- Click Browse, search for "AI Chat & Agent"
- Install and enable
Manual Installation
- Download latest
main.js,manifest.json,styles.cssfrom releases - Create folder:
.obsidian/plugins/vault-agent-search/ - Copy files into that folder
- Restart Obsidian & enable in Community Plugins
Setup (2 minutes)
-
Get API Key
- Visit OpenRouter.ai
- Sign up (free tier available)
- Create an API key from the dashboard
-
Configure Plugin
- Obsidian Settings β Community Plugins β AI Chat & Agent
- Paste API key in OpenRouter API Key field
- (Optional) Change model if desired
- Save and close
-
Start Using
- Click the π¬ icon in left sidebar (or Ctrl+P β "Open Chat View")
- Start chatting!
π‘ Usage Examples
Search Your Notes
"What have I written about productivity systems?"
β AI searches vault, finds relevant notes, answers from YOUR content
Create & Organize
"Create a folder structure for my new project with folders for
Research, Planning, and Execution"
β Agent creates folders and provides confirmation
Edit & Update
"Add the following points to my GOALS note:
- Learn TypeScript
- Complete Obsidian plugin
- Review architecture"
β Agent appends content to your note
Ask In-Note
Place your cursor in this block and run "Ask AI in Note" command:
`β`β`ai-chat
How can I improve this paragraph?
`β`β`
βοΈ Configuration
Essential Settings
| Setting | Default | Description |
|---|---|---|
| OpenRouter API Key | β | Your API key (required) |
| Model | anthropic/claude-3.5-sonnet | AI model to use |
| Enable Function Calling | ON | Allow AI to create/edit files |
| Enable Search Agent | ON | Allow vault search |
| Max Search Results | 10 | Number of notes to use as context (3-20) |
Recommended Models
Best Overall: anthropic/claude-3.5-sonnet
- Excellent at function calling
- Good balance of quality and cost
- Highly recommended for Agent mode
Best for Speed: anthropic/claude-3-haiku
- Fastest and cheapest
- Good for simple queries
Most Powerful: openai/gpt-4-turbo or openai/gpt-4
- Highest quality but more expensive
- Better for complex reasoning
Good Alternative: google/gemini-pro
- Fast and capable
- Competitive pricing
π― When to Use Each Mode
Chat Only (Both toggles OFF)
Best for: General knowledge questions
"Explain quantum computing in simple terms"
"What's the difference between async and await?"
Search Only (π ON, π€ OFF)
Best for: Questions about your notes
"What have I learned about React?"
"Summarize my notes on productivity"
Agent Only (π€ ON, π OFF)
Best for: File operations
"Create a new note for today's meeting"
"Add a section to my README"
Both Enabled (π ON, π€ ON)
Best for: Complex tasks combining context and actions
"Based on my project notes, create a summary document"
"Find my Python learning notes and create a study guide"
π API & Pricing
OpenRouter
- Free tier: Limited free credits for testing
- Pay-as-you-go: Typically $0.01-0.10 per conversation
- No subscription required
- Supports 100+ models
View pricing: https://openrouter.ai/docs#pricing
Cost Examples (approximate)
- Simple question: $0.001-0.01
- Complex multi-turn with function calling: $0.05-0.20
- Search with long context: $0.02-0.10
Reducing Costs
- Use Claude Haiku for simple tasks (cheapest)
- Disable Search when not needed
- Keep conversations focused
- Use shorter prompts
π§ Technical Details
Built With
- TypeScript - Strict type safety
- Obsidian API - Native plugin integration
- esbuild - Fast bundling
- OpenRouter API - Multi-model LLM access
Requirements
- Obsidian v0.15.0 or later
- Node.js 16+ (for development)
- Internet connection (for API calls)
π οΈ Development
Setup
npm install
Development Mode (Watch)
npm run dev
- Watches for changes and rebuilds
- Output:
main.js
Production Build
npm run build
- Full build with type checking
- Output:
main.js
Testing
- Copy
main.js,manifest.json,styles.cssto:<VaultPath>/.obsidian/plugins/vault-agent-search/ - Reload Obsidian
- Enable in Community Plugins
π Troubleshooting
"Please set OpenRouter API Key"
Solution: Add your API key in plugin settings
Agent mode isn't working
Solution: Use a compatible model:
- β Claude 3.5 Sonnet, Claude 3 Opus
- β GPT-4, GPT-4 Turbo
- β Gemini Pro
- β Most other models don't support function calling
Search finds nothing
Solution: Try broader, simpler keywords
API errors (401, 429, etc.)
- 401: Invalid API key
- 429: Rate limited (wait or upgrade)
- 500: OpenRouter server error (try again later)
File operations aren't working
Solution:
- Ensure Agent toggle is ON
- Check model supports function calling
- Use valid file paths: "folder/note.md"
- Confirm file doesn't already exist (for create)
Performance issues
Solution:
- Reduce Max Search Results setting
- Use faster model (Haiku instead of Sonnet)
- Disable Search if not needed
- Close other plugins
π Advanced Tips
Writing Effective Prompts
Weak:
"Help me with my notes"
Strong:
"Based on my project management notes, create a weekly
planning template matching my preferred structure
(Goals, Tasks, Notes, Reflections)"
Using Search Effectively
- Be specific: "notes about React" not "my notes"
- Use domain keywords: "TypeScript decorators" vs "programming"
- Broader terms find more: "web development" vs "web dev testing"
Organizing with Agent
"Create this folder structure:
Projects/
βββ 2025/
β βββ WebApp/
β βββ CLI/
β βββ Docs/
βββ Learning/
βββ Archive/"
π€ Contributing
Contributions welcome! Please:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
See CONTRIBUTING.md for detailed guidelines.
π Resources
- Quick Start Guide - Get running in 5 minutes
- Full Documentation - Complete reference
- Discussions - Ask questions
- Issues - Report bugs
- Obsidian Plugin Docs - Plugin development reference
- OpenRouter API Docs - API reference
β οΈ Privacy & Security
Data Handling
- Search: Your note content is sent to OpenRouter/chosen API
- Function Calling: File operations happen locally
- API Keys: Stored securely in Obsidian's data store
- No cloud storage: Plugin doesn't upload your vault
Best Practices
- Keep API keys private; don't share them
- Review what data gets sent with Search enabled
- Disable Search if sensitive information in notes
- Use free credits for testing before paid usage
π License
MIT License - see LICENSE file for details
π Acknowledgments
- Obsidian - Amazing note-taking app
- OpenRouter - Multi-model LLM API
- Claude - AI model powering most features
- Community - Feedback and ideas
π Support & Feedback
Have questions or ideas?
- π¬ GitHub Discussions
- π Report Issues
- β Star on GitHub to show support
Happy note-taking with AI! π
Made with β€οΈ for Obsidian users by Sabig Benmumin
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.