Architecture Overview
Rowboat is built as a distributed system with multiple interfaces sharing a common core. The architecture enables local-first data storage while providing flexible access through desktop, CLI, SDK, and web interfaces.Component Architecture
Desktop App (apps/x)
Desktop App (apps/x)
The Electron desktop application is the primary interface for most users.
Structure
Technology Stack
- Desktop Framework: Electron 39.x
- UI: React 19, Vite 7, TailwindCSS, Radix UI
- Build: TypeScript 5.9, esbuild, Electron Forge
- Package Manager: pnpm (workspace protocol)
Build Dependencies
The desktop app uses esbuild to bundle everything into a single CommonJS file, eliminating node_modules from the packaged app.
Core Package (@x/core)
Core Package (@x/core)
The core package contains the business logic and AI orchestration that powers all interfaces.
Key Modules
| Module | Purpose |
|---|---|
agent-schedule/ | Background agent scheduling and execution |
agents/ | Agent definitions and behaviors |
application/ | Application state management |
auth/ | OAuth and authentication flows |
config/ | Configuration management |
knowledge/ | Knowledge graph operations |
mcp/ | Model Context Protocol integration |
models/ | LLM provider abstraction |
runs/ | Agent run history and tracking |
search/ | Search functionality |
workspace/ | Workspace and vault management |
AI Stack
- Framework: Vercel AI SDK
- Providers: OpenAI, Anthropic, Google, OpenRouter
- Gateway: Vercel AI Gateway
- Local: Ollama support
- Catalog: models.dev integration
CLI Tool (apps/cli)
CLI Tool (apps/cli)
Python SDK (apps/python-sdk)
Python SDK (apps/python-sdk)
Web Platform (apps/rowboat)
Web Platform (apps/rowboat)
Next.js web application for browser-based access.
Technology
- Framework: Next.js (React)
- Deployment: Vercel-ready
- Features: Web dashboard, knowledge graph visualization
The web platform provides remote access to your knowledge graph while maintaining local-first principles.
Agent Runtime
The agent runtime is the core orchestration layer for AI-powered actions.Conversation Management
Manages stateful conversations with conversation IDs and message history
Tool Execution
Executes tools via MCP protocol with safety controls and user approval
Background Processing
Schedules and runs background agents on configurable intervals
Knowledge Integration
Reads and writes to the knowledge graph during agent execution
Data Storage
All user data is stored locally on the machine.Knowledge Graph
- Location: User-configurable workspace directory
- Format: Plain Markdown files with YAML frontmatter
- Compatibility: Obsidian-compatible vault structure
- Linking: Backlinks using
[[note-name]]syntax
Configuration
- Location:
~/.rowboat/config/ - Files:
models.json- LLM provider configurationmodels.dev.json- Model catalog cachedeepgram.json- Voice transcription API keybrave-search.json- Web search API keyexa-search.json- Research search API key
Configuration files use JSON format with clear schemas. No credentials are stored in the codebase.
Model Context Protocol (MCP)
Rowboat uses MCP to connect with external tools and services.Architecture
Supported Tools
- Search: Exa, Brave
- Social: Twitter/X
- Voice: ElevenLabs
- Productivity: Slack, Linear, Jira
- Development: GitHub
- Custom: Build your own MCP servers
Security & Privacy
Local-First
All data stored on your machine, not in the cloud
Transparent Storage
Plain Markdown files you can inspect, edit, or delete
API Key Control
You control your own API keys for LLM providers
No Telemetry
No tracking or analytics without explicit consent
Development Workflow
Desktop App Development
Building for Production
Code signing requires
APPLE_ID, APPLE_PASSWORD, and APPLE_TEAM_ID environment variables.Integration Flow
Google Services Setup
- User initiates OAuth flow in desktop app
- Core package handles OAuth via
auth/module - Tokens stored in
~/.rowboat/config/ - Core syncs Gmail, Calendar, Drive periodically
- Data extracted and added to knowledge graph
Agent Execution Flow
- User triggers agent (chat, background schedule, or API)
- Agent runtime loads conversation context
- Agent queries knowledge graph for relevant notes
- LLM generates response with tool calls
- MCP executes tools (with user approval if needed)
- Results written back to knowledge graph
- Response returned to user interface
Performance Considerations
Build Optimization
Build Optimization
- esbuild bundles main process to single file
- Vite optimizes renderer with code splitting
- pnpm workspace protocol for fast installs
- TypeScript incremental builds
Runtime Optimization
Runtime Optimization
- Knowledge graph indexed for fast search
- LLM responses streamed for better UX
- Background agents run on configurable schedules
- Electron IPC for efficient process communication
Next Steps
Development Guide
Learn how to contribute to the codebase
API Reference
Explore the API documentation
Agent Development
Build custom agents and workflows
MCP Integration
Connect external tools via MCP