Skip to content

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

feat(saas): seed built-in agent definitions at runtime build

Steven Enamakel4809e6c381fc
diff --git a/crates/openhuman-core/src/core/runtime/saas.rs b/crates/openhuman-core/src/core/runtime/saas.rs
index 6eb05726cb..ad016569d6 100644
--- a/crates/openhuman-core/src/core/runtime/saas.rs
+++ b/crates/openhuman-core/src/core/runtime/saas.rs
@@ -268,6 +268,16 @@ pub async fn build(
builder = builder.port(port);
}
let runtime = builder.build().await?;
+ // Built-in agent definitions only. The registry is process-wide and the
+ // first initialiser wins, so seeding it here also stops a lazy init from
+ // loading one user's workspace definitions for everyone.
+ crate::agent::harness::AgentDefinitionRegistry::init_global_builtins()?;
+ log::info!(
+ "[saas] agent definitions: {} built-in(s), no workspace or home overrides",
+ crate::agent::harness::AgentDefinitionRegistry::global()
+ .map(|r| r.len())
+ .unwrap_or(0)
+ );
let host = Arc::new(crate::user_agents::AgentHost::new(
config,
runtime.context().clone(),