Chattree features an integrated, privacy-focused subsystem for user notes and reminders with local Vector RAG (Retrieval-Augmented Generation).
This guide details both the user-facing conversational capabilities and the programmatic interfaces exposed to WebAssembly plugins through the Chattree Host API.
Conversational Layer:
User input / Chat ────► AI Engine (local Llama / External Provider)
│
├─► Direct commands: /note, /reminder
├─► Intent classification (natural language CRUD)
└─► Vector RAG context retrieval
│
▼
Data Layer:
Notes Database (SQLite) ◄──► Local Vector Store (Embeddings & Cosine Search)
Reminders Database (SQLite) ◄──► Android AlarmManager (Exact Alarms via flutter_local_notifications)
▲
│
Host API Layer (ChattreeHostApi):
WASM Plugin ──host_call()──► PermissionGateway ──► Chattree Notes / Reminders Handlers
Chattree exposes Notes and Reminders through dedicated, official first-class plugins (NotePlugin and ReminderPlugin) registered within PluginRegistry.instance. This architecture ensures unified discovery in the slash-command menu, consistent permission enforcement, and deterministic routing.
NotePlugin)/note directly for deterministic operations:
/note
/note buy coffee beans and milk
/note project deadline: submit final report on Friday
/note search student ID
/note list
/note without arguments renders a minimalist monochrome DeclarativeUiBubble card (hideText: true, note icon, list elements with note title and truncated content preview).rag_search: NotesService and NoteTool combine accent-insensitive tokenized lexical search with on-device RAGService semantic embeddings via Reciprocal Rank Fusion (RRF, k=60). /note also supports the rag_search action and falls back to hybrid search on get lookups when an exact title/ID match is not found, injecting bounded note context (up to 5 notes, 1,200 chars per note, 3,600 chars total)./note or /reminder, ensuring side-effects are never performed without explicit user consent.Reminders handle time-sensitive tasks with scheduled notifications on Android:
/reminder without arguments immediately lists all pending reminders inside a minimalist monochrome DeclarativeUiBubble card (hideText: true, alarm icon, key_value items, and action buttons). With arguments, it routes to the assistant:
/reminder
/reminder submit tax report next Monday at 9:00 AM
AlarmManager (exact alarms). When the scheduled timestamp arrives, Android wakes up the notification service to ring the alert on time, even if the phone is locked or Chattree is closed, with zero battery drain.When chatting, if a user query might benefit from saved notes, Chattree can automatically augment the AI prompt with relevant context:
EmbeddingService and RAGService index notes sequentially in the background to avoid isolate contention).SqliteVectorStore). To minimize memory footprint, SqliteVectorStore keeps only document IDs and float vectors in RAM and fetches text and metadata from SQLite in batches of 500 for matching chunks, with deterministic cache invalidation whenever notes are inserted, updated, or deleted.ChatController.sendMessage) while RAG is enabled and initialized, semantic similarity against stored note vectors is computed in milliseconds. Inside /note, NoteTool fuses semantic RAG results with accent-insensitive lexical matching via RRF (k=60).Third-party WASM plugins do not depend on the conversational AI interpretation. Instead, plugins interact directly with Notes and Reminders through programmatic, type-safe Host API operations.
To access these services, a plugin must declare the appropriate capabilities in its plugin.json:
"capabilities": [
"chattree.notes.read",
"chattree.notes.create",
"chattree.notes.update",
"chattree.notes.delete",
"chattree.notes.search",
"chattree.reminders.read",
"chattree.reminders.create",
"chattree.reminders.update",
"chattree.reminders.complete",
"chattree.reminders.delete"
]
Users review and grant these capabilities during plugin installation.
All calls use the standard chattree.host_call interface:
chattree.notes)| Operation | Mode | Input Payload | Output Data |
|---|---|---|---|
chattree.notes.search | Async | { "query": string, "limit"?: number } | { "notes": [...], "count": number } |
chattree.notes.get | Async | { "id": string } | { "note": { "id", "title", "content", "createdAt", "updatedAt" } } |
chattree.notes.create | Async | { "title": string, "content"?: string } | { "note": { "id", "title", "content", "createdAt", "updatedAt" } } |
chattree.notes.update | Async | { "id": string, "title"?: string, "content"?: string } | { "note": { "id", "title", "content", "createdAt", "updatedAt" } } |
chattree.notes.delete | Async | { "id": string } | { "deleted": true, "id": string } |
{
"api": "chattree.notes",
"operation": "create",
"payload": {
"title": "Meeting Summary",
"content": "Discussed Q4 roadmap and WebAssembly plugin engine milestones."
}
}
{
"success": true,
"data": {
"note": {
"id": "not_9a8b7c6d5e",
"title": "Meeting Summary",
"content": "Discussed Q4 roadmap and WebAssembly plugin engine milestones.",
"createdAt": "2026-10-14T18:00:00.000Z",
"updatedAt": "2026-10-14T18:00:00.000Z"
}
}
}
chattree.reminders)| Operation | Mode | Input Payload | Output Data |
|---|---|---|---|
chattree.reminders.list | Async | { "limit"?: number } | { "reminders": [...], "count": number } |
chattree.reminders.get | Async | { "id": string } | { "reminder": { "id", "title", "scheduledAt", "completed" } } |
chattree.reminders.create | Async | { "title": string, "scheduledAt"?: string } | { "reminder": { "id", "title", "scheduledAt", "completed" } } |
chattree.reminders.update | Async | { "id": string, "title"?: string, "scheduledAt"?: string } | { "reminder": { ... } } |
chattree.reminders.complete | Async | { "id": string } | { "completed": true, "id": string } |
chattree.reminders.delete | Async | { "id": string } | { "deleted": true, "id": string } |
chattree.notes.* cannot read conversation transcripts or AI system prompts.