Skip to main content
Rowboat includes background services that continuously monitor your data sources and maintain your knowledge graph. These agents work autonomously to keep your information up-to-date without manual intervention.

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:
Gmail Sync Flow:
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}.md
5

Update state

Saves new historyId for next sync
Incremental vs Full 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:
Logs are stored at: ~/.rowboat/logs/services.jsonl
Log rotation: Files rotate after 10MB to services.{timestamp}.jsonl

Agent 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 agent
3

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 runtime loads agents dynamically:
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:
  1. Logs the error
  2. Continues to the next scheduled run
  3. Will retry on the next iteration

Partial Progress

The knowledge graph builder saves progress after each batch:
This ensures that if processing fails mid-way, already-processed files won’t be repeated.

OAuth Expiration

If OAuth credentials expire (401 error):
The service clears cached credentials and prompts for re-authentication on next run.

Manual Triggers

You can trigger syncs manually without waiting for the scheduled interval:
This uses an interruptible sleep pattern:

Source Code Reference

Key implementation files:
  • apps/x/packages/core/src/knowledge/build_graph.ts:522-657 - Main graph builder service
  • apps/x/packages/core/src/knowledge/sync_gmail.ts:443-467 - Gmail sync service
  • apps/x/packages/core/src/agents/runtime.ts:36-148 - Agent runtime
  • apps/x/packages/core/src/services/service_logger.ts - Service logging infrastructure