Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

Add composio gmail_sync_query to scope background Gmail ingestion

Nocturnal769fad29a5f9
diff --git a/src/openhuman/config/schema/tools/integrations.rs b/src/openhuman/config/schema/tools/integrations.rs
index 1d06016afe..6667c571a0 100644
--- a/src/openhuman/config/schema/tools/integrations.rs
+++ b/src/openhuman/config/schema/tools/integrations.rs
@@ -63,6 +63,15 @@ pub struct ComposioConfig {
/// the keychain-backed value over this field. Default `None`.
#[serde(default)]
pub api_key: Option<String>,
+
+ /// Gmail search query that scopes the background Gmail→memory sync to
+ /// matching messages only (full Gmail search syntax — `label:brain`,
+ /// `from:someone`, `newer_than:30d`; space-separated clauses AND).
+ /// Empty (the default) = the whole inbox window. On-demand agent access
+ /// to Gmail is unaffected — this gates only what auto-ingests into
+ /// memory.
+ #[serde(default)]
+ pub gmail_sync_query: String,
}
fn default_entity_id() -> String {
@@ -78,6 +87,7 @@ impl Default for ComposioConfig {
triage_disabled_toolkits: Vec::new(),
mode: default_composio_mode(),
api_key: None,
+ gmail_sync_query: String::new(),
}
}
}
diff --git a/src/openhuman/memory/host.rs b/src/openhuman/memory/host.rs
index b7eaf8a4a7..a5f152b0a6 100644
--- a/src/openhuman/memory/host.rs
+++ b/src/openhuman/memory/host.rs
@@ -138,6 +138,9 @@ impl MemoryHostConfig for Config {
entity_id: self.composio.entity_id.clone(),
api_key: self.composio.api_key.clone(),
triage_disabled: self.composio.triage_disabled,
+ gmail_sync_query: Some(self.composio.gmail_sync_query.trim())
+ .filter(|q| !q.is_empty())
+ .map(str::to_string),
}
}