Inline AI

approved

by nitinvishway

Type /ai <prompt> in any note, press Enter, and your local Ollama model writes inline. Thus, Inline AI - This plugin has not been manually reviewed by Obsidian staff.

422 downloadsUpdated 2mo agoMIT

Inline AI

Inline AI brings AI assistance directly into your Obsidian notes.

Type /ai followed by a prompt, press Enter, and get the response directly in your note. You can use it to rewrite text, summarize notes, explain code, brainstorm ideas, answer questions, and more without switching between Obsidian and another AI application.

Why Inline AI?

Working with AI usually means leaving your notes, copying content into another application, waiting for a response, and then copying the result back.

Inline AI removes that workflow.

Your note

/ai summarize the section above in three bullet points

↓ Enter

• First key point
• Second key point
• Third key point

The generated response is inserted directly into your note.

Features

  • Inline AI generation using /ai
  • Streaming responses
  • Multiple AI providers
  • Local AI through Ollama
  • Optional web search
  • Configurable system prompts
  • Adjustable temperature
  • Command Palette support
  • Works directly inside the Obsidian editor

Supported AI Providers

Inline AI supports both local and cloud-based AI.

ProviderRunsCostBest for
OllamaLocallyFreePrivacy and offline use
OpenAICloudPaidGeneral-purpose AI
Anthropic ClaudeCloudPaidLong-form reasoning and writing
Google GeminiCloudFree tier availableFast general-purpose queries

You can switch between providers from the plugin settings.

How to Use

Type:

/ai your prompt

and press Enter.

The command is replaced with the generated response.

Writing

/ai rewrite this paragraph to make it clearer

Summarizing

/ai summarize these meeting notes in five bullet points

Brainstorming

/ai give me five project ideas related to machine learning

Coding

/ai explain what this function does

Research

/ai summarize this section and identify the key findings

You can use the same workflow for virtually any task where you would normally copy text into an AI chat.

Local AI with Ollama

If you want to keep your AI processing on your own machine, Inline AI supports Ollama.

With Ollama, your prompts can be processed locally instead of being sent to a cloud AI provider.

Install Ollama, download a model, and configure Inline AI to use your local Ollama server.

ollama pull llama3.2
ollama serve

Then configure:

Provider: Ollama
URL: http://localhost:11434
Model: llama3.2

No API key is required for the local Ollama connection.

Cloud AI

You can also connect Inline AI to cloud providers such as OpenAI, Anthropic, and Google Gemini.

Select the provider in:

Settings → Inline AI

Then enter the required API key and choose the model you want to use.

Your prompts are sent to the selected provider when using a cloud-based model.

Web Search

Inline AI can optionally search the web before generating a response.

For example:

/ai what are the latest developments in AI?

With web search enabled, the plugin retrieves current search results and provides them to the AI as context.

Web search can be enabled from:

Settings → Inline AI → Web Search

Customization

Inline AI provides several settings for controlling how the AI responds.

System Prompt

Define instructions that should be applied to your requests.

For example:

You are a concise technical assistant.

Temperature

Control how deterministic or creative responses should be.

0.0  Precise
0.5  Balanced
1.0  Creative

Lower values are useful for code and factual tasks. Higher values can be useful for brainstorming and creative writing.

Command Palette

You don't have to use /ai.

You can also use the Obsidian Command Palette:

  1. Open the Command Palette.
  2. Search for Ask AI.
  3. Select the command.
  4. Enter your prompt.

Privacy

Privacy depends on the provider you choose.

With Ollama, processing can remain entirely on your local machine.

With OpenAI, Anthropic, or Google Gemini, your prompts are sent to the respective provider's API. Check the provider's current privacy policy before sending sensitive information.

Troubleshooting

Nothing happens

Make sure you are editing the note rather than viewing it in Reading mode.

Ollama connection failed

Make sure Ollama is running:

ollama serve

The default Ollama address is:

http://localhost:11434

Model not found

Download the model first:

ollama pull llama3.2

API key rejected

Check that the API key is correct, active, and does not contain accidental spaces.

Current Limitations

  • Desktop only
  • AI generation cannot currently be cancelled once started
  • Only one provider is active at a time
  • The /ai trigger is currently fixed in the plugin

License

MIT

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.