Service Architecture
Rowboat runs multiple independent services, each responsible for a specific data source or workflow:Gmail Sync
Monitors your Gmail inbox for new threads and syncs them to markdown filesInterval: Every 5 minutes
Fireflies Sync
Pulls meeting transcripts from Fireflies and saves them locallyInterval: Every 5 minutes
Granola Sync
Syncs meeting notes from GranolaInterval: Every 5 minutes
Knowledge Graph Builder
Processes all synced content to extract entities and update your knowledge baseInterval: Every 30 seconds
How Services Work
1. Data Source Services
Each data source (Gmail, Fireflies, Granola) runs as an independent service:Sync Process Details
Sync Process Details
Gmail Sync Flow:Incremental vs Full Sync:
1
Check for changes
Uses Gmail History API with stored historyId to detect new messages efficiently
2
Fetch thread details
For each new thread, fetches full message content including attachments
3
Convert to markdown
Converts HTML emails to clean markdown format
4
Save locally
Writes thread to
~/.rowboat/gmail_sync/{threadId}.md5
Update state
Saves new historyId for next sync
- First run: Full sync of last 30 days
- Subsequent runs: Incremental sync using Gmail History API
- Fallback: If historyId expires (404), falls back to full sync
2. Knowledge Graph Builder
The graph builder service monitors all source folders:The graph builder checks for new files every 30 seconds, processes them in batches, and updates your knowledge base incrementally.
Service Logging
All services log their activity to a central log file for debugging and monitoring:~/.rowboat/logs/services.jsonl
Log Format
Log Format
services.{timestamp}.jsonlAgent Runtime
The agent runtime handles executing AI workflows for note creation:Processing Batches
When new files need processing:1
Build knowledge index
Scans existing notes to build in-memory index of all entities
2
Create agent run
Spawns a new agent instance with the
note_creation agent3
Build context
Prepares a message with:
- Knowledge base index
- Batch of files to process
- Instructions for entity extraction
4
Execute agent
Agent reads files, extracts entities, creates/updates notes
5
Track changes
Monitors which notes were created or modified
6
Update state
Marks files as processed and commits changes to git
Agent Configuration
Agents are configured using markdown files with YAML frontmatter:The note creation agent has three variants (high/medium/low) based on your configured strictness level.
Error Handling
Services include robust error handling:Automatic Retry
If a sync fails, the service:- Logs the error
- Continues to the next scheduled run
- Will retry on the next iteration
Partial Progress
The knowledge graph builder saves progress after each batch:OAuth Expiration
If OAuth credentials expire (401 error):Manual Triggers
You can trigger syncs manually without waiting for the scheduled interval:Source Code Reference
Key implementation files:apps/x/packages/core/src/knowledge/build_graph.ts:522-657- Main graph builder serviceapps/x/packages/core/src/knowledge/sync_gmail.ts:443-467- Gmail sync serviceapps/x/packages/core/src/agents/runtime.ts:36-148- Agent runtimeapps/x/packages/core/src/services/service_logger.ts- Service logging infrastructure