ai-agent.md

AI Agent ("The Organizer")

The killer feature of Mino β€” a server-hosted AI knowledge steward with plugins, sandbox, and integrations.

← Back to docs


What the Agent Does

The agent is a knowledge steward, not a general-purpose chatbot. It runs server-side (never in the browser) for full access to files, plugins, and local AI tools. Its job:

  1. Organize β€” Auto-tag, categorize, and file notes into the right folders
  2. Connect β€” Find and create links between related notes (like Obsidian's graph view, but automatic)
  3. Summarize β€” Create summaries, indexes, and MOC (map of content) notes
  4. Clean β€” Find duplicate notes, merge related ones, archive stale ones
  5. Answer β€” When asked a question, search through all notes and synthesize an answer
  6. Import β€” Process imports (web pages, emails, voice memos) into properly formatted notes
  7. Execute β€” Run plugins (web search, transcription, OCR) via the sandbox

Why Server-Hosted

ReasonDetails
LLM API keys stay server-sideNo keys leak to the browser
File system accessAgent reads/writes .md files directly β€” no network overhead
Sandbox / code executionAgent can run scripts, install tools, execute plugins in isolation
Multi-channelAgent is accessible from web, mobile, CLI, MCP β€” all through the same server API
Background processingAuto-organization, auto-tagging, embedding generation run asynchronously
Local AI toolsIf server has resources, agent can use Whisper, OCR, local embeddings for free
Token efficiencyAgent queries local SQLite directly (zero network), reads files locally

Agent Architecture

β”Œβ”€ Agent Runtime (server-side) ────────────────────────────┐
β”‚                                                           β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚                   LLM (Claude / GPT / etc.)        β”‚   β”‚
β”‚  β”‚  System prompt + context window                    β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚                          β”‚                                β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚                 TOOL LAYER                          β”‚   β”‚
β”‚  β”‚                                                     β”‚   β”‚
β”‚  β”‚  mino.search      β€” full-text + semantic search     β”‚   β”‚
β”‚  β”‚  mino.read         β€” read a specific note           β”‚   β”‚
β”‚  β”‚  mino.write        β€” create/replace a note          β”‚   β”‚
β”‚  β”‚  mino.edit         β€” search-and-replace in a note   β”‚   β”‚
β”‚  β”‚  mino.move         β€” move/rename a note             β”‚   β”‚
β”‚  β”‚  mino.delete       β€” delete a note (with safeguard) β”‚   β”‚
β”‚  β”‚  mino.tree         β€” get the folder structure       β”‚   β”‚
β”‚  β”‚  mino.tags         β€” list/manage tags               β”‚   β”‚
β”‚  β”‚  mino.recent       β€” get recently modified notes    β”‚   β”‚
β”‚  β”‚  mino.links        β€” find backlinks / forward links β”‚   β”‚
β”‚  β”‚                                                     β”‚   β”‚
β”‚  β”‚  --- PLUGIN TOOLS (dynamically loaded) ---          β”‚   β”‚
β”‚  β”‚  web.search        β€” search the web (plugin)        β”‚   β”‚
β”‚  β”‚  youtube.transcriptβ€” get video transcript (plugin)  β”‚   β”‚
β”‚  β”‚  whisper.transcribeβ€” speech-to-text (plugin)        β”‚   β”‚
β”‚  β”‚  ocr.extract       β€” extract text from image        β”‚   β”‚
β”‚  β”‚  email.fetch       β€” fetch emails (plugin)          β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚                                                           β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚                 CONTEXT STRATEGY                    β”‚   β”‚
β”‚  β”‚                                                     β”‚   β”‚
β”‚  β”‚  1. Always inject: folder tree (compacted)          β”‚   β”‚
β”‚  β”‚  2. Always inject: recent notes list (last 10)      β”‚   β”‚
β”‚  β”‚  3. On search: return snippets, not full files      β”‚   β”‚
β”‚  β”‚  4. On read: return full file content               β”‚   β”‚
β”‚  β”‚  5. On edit: use search-and-replace (not full file) β”‚   β”‚
β”‚  β”‚  6. Limit context to ~8K tokens per tool call       β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚                                                           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Token Efficiency Strategy

StrategyDescriptionToken Savings
Compact file treeSend folder names + file count, not every filename. Expand on demand.~80% vs full tree
Snippet searchReturn 200-char snippets around matches, not full files~90% vs full files
Search-and-replace editsNever send the full file to modify. Use mino.edit(path, oldText, newText)~95% vs full file
Embeddings pre-filterUse vector similarity to find the right 5 notes out of 10,000 before reading them~99% vs reading all
Session memoryMaintain a compact summary of what the agent already knows about the vaultAvoids re-reading
Tool result cachingCache file tree and recent search results within a session~50% on repeat queries

How the Agent Should Search

A multi-phase search strategy:

  1. Phase 1: Title + Tag match β€” Fast. Search note titles and tags. Costs ~0 tokens (local SQLite query).
  2. Phase 2: Full-text search β€” Search note content via FTS5. Return snippets. Costs ~500 tokens.
  3. Phase 3: Semantic search β€” If Phase 1+2 don't find it, use embedding similarity. Costs ~200 tokens for the query embedding.
  4. Phase 4: Read β€” Only read the full file when the agent is confident it's the right one.

How the Agent Should Modify

Agent decision tree for modifications:

1. Small edit (fix typo, add tag, update a line)?
   β†’ Use mino.edit(path, oldText, newText)  ← PREFERRED

2. Add content to existing note?
   β†’ Use mino.edit(path, "<!-- END -->", "new content\n<!-- END -->")

3. Create new note?
   β†’ Use mino.write(path, content)

4. Restructure a note completely?
   β†’ Use mino.write(path, entireNewContent)  ← EXPENSIVE, avoid

5. Delete a note?
   β†’ Use mino.delete(path) β€” but ALWAYS confirm with user first
   β†’ Unless the agent has explicit "auto-delete" permission

File Tree Context Size

The agent always gets a compacted file tree:

πŸ“ Projects/ (12 files)
  πŸ“ Alpha/ (5 files)
  πŸ“ Beta/ (3 files)
  πŸ“ Archive/ (4 files)
πŸ“ Daily Notes/ (89 files)
πŸ“ References/ (23 files)
πŸ“ Personal/ (7 files)

Instead of listing all 131 individual files. The agent can "drill down" by calling mino.tree("Projects/Alpha") to see the files in a specific folder.


Agent Permissions Model

PermissionDescriptionDefault
readRead any noteβœ… Enabled
searchSearch across notesβœ… Enabled
writeCreate new notesβœ… Enabled
editModify existing notesβœ… Enabled
moveMove/rename notesβœ… Enabled
deleteDelete notes❌ Disabled (requires explicit enable)
organizeAuto-organize (batch operations)❌ Disabled
pluginsUse installed pluginsβœ… Enabled
sandboxExecute code in sandbox❌ Disabled
scopeRestrict to specific foldersAll folders

Plugin System (One-Click Install)

Install Flow (from the Web UI)

Inspired by the OpenClaw plugin architecture:

User opens Settings β†’ Plugins β†’ Marketplace
  β†’ Browses available plugins (fetched from registry)
    β†’ Clicks "Install" on "whisper-local"
      β†’ POST /api/v1/plugins/install { name: "whisper-local" }
        β†’ Server downloads from npm/@mino-ink scope or GitHub
          β†’ Extracts to /data/plugins/whisper-local/
            β†’ Loads plugin, registers tools with Agent Runtime
              β†’ WebSocket push: "whisper-local installed βœ“"
                β†’ Agent immediately has whisper.transcribe tool
                β†’ Works from web, mobile, CLI, MCP β€” all channels

Plugin Architecture

Plugins extend the agent's capabilities. Each plugin is an npm package that exports tools:

// @mino-ink/plugin-web-search/index.ts
import { definePlugin } from '@mino-ink/plugin-sdk';

export default definePlugin({
  name: 'web-search',
  description: 'Search the web and save results as notes',
  tools: [
    {
      name: 'web_search',
      description: 'Search the web for information',
      parameters: {
        query: { type: 'string', description: 'Search query' },
        maxResults: { type: 'number', default: 5 },
      },
      execute: async ({ query, maxResults }) => {
        // ... implementation
      },
    },
  ],
});

Plugin Categories

CategoryExamplesRequires
CoreWeb search, YouTube transcriptAPI key or free API
Local AIWhisper transcription, OCR, local embeddingsServer resources (auto-detected)
ImportEmail, RSS, social media, Obsidian vaultAPI key / OAuth
ExportGit sync, backup, static site generationConfig
IntegrationsCalendar, task manager, bookmarksAPI key / OAuth

Planned Plugins

PluginDescriptionPriority
Web SearchSearch the web via Perplexity/Google/DuckDuckGoP0
YouTube TranscriptImport video transcripts as notesP1
Whisper (local)Local speech-to-text (if server resources allow)P1
Whisper (API)Speech-to-text via OpenAI Whisper APIP1
Image OCRExtract text from images (local Tesseract or API)P2
Email ImportImport emails (Gmail API) as notesP1
RSS/NewsFollow feeds and clip articlesP2
Social MediaSave tweets/posts/threadsP2
CalendarImport calendar events as daily notesP2
Git IntegrationAuto-commit note changes to a git repoP1
Obsidian ImportImport existing Obsidian vaultsP0

Agent Setup Flow (via UI)

Everything is configured through the visual interface β€” no terminal needed:

Settings β†’ Agent
  β”œβ”€ Provider: [Anthropic β–Ό] [OpenAI] [Google] [Local]
  β”œβ”€ Model: [claude-sonnet-4-20250514 β–Ό]
  β”œβ”€ API Key: [β€’β€’β€’β€’β€’β€’β€’β€’β€’β€’β€’β€’] [Show] [Test Connection]
  β”œβ”€ Permissions: [βœ“ read] [βœ“ write] [βœ“ edit] [βœ— delete] [βœ— organize]
  └─ Status: ● Connected β€” 3 tools + 2 plugins loaded

Settings β†’ Plugins
  β”œβ”€ Installed: web-search βœ“, whisper-local βœ“
  β”œβ”€ [Browse Marketplace]
  └─ Plugin config: whisper-local β†’ Language: [en β–Ό], Model: [base β–Ό]

MCP Integration

Every Mino server can expose its API as an MCP (Model Context Protocol) server, so AI agents like Antigravity, Cursor, and Claude Code can directly read/write notes:

# Start the MCP server
npx @mino-ink/mcp-server \
  --endpoint https://your-server.com \
  --api-key YOUR_KEY

The MCP server exposes these tools to any connected agent:

  • mino_search β€” Search notes
  • mino_read β€” Read a note
  • mino_write β€” Create/update a note
  • mino_edit β€” Edit part of a note
  • mino_tree β€” Get folder structure
  • mino_move β€” Move/rename a note
  • mino_delete β€” Delete a note