Skip to content

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

docs(search): document host-pinned search credentials

Steven Enamakelc7a0c465a0b9
diff --git a/crates/openhuman-core/src/config/mod.rs b/crates/openhuman-core/src/config/mod.rs
index fce9566d56..dc48ed7ea8 100644
--- a/crates/openhuman-core/src/config/mod.rs
+++ b/crates/openhuman-core/src/config/mod.rs
@@ -54,12 +54,12 @@ pub use schema::{
ObservabilityConfig, OrchestratorModelConfig, PrivacyConfig, PrivacyMode, ProxyConfig,
ProxyScope, ReliabilityConfig, ResourceLimitsConfig, RuntimeConfig, SandboxBackend,
SandboxConfig, SchedulerConfig, SchedulerGateConfig, SchedulerGateMode, SearchConfig,
- SearchEngineCredentials, SearchHostCredential, SearchPresentation, SearchProviderSettings, UnknownKeyedSearchProvider,
- SearchRoute,
- SearxngConfig, SecretsConfig, SecurityConfig, ShellConfig, SlackConfig, StreamMode, SttEngine,
- TeamModelConfig, TelegramConfig, TokenjuiceConfig, UpdateConfig, UpdateRestartStrategy,
- VoiceActivationMode, VoiceServerConfig, WebSearchConfig, WebhookConfig, YuanbaoConfig,
- DEFAULT_MODEL, LEGACY_TIER_MODELS, MANAGED_MULTIMODAL_MODELS, MANAGED_SEARCH_PROVIDERS,
+ SearchEngineCredentials, SearchHostCredential, SearchPresentation, SearchProviderSettings,
+ SearchRoute, SearxngConfig, SecretsConfig, SecurityConfig, ShellConfig, SlackConfig,
+ StreamMode, SttEngine, TeamModelConfig, TelegramConfig, TokenjuiceConfig,
+ UnknownKeyedSearchProvider, UpdateConfig, UpdateRestartStrategy, VoiceActivationMode,
+ VoiceServerConfig, WebSearchConfig, WebhookConfig, YuanbaoConfig, DEFAULT_MODEL,
+ LEGACY_TIER_MODELS, MANAGED_MULTIMODAL_MODELS, MANAGED_SEARCH_PROVIDERS,
MODEL_IMAGE_GENERATION_AGENT, MODEL_MANAGED_DEFAULT, MODEL_MEDIA_UNDERSTANDING,
MODEL_VIDEO_GENERATION_AGENT, SEARCH_ENGINE_BRAVE, SEARCH_ENGINE_DISABLED, SEARCH_ENGINE_EXA,
SEARCH_ENGINE_MANAGED, SEARCH_ENGINE_PARALLEL, SEARCH_ENGINE_QUERIT, SEARCH_ENGINE_TAVILY,
diff --git a/crates/openhuman-core/src/config/schema/mod.rs b/crates/openhuman-core/src/config/schema/mod.rs
index 4e66777bee..ccb694b856 100644
--- a/crates/openhuman-core/src/config/schema/mod.rs
+++ b/crates/openhuman-core/src/config/schema/mod.rs
@@ -121,12 +121,13 @@ pub use tools::{
ComposioHostCredential, CurlConfig, GitbooksConfig, HttpHeader, HttpRequestConfig,
IntegrationToggle, IntegrationsConfig, LegacySearchInputs, McpAuthConfig, McpClientConfig,
McpClientIdentityConfig, McpServerConfig, McpToolExposure, MultimodalConfig,
- MultimodalFileConfig, SearchConfig, SearchEngineCredentials, SearchHostCredential, UnknownKeyedSearchProvider,
- SearchPresentation, SearchProviderSettings, SearchRoute, SearxngConfig, SecretsConfig, SeltzConfig,
- WebSearchConfig, COMPOSIO_MODE_BACKEND, COMPOSIO_MODE_DIRECT, COMPOSIO_MODE_DISABLED,
- MANAGED_SEARCH_PROVIDERS, SEARCH_ENGINE_BRAVE, SEARCH_ENGINE_DISABLED, SEARCH_ENGINE_EXA,
- SEARCH_ENGINE_MANAGED, SEARCH_ENGINE_PARALLEL, SEARCH_ENGINE_QUERIT, SEARCH_ENGINE_TAVILY,
- SEARCH_PROVIDERS, SEARCH_ROLES, SEARCH_ROLE_ANSWER, SEARCH_ROLE_CONTENTS, SEARCH_ROLE_SEARCH,
+ MultimodalFileConfig, SearchConfig, SearchEngineCredentials, SearchHostCredential,
+ SearchPresentation, SearchProviderSettings, SearchRoute, SearxngConfig, SecretsConfig,
+ SeltzConfig, UnknownKeyedSearchProvider, WebSearchConfig, COMPOSIO_MODE_BACKEND,
+ COMPOSIO_MODE_DIRECT, COMPOSIO_MODE_DISABLED, MANAGED_SEARCH_PROVIDERS, SEARCH_ENGINE_BRAVE,
+ SEARCH_ENGINE_DISABLED, SEARCH_ENGINE_EXA, SEARCH_ENGINE_MANAGED, SEARCH_ENGINE_PARALLEL,
+ SEARCH_ENGINE_QUERIT, SEARCH_ENGINE_TAVILY, SEARCH_PROVIDERS, SEARCH_ROLES, SEARCH_ROLE_ANSWER,
+ SEARCH_ROLE_CONTENTS, SEARCH_ROLE_SEARCH,
};
pub use update::{UpdateConfig, UpdateRestartStrategy};
pub use web_chat_config::WebChatConfig;
diff --git a/crates/openhuman-core/src/config/schema/tools/mod.rs b/crates/openhuman-core/src/config/schema/tools/mod.rs
index 0aa7ce44c7..b3a8dc3f19 100644
--- a/crates/openhuman-core/src/config/schema/tools/mod.rs
+++ b/crates/openhuman-core/src/config/schema/tools/mod.rs
@@ -20,9 +20,10 @@ pub use mcp::{
};
pub use multimodal::{MultimodalConfig, MultimodalFileConfig};
pub use search::{
- LegacySearchInputs, SearchConfig, SearchEngineCredentials, SearchHostCredential, UnknownKeyedSearchProvider,
- SearchPresentation, SearchProviderSettings, SearchRoute, SearxngConfig, SeltzConfig, WebSearchConfig,
- MANAGED_SEARCH_PROVIDERS, SEARCH_ENGINE_BRAVE, SEARCH_ENGINE_DISABLED, SEARCH_ENGINE_EXA,
- SEARCH_ENGINE_MANAGED, SEARCH_ENGINE_PARALLEL, SEARCH_ENGINE_QUERIT, SEARCH_ENGINE_TAVILY,
- SEARCH_PROVIDERS, SEARCH_ROLES, SEARCH_ROLE_ANSWER, SEARCH_ROLE_CONTENTS, SEARCH_ROLE_SEARCH,
+ LegacySearchInputs, SearchConfig, SearchEngineCredentials, SearchHostCredential,
+ SearchPresentation, SearchProviderSettings, SearchRoute, SearxngConfig, SeltzConfig,
+ UnknownKeyedSearchProvider, WebSearchConfig, MANAGED_SEARCH_PROVIDERS, SEARCH_ENGINE_BRAVE,
+ SEARCH_ENGINE_DISABLED, SEARCH_ENGINE_EXA, SEARCH_ENGINE_MANAGED, SEARCH_ENGINE_PARALLEL,
+ SEARCH_ENGINE_QUERIT, SEARCH_ENGINE_TAVILY, SEARCH_PROVIDERS, SEARCH_ROLES, SEARCH_ROLE_ANSWER,
+ SEARCH_ROLE_CONTENTS, SEARCH_ROLE_SEARCH,
};
diff --git a/crates/openhuman-core/src/modules/search/mod.rs b/crates/openhuman-core/src/modules/search/mod.rs
index e3b1213f69..7778394909 100644
--- a/crates/openhuman-core/src/modules/search/mod.rs
+++ b/crates/openhuman-core/src/modules/search/mod.rs
@@ -4,7 +4,9 @@
//! (`crate::search::providers`) into the module's private configuration.
//! Secrets enter only through that configuration, delivered at TinyBus
//! initialization and reinitialization; they never ride an ordinary method
-//! call or a settings RPC response. `proxy` holds the call path.
+//! call or a settings RPC response. A key an embedder pinned on one agent's
+//! config ([`crate::config::SearchHostCredential`]) enters the same way, for
+//! that agent's calls. `proxy` holds the call path.
use std::collections::BTreeMap;
diff --git a/crates/openhuman-core/src/modules/search/proxy.rs b/crates/openhuman-core/src/modules/search/proxy.rs
index 5e87b1d0af..140a1d7e55 100644
--- a/crates/openhuman-core/src/modules/search/proxy.rs
+++ b/crates/openhuman-core/src/modules/search/proxy.rs
@@ -1,6 +1,14 @@
//! Call path to the loaded TinySearch module: lazy load, private
//! reconfiguration when the resolved configuration changes, and serialized
//! `ListTools` / `ExecuteTool` calls.
+//!
+//! The module is one per process, but a call's configuration is the caller's:
+//! the reloaded `config.toml` for an ordinary agent, or the agent's own
+//! in-memory config when an embedder pinned search keys on it
+//! ([`crate::config::SearchConfig::pin_host_credential`]). Before each call
+//! the module is reconfigured if it holds anything else, and the call lock is
+//! held through the call, so agents with different keys take turns rather
+//! than ever sharing one configuration.
use std::{
future::Future,
@@ -165,7 +173,9 @@ where
/// reloaded so a settings or login change is honoured on the next call.
async fn current_config(config: &Config) -> Result<Config, String> {
if config.search.is_host_pinned() {
- tracing::debug!("[modules][search] host-pinned search credentials; using the agent's config");
+ tracing::debug!(
+ "[modules][search] host-pinned search credentials; using the agent's config"
+ );
return Ok(config.clone());
}
crate::config::ops::reload_config_from_paths(&config.config_path, &config.workspace_dir).await
diff --git a/crates/openhuman-core/src/search/tools.rs b/crates/openhuman-core/src/search/tools.rs
index 632bc2b6f2..f4aac08a35 100644
--- a/crates/openhuman-core/src/search/tools.rs
+++ b/crates/openhuman-core/src/search/tools.rs
@@ -4,7 +4,9 @@
//! computed synchronously from config so a turn's tool list is stable and
//! needs no module round-trip. Each call re-reads the live config and goes
//! through `modules::search::execute_tool`, so a provider or login change is
-//! honoured on the next call without rebuilding the session.
+//! honoured on the next call without rebuilding the session — unless the
+//! agent's config carries host-pinned search keys, which make it the config
+//! the call runs under.
use std::collections::hash_map::DefaultHasher;
use std::hash::{Hash, Hasher};
diff --git a/crates/openhuman-embed/src/lib.rs b/crates/openhuman-embed/src/lib.rs
index 74e1ebe616..5290405d50 100644
--- a/crates/openhuman-embed/src/lib.rs
+++ b/crates/openhuman-embed/src/lib.rs
@@ -71,8 +71,8 @@ pub use openhuman_core::backend::{
BackendTransportError, BaseUrlPurpose, TransportProfile,
};
pub use openhuman_core::config::ComposioHostCredential;
-pub use openhuman_core::config::{SearchHostCredential, UnknownKeyedSearchProvider};
pub use openhuman_core::config::Config as RuntimeConfig;
+pub use openhuman_core::config::{SearchHostCredential, UnknownKeyedSearchProvider};
pub use openhuman_core::security::TrustedAccess;
pub use openhuman_core::tools::toolpacks::{GroupMode, ToolGroups};
// The seam `AgentSpec::tools` needs: the belt types, and `Tool` itself from the