Akali64 downloadsRun a vault-aware AI agent with streaming output, safe file tools, and configurable OpenAI-compatible providers.
Ogent is an Obsidian vault-aware AI agent with streaming output, safe file tools, and bring-your-own-key provider support.
This repository is a personal fork and ongoing customization of OpenAgent for Obsidian. The upstream project and its MIT license remain the foundation; the changes in this repository focus on a lightweight, practical Agent for an Obsidian knowledge base.
web_search, followed by public HTML/plain-text retrieval through web_fetch. Results include source metadata and fetched pages are treated as untrusted reference material.This project intentionally keeps the core Agent small. Grounded Research, MLX/local embedding packs, and the former hackathon/evaluation data are not part of the current project. They can be developed as separate projects if needed later.
The plugin does not provide arbitrary terminal commands or external system writes.
This fork is currently intended for manual installation while it is under development. Community-plugin submission is planned; until it is approved, install a GitHub Release manually.
main.js, manifest.json, and styles.css from a release, or build them locally.<vault>/.obsidian/plugins/agent-ogent/ if it does not exist.If you previously used the upstream OpenAgent build, enable this plugin once and then disable the old open-agent plugin. The first launch imports its settings and session files without deleting the old data.
For mobile, sync the same plugin files into the mobile vault's .obsidian/plugins/agent-ogent/ directory.
Open Settings → Ogent and configure:
| Setting | Description |
|---|---|
| Provider | Currently an OpenAI-compatible endpoint. |
| Base URL | The provider API base URL, for example https://api.openai.com/v1. |
| API key | The key used by the configured model provider. |
| Model | A model name accepted by the endpoint; models can be fetched from /models. |
| Web search provider | Tavily or Brave Search. |
| Web search API key | Optional until the Agent needs web_search; required for web search calls. |
| System prompt | Optional instruction prepended to conversations. |
| Agent memory | Optional plugin-local preferences. Do not store secrets here. |
| Tool consent | Separate defaults for vault reads, vault writes, and network reads. |
| Enabled tools | Per-tool enable/disable controls. |
When current or time-sensitive information is needed, the Agent can search the public web and then fetch a selected page. Web access is approval-controlled and does not make DeepSeek or another model's native knowledge current by itself; the search tools supply the current sources.
web_fetch accepts only HTTP(S) URLs and blocks local, loopback, private, and link-local hosts..obsidian/plugins/agent-ogent/data.json. This file is ignored by Git. Never commit it, put keys in notes or OpenAgent.md, or include them in bug reports and exported sessions.Requirements: Node.js and npm.
git clone https://github.com/Akali-yyds/ObsidianAgent-Ogent.git
cd ObsidianAgent-Ogent
npm install
# Development/watch build
npm run dev
# Verification
npm run build
npm run lint
npm test -- --run
To deploy a production build into a local test vault, set .vault-path to the vault path (the file is ignored by Git), or set the OBSIDIAN_VAULT environment variable, then run:
npm run deploy
The deploy script copies main.js, manifest.json, and styles.css into the vault's agent-ogent plugin directory. Do not copy data.json from a personal vault into the repository.
src/
main.ts Plugin entry point and Obsidian integration
settings.ts Provider, web, consent, and tool settings
view.ts Chat panel, controls, and rendering
loop.ts Agent system prompt and execution entry point
provider.ts OpenAI-compatible streaming provider
sessions.ts Persistent sessions and event recovery
compaction.ts Conversation context compaction
consent/ Approval, diff, checkpoint, and undo logic
tools/vault/ Vault read/write/path tools
tools/web-search.ts Tavily and Brave Search integration
tools/web-fetch.ts Safe public-page fetching and text extraction
ui/ Compact Agent controls and menus
Issues and pull requests are welcome. Please avoid including API keys, private vault content, data.json, generated bundles, or personal session files in reports or patches. Run the lint and test commands before opening a pull request.
This project is derived from nikitaclicks/obsidian-openagent. The upstream copyright notice is retained and modifications are attributed to Akali-yyds. See LICENSE for the MIT License.